From APMonitor Documentation

Main: APM.SOLVER - APMonitor Option

Global Options | Local Options
 Type: Integer, Input
 Default Value: 3
 Description: Solver options
              0 = Benchmark All Solvers
              1-5 = Available Solvers Depends on License

SOLVER selects the solver to use in an attempt to find a solution. There are free solvers: 1: APOPT, 2: BPOPT, 3: IPOPT distributed with the public version of the software. There are additional solvers that are not included with the public version and require a commercial license. IPOPT is generally the best for problems with large numbers of degrees of freedom or when starting without a good initial guess. BPOPT has been found to be the best for systems biology applications. APOPT is generally the best when warm-starting from a prior solution or when the number of degrees of freedom (Number of Variables - Number of Equations) is less than 2000. APOPT is also the only solver that handles Mixed Integer problems. Use option 0 to compare all available solvers.

Options for solvers can be set using configuration parameters such as MAX_ITER or else by creating an options file such as ipopt.opt or apopt.opt. Below is an example of setting options for the APOPT solver for a mixed integer nonlinear programming solution. The File...End File section creates a new apopt.opt file when APMonitor compiles the model file.

 File apopt.opt
   minlp_maximum_iterations 10000 
   minlp_max_iter_with_int_sol 500 
   minlp_as_nlp 1 
   minlp_branch_method 3 
   minlp_gap_tol 1.0e-2 
   minlp_integer_tol 1.0e-2 
   minlp_integer_max 2.0e9 
   minlp_integer_leaves 1 
   minlp_print_level 1 
   nlp_maximum_iterations 500 
   objective_convergence_tolerance 1.0e-6 
   constraint_convergence_tolerance 1.0e-6 
 End File

In the GEKKO Optimization Suite the solver options are changed directly within Python.

m = GEKKO(server='')
m.solver_options = ['linear_solver ma57']
m.options.solver = 3
m = GEKKO(server='')
# multiple options as one list
m.solver_options = ['minlp_gap_tol 1.0e-2',\
                    'minlp_maximum_iterations 10000',\
                    'minlp_max_iter_with_int_sol 500']
m.options.solver = 1

APOPT Options

The APOPT solver has a number of options that are available for tuning the solver performance. Some of the available options and default values are listed below:

$$gap=\frac{obj_i-obj_r}{\max \left( \frac{\lvert obj_i\rvert+\lvert obj_r\rvert}{2},1 \right)}$$

Refer to Options for apopt.opt for additional details for the APOPT solver.

IPOPT Options

Refer to Options for ipopt.opt for additional details for the IPOPT solver

Additional APMonitor Options


Retrieved from
Page last modified on September 20, 2018, at 12:44 AM