Jean
07-07-2007, 11:32 PM
Need help!:(
I have used the statement below to solve my LP problem, but the iteration times always reach the max, I can manually change the maximum times in "Excel-->Tools-->Solver-->Options--> change iteration times to 32767, "then the problem is solved, but using macro, I don't know how to set this parameter.
SolverReset
SolverOk Setcell:=Range("Target"), Maxminval:=2, Bychange:=Range("ChangingCell")
SolverAdd CellRef:=Range("Supply2"), Relation:=2, FormulaText:="Supply1"
SolverAdd CellRef:=Range("Demand2"), Relation:=2, FormulaText:="Demand1"
SolverOptions AssumeLinear:=True, AssumeNonneg:=True
SolverSolve UserFinish:=True
I have used the statement below to solve my LP problem, but the iteration times always reach the max, I can manually change the maximum times in "Excel-->Tools-->Solver-->Options--> change iteration times to 32767, "then the problem is solved, but using macro, I don't know how to set this parameter.
SolverReset
SolverOk Setcell:=Range("Target"), Maxminval:=2, Bychange:=Range("ChangingCell")
SolverAdd CellRef:=Range("Supply2"), Relation:=2, FormulaText:="Supply1"
SolverAdd CellRef:=Range("Demand2"), Relation:=2, FormulaText:="Demand1"
SolverOptions AssumeLinear:=True, AssumeNonneg:=True
SolverSolve UserFinish:=True