LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Another solver question

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
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
using solver question jvc007 Excel Worksheet Functions 3 August 5th 08 08:26 PM
Solver question prspilot Excel Discussion (Misc queries) 3 September 19th 07 10:18 PM
Solver Question Mark Excel Worksheet Functions 0 July 11th 06 10:01 PM
Solver question Mick Excel Discussion (Misc queries) 0 April 21st 06 05:33 PM
Solver question Bill_S Excel Worksheet Functions 1 February 2nd 06 06:38 PM


All times are GMT +1. The time now is 10:22 PM.

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"