Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default solver.xla fails

I am having problem with solver.xla. It doesnot work for
this


Private Sub CmdCompute_Click()
' ---------------------------------------------------------
-----------------------
' Author : S. Shashidhar
' Date : 28/03/2003
' Purpose : To be tested in Office SP3.
' ---------------------------------------------------------
-----------------------
Const bytGreateThanEqualTo = 3
Const bytLesserThanEqualTo = 1
Const OptimizeToMax = 1

SolverReset

SolverOk SetCell:=Range("C6"), MaxMinVal:=OptimizeToMax,
ByChange:=Range("D5:E5")

SolverAdd CellRef:=Range("F7"),
Relation:=bytLesserThanEqualTo, FormulaText:=4
SolverAdd CellRef:=Range("F8"),
Relation:=bytLesserThanEqualTo, FormulaText:=1
SolverAdd CellRef:=Range("D5"),
Relation:=bytGreateThanEqualTo, FormulaText:=0
SolverAdd CellRef:=Range("E5"),
Relation:=bytGreateThanEqualTo, FormulaText:=0


SolverOptions MaxTime:=100, Iterations:=100,
precision:=0.000001, _
assumeLinear:=False,
StepThru:=False, _
estimates:=2, derivatives:=1,
SearchOption:=1, _
intTolerance:=0.05,
scaling:=False, convergence:=0.001

SolverSolve UserFinish:=False

SolverFinish KeepFinal:=1
End Sub


where the following is the details entered in the
corresponding cells.


Z X1 X2 RHS

0 4

Objective Function 4 1 3

Constraint 1 2 1 4

Constraint 2 1 -2 -8

Kindly help in solving this issue.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 837
Default solver.xla fails

What are "the corresponding cells" What is the unspecified function
that you are trying to maximize (presumably a function of variables
z,x1, and x2)

Jerry

g.Lakshmi wrote:

I am having problem with solver.xla. It doesnot work for
this


Private Sub CmdCompute_Click()
' ---------------------------------------------------------
-----------------------
' Author : S. Shashidhar
' Date : 28/03/2003
' Purpose : To be tested in Office SP3.
' ---------------------------------------------------------
-----------------------
Const bytGreateThanEqualTo = 3
Const bytLesserThanEqualTo = 1
Const OptimizeToMax = 1

SolverReset

SolverOk SetCell:=Range("C6"), MaxMinVal:=OptimizeToMax,
ByChange:=Range("D5:E5")

SolverAdd CellRef:=Range("F7"),
Relation:=bytLesserThanEqualTo, FormulaText:=4
SolverAdd CellRef:=Range("F8"),
Relation:=bytLesserThanEqualTo, FormulaText:=1
SolverAdd CellRef:=Range("D5"),
Relation:=bytGreateThanEqualTo, FormulaText:=0
SolverAdd CellRef:=Range("E5"),
Relation:=bytGreateThanEqualTo, FormulaText:=0


SolverOptions MaxTime:=100, Iterations:=100,
precision:=0.000001, _
assumeLinear:=False,
StepThru:=False, _
estimates:=2, derivatives:=1,
SearchOption:=1, _
intTolerance:=0.05,
scaling:=False, convergence:=0.001

SolverSolve UserFinish:=False

SolverFinish KeepFinal:=1
End Sub


where the following is the details entered in the
corresponding cells.


Z X1 X2 RHS

0 4

Objective Function 4 1 3

Constraint 1 2 1 4

Constraint 2 1 -2 -8

Kindly help in solving this issue.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing fails on A3 BiMo Excel Discussion (Misc queries) 0 September 2nd 08 08:21 AM
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM
SQL fails without breakpoint arno Excel Programming 1 June 3rd 04 06:57 AM
Solver Fails in Excel XP Martin[_7_] Excel Programming 3 August 8th 03 04:25 PM


All times are GMT +1. The time now is 02:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"