Dear Mei shuangruo,
Below is an example model section to add to your APM file that writes an apopt.opt file (APOPT Options File). When APOPT runs, it reads this file to adjust the MINLP algorithm such as Maximum Iterations. There are also other tuning parameters that you can adjust to improve the performance or termination criteria.
Best regards,
John Hedengren
! apopt solver options (see apopt.com)
File apopt.opt
minlp_maximum_iterations 500 ! minlp iterations
minlp_max_iter_with_int_sol 10 ! minlp iterations if integer solution is found
minlp_as_nlp 0 ! treat minlp as nlp
nlp_maximum_iterations 50 ! nlp sub-problem max iterations
minlp_branch_method 1 ! 1 = depth first, 2 = breadth first
minlp_gap_tol 0.01 ! covergence tolerance
minlp_integer_tol 0.05 ! maximum deviation from whole number to be considered an integer
minlp_integer_leaves 0 ! create soft (1) integer leaves or hard (2) integer leaves with branching
End File
--
--
APMonitor user's group e-mail list.
- To post a message, send email to apmo...@googlegroups.com
- To unsubscribe, send email to
apmonitor+...@googlegroups.com
- Visit this group at http://groups.google.com/group/apmonitor
---
You received this message because you are subscribed to the Google Groups "apmonitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
apmonitor+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
(3) I created apopt.opt (file)(not ".m" file) instead of apopt.opt.m, after tesing apopt.opt.m. However, maximal iteration is still not converted.
Sorry that I wasn’t more clear with my explanation. Please copy the section including “File apopt.opt”…”End File” directly into your apm file. It can be at the top of your APM file. No other modifications are necessary to the files for your application. When the model file is processed, it creates the apopt.opt file on the server where it is needed to adjust the options for the solver. The same strategy can be used for the IPOPT solver with ipopt.opt or the BPOPT solver with bpopt.opt. Those solvers do not have Mixed Integer capabilities, however.
Best regards,
John Hedengren
--
You should put the solver options in your minlp.apm file as:

Best regards,
John Hedengren
From: apmo...@googlegroups.com [mailto:apmo...@googlegroups.com]
On Behalf Of shuang...@gmail.com
Sent: Monday, October 9, 2017 7:46 AM
To: apmonitor <apmo...@googlegroups.com>
Subject: Re: [APM] the problem about how to modify the maximal iterations
add the attachment