excel - VBA Solver code issue -


i using loop access excel solver. every time solver solves optimization problem, have click ok. tried record macro, no code came when click ok button. accept solution suggested solver.i not want keep pressing ok button time. there potentially 2000+ optimization problems being solved. there way of making work?

also, there way of solving unbalanced transportation problem solver without having make dummy supplies or demand nodes?

thank you.

the codes follows: solverreset

solverok setcell:="$b$18", maxminval:=2, valueof:=0, _ bychange:="$m$5:$t$12", engine:=2, enginedesc:="simplex lp"  solveradd cellref:="$u$5:$u$12", relation:=1, formulatext:="$v$5:$v$12"  solveradd cellref:="$m$13:$t$13", relation:=2, formulatext:="$m$14:$t$14" solversolve 

the documentation @ solver.com (the website of company made solver add-in) contains:

solversolve(userfinish, showref)

userfinish optional variant. true return results without displaying solver results dialog box. false or omitted return results , display solver results dialog box.

showref optional variant. can pass name of macro (as string) showref argument. macro called, in lieu of displaying show trial solution dialog box, whenever solver pauses of reasons listed below.

thus seems need replace line solversolve by

solversolve true 

but -- better idea read rest of documentation return value of solversolve , perhaps like

retvalue = solversolve(true) 

and check retvalue error-handling if isn't 1 of values correspond successful run. people can optimistic. code should pessimistic.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -