RE: HW

45 views
Skip to first unread message

John Hedengren

unread,
Jan 30, 2013, 7:18:54 PM1/30/13
to Thomas Evans, me...@apmonitor.com, apmo...@googlegroups.com

Thomas,

 

Great question! You can switch your optimizer or other options with the following lines (same with either Python or MATLAB):

 

apm_option(server,app,’nlc.solver’,3)

 

The solver number is 1=APOPT, 2=BPOPT, 3=IPOPT, 4=SNOPT (requires license), 5=MINOS (requires license). You can also set it to 0 to try all of the solvers and print out a summary at the bottom of the output. You’ll have to select one of the solvers to generate a solution, however. You can also change things like maximum number of iterations with the following:

 

apm_option(server,app,’nlc.max_iter’,500)

 

This changes the max iterations to 500. You can see all of the available options through the web-interface through the Config tab. Just add “nlc.” to the option names to access global options. You can change any of the FV, MV, SV, CV options by using something like:

 

apm_option(server,app,’MyVariable.upper’, 1000)

 

for example to change the upper limit on MyVariable. A full list of options is also available in the documentation:

 

http://apmonitor.com/wiki/index.php/Main/DbsGlobal

http://apmonitor.com/wiki/index.php/Main/DbsVariable

 

-John Hedengren

 

From: Thomas Evans [mailto:thomase...@gmail.com]
Sent: Wednesday, January 30, 2013 5:01 PM
To: John Hedengren
Subject: HW

 

I have been working on my apm code for the slurry problem and I have been able to get a solution using the online optimizer if I choose IPOPT but when I use APOPT it tells me NaN for my objective all the way down to 100. Is there anything you know of that would cause this, or is there a way to use IPOPT from python instead of APOPT? I don't really understand the difference.

Thanks,

Thomas

Reply all
Reply to author
Forward
0 new messages