Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ok, I answered my last question, but I have another one, so I'm going to post
a new thread, since it's not really related. I have the following. AddIns("Solver Add-in").Installed = True SolverReset SolverOk SetCell:="$N$7", MaxMinVal:=2, ValueOf:="0", ByChange:="$B$8:$M$8" SolverAdd CellRef:="$N$3:$N$7", Relation:=1, FormulaText:="$P$3:$P$7" SolverAdd CellRef:="$N$8", Relation:=2, FormulaText:="$P$8" SolverOk SetCell:="$N$7", MaxMinVal:=2, ValueOf:="0", ByChange:="$B$8:$M$8" SolverOptions MaxTime:=100, Iterations:=100, Precision:=0.000001, AssumeLinear _ :=True, StepThru:=False, Estimates:=1, Derivatives:=1, SearchOption:=1, _ IntTolerance:=5, Scaling:=False, Convergence:=0.0001, AssumeNonNeg:=True SolverOk SetCell:="$N$7", MaxMinVal:=2, ValueOf:="0", ByChange:="$B$8:$M$8" SolverSolve userfinish:=True Now, I have a situation where I will have to run solver multiple times against the same data set, but with changing target values. So my question is, at what point in the macro does solver know that it either can or cannot solve the problem? What I want to happen is write some code to name my initial target values, then run solver, and if a solution is found, save the entire problem, not just the solution row, then reset solver, reset the target values, and start all over again. What I am missing is how to determine when solver knows its ready to give me an answer. There is some good help in the VBA help menu, but I can't seem to answer this question. In a nut shell, the loop will be like this. 1) Set initial target values. 2) Run solver with above macro 3) If solution is found, save it, if no sulution, reset solver, set next set of target values. 4) Do until all target values have been tried. I need help with #3 above. Thank you. Greg. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
using solver question | Excel Worksheet Functions | |||
Solver question | Excel Discussion (Misc queries) | |||
Solver Question | Excel Worksheet Functions | |||
Solver question | Excel Discussion (Misc queries) | |||
Solver question | Excel Worksheet Functions |