FAQ - Frequently Asked Questions

This page provides answers to general questions on optimizing with MIDACO. If you have a particular question that is not listed here, please contact us and we will likely include your question with our answer in this section. 


How to transform a maximization problem into a minimization problem ?

A maximization problem can easily be transformed into a minimization problem by
switching the sign of the objective function: F(X) = - F(X).


Note: Above sign-switch  transformation is recommended over other approaches, such using the division F(X) = 1 / F(X) in order to transform a maximization into minimization.

How to select the lower and upper bounds (XL & XU) ?

Selecting the lower and upper bounds (XL and XU) for a problem is always application specific. In general, the bounds have a significant influence on the MIDACO performance and should be set as tight as possible. If applicable, it is recommended to use the "BOUNDS-PROFIL" in order to identify, which bounds should be shrinked and which should be enlarged.

Does MIDACO require the variable bounds to be scaled between zero and one ?

No. While some algorithms (e.g. SQP) require lower bounds to be scaled to zero and upper bounds to be scaled to one, MIDACO does not have any such scaling restrictions. Lower and upper bounds can freely be choosen to any value. Note however that a large search space normally implies a slower convergence, as MIDACO will sample the entire search space. The bounds should therefore be chosen as tight as possible.

How to select a starting point ?

In general, the starting point (also called initial point or initial solution) has only a low influence on the MIDACO performance. If a good starting point is available, it should be used in combination with the FOCUS parameter (see User Guide). Using specific starting points is recommended for solution refinement (e.g. improving the precision of the feasibility of constraints).

How to set a variable to be binary ?

Set the type of variable to be "integer" and set the lower bound XL = 0.0 and the upper bound XU = 1.0

How to transform two-sided constraints to one-sided constraints?

Constraints of the form LOWER < G(X) < UPPER can be transformed into two individual constraints:

 G(X) >  LOWER
-G(X) > -UPPER

What means "Violation of G(X)" ?

The "violation of G(X)" (VIO) measures the feasibility of the constraints. In particular, VIO is the L1-Norm over all entries of G(X) that are not feasible. If VIO = 0, all constraints are feasible due to the default accuracy (0.001) or the user specified accuracy PARAM(1).

How to solve problems, where a variable must be in a discrete set ?

If an optimization variable should take a value from some discrete set a variable transformation is necessary. For example, consider that the variable X(i) should be restricted to one of the following four values: 0.3, 0.5, 0.7 or 1.2.

Then the following mapping transforms this variable from an
integer { 1, 2, 3, 4} to a set value { 0.3, 0.5, 0.7, 1.2}:

IF( X(i) == 1 ): X(i) = 0.3
IF( X(i) == 2 ): X(i) = 0.5
IF( X(i) == 3 ): X(i) = 0.7
IF( X(i) == 4 ): X(i) = 1.2

Note that it is recommended to change the variable name, e.g. from X(i) to S1:

IF( X(i) == 1 ): S1 = 0.3
IF( X(i) == 2 ): S1 = 0.5
IF( X(i) == 3 ): S1 = 0.7
IF( X(i) == 4 ): S1 = 1.2

Otherwise, if the variable name is not changed, a re-transformation of the form:

IF( X(i) == 0.3 ): X(i) = 1
IF( X(i) == 0.5 ): X(i) = 2
IF( X(i) == 0.7 ): X(i) = 3
IF( X(i) == 1.2 ): X(i) = 4

is necessary in languages like C/C++ or Fortran (after the actual problem function equations).

How to set MIDACO parameters ?

Please see the User Guide on how to set MIDACO parameters. Note that MIDACO runs by default in some kind of "Autopilot" mode and it is not necessary to tune the parameters.

How to find the global optimal solution with MIDACO ?

As a heuristic algorithm, MIDACO can not provide an absolute guarantee (also called certificate) for reaching the global optimal solution. However, MIDACO implements several internal restart heuristics, which enable the algorithm to escape from local optima and which therefore significantly increase the chance of MIDACO reaching the global optimal solution (if executed on a sufficient time horizon). For users how wish to gain confidence in reaching the global optimal solution with MIDACO, the AUTOSTOP parameter (see User Guide), can be employed. 

The value of the AUTOSTOP parameter defines the number of successive MIDACO internal algorithmic restarts, which did not further improve the current best solution. Numerical results show [*], that if MIDACO is executed without specific time or evaluation limit and a sufficient high value for AUTOSTOP is set (e.g. 100, 500 or 1000), the solution is likely to be the global or a near global one.

How to solve multi-objective optimization problems with MIDACO ?

See here

How to solve non-linear equation systems with MIDACO ?

MIDACO has the capability to solve problems with a significant number of (non-linear) equality constraints (see Benchmarks). Therefore can also be applied to find solutions to general non-linear equation systems (NLES), where no objective function F(X) is present. In order to solve a NLES with MIDACO, the objective function can either be given a constant value (e.g. F(X)=0), or one of the (equality) constraints is formulated as objective (e.g. F(X) = |G(1)|). It is recommended, that the most difficult constraint is formulated as objective (rather than as constraint) and MIDACO is called with the ORACLE parameter. As in such a scenario the objective function actually expresses an equality constraint, an appropriate ORACLE parameter is easy to select close to zero (e.g. 0.05 or 0.1).

How to run MIDACO silently  [ = no printing ] ?

Set the option PRINTEVAL= 0. This will disable the printing commands.

How to pass additional arguments to the problem function ?

In general, using global variables for passing additional arguments from and to the problem function is recommended. Another possibility is to modify the problem function call directly, see below:


Because MIDACO is called by reverse communication, the problem function calls can be directly accessed by the user in the example files (Python, C/C++ or Fortran) or in the midaco.m file in Matlab/Octave. If necessary, the user can pass additional input/output arguments at any occurrence, where the problem function is called.

How to rename the problem function ?

Because MIDACO is called by reverse communication, the problem function calls can be directly accessed by the user in the example files (Python, C/C++ or Fortran) or in the midaco.m file in Matlab/Octave. If necessary, the user can freely rename those function calls to any arbitrary name.

Matlab / Octave: Is the MEX command required ever time, when running MIDACO ?

No. The MEX command "mex midacox.c" is required only one time at the beginning.

Once the MIDACO DLL/MEX file is generated on your system, you will not need to perform this command again.


How to cite MIDACO?

In case you wish to cite the MIDACO software in a publication,  you may use:


Schlueter M., Gerdts M., Rückmann J.J.
A Numerical Study of MIDACO on 100 MINLP Benchmarks.
Optimization (Taylor & Francis), Vol 61, Issue 7, Pages 873-900  (2012)


In case you wish to particular cite the extended ACO algorithm within MIDACO, you may use:


Schlueter M., Egea J. A., Banga J. R.
Extended Ant Colony Optimization for non-convex Mixed Integer Nonlinear Programming
Computers & Operations Research (Elsevier), Vol. 36 , Issue 7, Pages 2217-2229 (2009)


In case you wish to particular cite the constraint handling technique within MIDACO, you may use:


Schlueter M., Gerdts, M. 
The Oracle Penalty Method 
Journal of Global Optimization (Springer), Vol. 47, Issue 2, Pages 293-325 (2010)


Thank you for citing MIDACO !