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: 16
Default Accepting solver solutions automatically under VBA

I have a loop that changes some parameters with each loop, and then
sets up and solves an optimization problem. The results from each run
are stored on a separate sheet. I sometimes find that a dailog box
appears saying that the iteration limit has been reached. In such
cases, I am more than happy to acccept the solution and to just go on
to the next iteration, but I want this done automatically with no
need for human intervention. The userFinish option for SolverSolve
allows me to accept the final solution without any need for human
intervention; is there a corresponding way in which to suppress
warning or error messages and accept the current solution as well? My
code follows - thanks in advance for your assistance.

Sincerely

Thomas Philips

SolverReset
SOLVERAdd CellRef:="$C$1:$F$1", Relation:=1, FormulaText:="1"
SOLVERAdd CellRef:="$C$1:$F$1", Relation:=3, FormulaText:="0"
SOLVERAdd CellRef:="$B$1", Relation:=2, FormulaText:="1"

SolverOk SetCell:="$U$7", MaxMinVal:=2, ValueOf:="0", ByChange:="$C
$1:$F$1"
SolverOptions MaxTime:=100, Iterations:=10000, Precision:=0.0000001, _
AssumeLinear:=False, StepThru:=False,
Estimates:=2, _
Derivatives:=1, SearchOption:=1, IntTolerance:=1,
Scaling:=True, _
Convergence:=0.000001, AssumeNonNeg:=True

SolverSolve userFinish:=True
 
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
Constrain Excel Solver solutions to a list? SDK79 Excel Programming 0 November 20th 07 07:40 PM
Solver giving solutions with decimals BRFx2 Excel Worksheet Functions 0 September 13th 07 06:12 PM
Multiple Solver uses automatically Box815 Excel Discussion (Misc queries) 1 November 18th 06 02:49 PM
Writing a macro that updates solver solutions? tdogg241 Excel Worksheet Functions 2 May 31st 06 03:41 PM
Solver automatically in the VBA Reference No Name Excel Programming 1 June 18th 04 12:25 AM


All times are GMT +1. The time now is 08:20 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"