Skip to content

FAQ

Frequently Asked Questions

How to cite MIDACO

If you wish to cite the MIDACO software, please use:

Schlueter M., Erb S., Gerdts M., Kemble S., Rückmann J.J.
MIDACO on MINLP Space Applications
Advances in Space Research (Elsevier), Vol 51, Issue 7, Pages 1116–1131 (2013) [BibTex]

If you wish to particularly cite the ACO algorithm within MIDACO, please 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) [BibTex]

If you wish to particularly cite the constraint handling technique of MIDACO, please use:

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

Thank you for citing MIDACO

How to set MIDACO parameters

Please see the User Manual on how to set MIDACO parameters. Note that MIDACO runs by default in some kind of “Autopilot” mode (all parameters set to zero) and it is not necessary to tune the parameters.

MIDACO 7 has 15 parameters (MIDACO 6 had 13). The two new parameters are PARAM(14) = SURROGATE and PARAM(15) = PMISQP:

PARAM( 1) = ACCURACY PARAM( 6) = FOCUS PARAM(11) = EPSILON
PARAM( 2) = SEED PARAM( 7) = ANTS PARAM(12) = BALANCE
PARAM( 3) = FSTOP PARAM( 8) = KERNEL PARAM(13) = CHARACTER
PARAM( 4) = ALGOSTOP PARAM( 9) = ORACLE PARAM(14) = SURROGATE
PARAM( 5) = EVALSTOP PARAM(10) = PARETOMAX PARAM(15) = PMISQP
How to run MIDACO silently [ disable all printing ]

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

Which output files does MIDACO create

If SAVE2FILE = 1 is set, MIDACO creates the text files MIDACO_SCREEN.TXT (a copy of the screen output), MIDACO_SOLUTION.TXT (the current best solution, updated with every printed line) and MIDACO_REPORT.TXT (new in MIDACO 7: tables on the performance of the internal algorithms, the agents, the solution and the sensitivity of the variables). For multi-objective problems the file MIDACO_PARETOFRONT.TXT is created in addition.

If SAVE2FILE is set to a value greater than one, MIDACO also creates the file MIDACO_HISTORY.TXT, which stores the history of evaluated solutions (up to as many as given by the value of SAVE2FILE; in case of parallelization SAVE2FILE counts blocks of P solutions).

If SAVE2FILE = 0 is set, no output file is created.

How does the ALGOSTOP criterion work in MIDACO 7

ALGOSTOP, PARAM(4), has a new meaning in MIDACO 7. If a positive whole number A is assigned to it, MIDACO stops by itself once its internal local solver PMISQP has arrived at the same solution A times in a row, without MIDACO’s best solution having improved in between. MIDACO then returns IFLAG = 3 (feasible solution) or IFLAG = 4 (infeasible solution). A larger value asks for more confirmation: it costs evaluations and buys confidence. ALGOSTOP = 10 is the recommended starting value.

ALGOSTOP needs PMISQP and therefore requires PARAM(15) = 0, 1 or 2. For applications with CPU-time expensive evaluation the EVALSTOP criterion is more appropriate. See the user manual for details.

How to pause and resume a MIDACO run

Set the printing option RESUMABLE = 1 (next to PRINTEVAL and SAVE2FILE). To pause a run, create a file named midaco.pause in the folder in which MIDACO writes its files. At the end of the current cycle MIDACO saves its complete state into the file midaco.workspace, prints the final solution and stops with IFLAG = 8.

To resume, start the same program again in the same folder with RESUMABLE = 1. MIDACO finds midaco.workspace, checks that it belongs to this problem (dimensions and PARAM must be identical) and continues the run exactly where it was paused. If the file cannot be loaded, MIDACO stops with IFLAG = 9 and writes the reason into the file midaco.resume_error.

Which programming languages are supported

MIDACO 7 is available for Fortran, C/C++, Python, MATLAB/Octave, Julia, Rust, C#, Java and R. Any other environment can use MIDACO via the Text-I/O interface. See the Download page.

How to pass additional input / output arguments to the problem function

A common way to pass additional arguments to the problem function is using global variables. This approach is independent of the MIDACO infrastructure and works well in many cases.

Another way to pass additional input/output arguments to the problem function can be realized by directly modifying the problem function call. An advantage of this approach is that it might result in (slightly) faster execution times, than using global variables. In the user manual, this direct modification approach is explained in Section 1.3.

How to rename the problem function

The problem function can easily be renamed to any name. See user manual Section 1.3

How to measure MIDACO run-time in milliseconds instead of seconds

In most programming languages the MIDACO run-time is displayed in seconds rather than in milliseconds. However, for many problems (esp. small-scale and benchmarks) MIDACO will reach a solution in less than a second. In case the runtime is desired in milliseconds in such cases, a simple approximation can be done.

For example: A problem requires 12,345 evaluation to be solved and the runtime is displayed as 0 seconds. Then a (much) larger number of evaluation (e.g. 10,000,000 evaluation) should be performed and the corresponding runtime should be noted (e.g. 30 seconds for 10,000,000 evaluation). Then the CPU runtime for the original (small) number of function evaluation can be approximated in milliseconds as follows:

12345 * ( 30 / 10000000 ) = 0.037035 seconds = 37 milliseconds
How to transform a maximization 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)
How to transform constraints into the MIDACO format

MIDACO assumes the inequality constraints in the following form:

G(X) >= 0

Any inequality constraint can be transformed into the above format.

Constraints of the form G(X) >= VALUE can be transformed as:

G(X) - VALUE >= 0

Constraints of the form G(X) <= VALUE can be transformed as:

VALUE - G(X) >= 0

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

G(X) - LOWER >= 0
UPPER - G(X) >= 0
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 (in esp. SQP) require the bounds to be scaled between zero and one, MIDACO does not have any such scaling restrictions. Lower and upper bounds can freely be chosen to any value. However, note 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 manual). Using specific starting points is recommended for solution refinement (e.g. improving the precision of the feasibility of constraints).

How to use several starting points

Several starting points can be submitted to MIDACO when running with parallelization (P > 1). By default, MIDACO expects only a single starting point: In MIDACO 7 the first call of the printing routine fills the block of P solution vectors automatically. The first slot keeps the starting point, the slots 2,…,P receive graded perturbations of it.

In case several user-defined starting points should be evaluated in the first block, they must be placed into the X array after this first printing call and before the first evaluation of the block. The array stores the P solution vectors one after another (see user manual, Section 8.7).

Using multiple starting points can be especially useful for CPU-time expensive applications and for multi-objective problems, where users can submit previously calculated Pareto points located in different regions of the Pareto front.

How to set a variable to be binary

Set the type of variable to be “integer” in the problem dimension step. Then set the lower bound XL = 0.0 and the upper bound XU = 1.0

What means "Violation of constraints G(X)"?

The “violation of G(X)” (VIO) measures the feasibility of the constraints. In particular, VIO is the L1-Norm (sum of all absolute values) 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, defined by PARAM(1).

How to solve problems, where a variable must be in a discrete set (e.g. catalog)

If an optimization variable should take a value from some discrete set (e.g. catalog) 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 } set to a custom value set { 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 from X(i) to some other (e.g. “Z”):

IF( X(i) == 1 ): Z1 = 0.3
IF( X(i) == 2 ): Z1 = 0.5
IF( X(i) == 3 ): Z1 = 0.7
IF( X(i) == 4 ): Z1 = 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 many languages (like C/C++ or Fortran) for return argument reasons.

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 MIDACO 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).

Does MIDACO require the objective functions to be scaled?

No. The objective function values can be passed “as is” to MIDACO. For example, the values of the first objective may vary somewhere between 0 and 1, while the second objective function values may vary drastically between -100000 and 100000. MIDACO will fully-automatically scale those values for its internal algorithmic process.

Assignment of balanced solution along the pareto front

The assignment (placement) of the MIDACO solution along the pareto front is done fully automatically and on-the-fly during the optimization process. This means that during the optimization process it can temporarily happen that the MIDACO solution is placed on a different part of the pareto front, as the expected one. For example, MIDACO is run by default and the solution is therefore expected to be placed in the centre of the pareto front, but it is instead placed somewhere close to the edge of the front. These miss-placements are part of the algorithmic process and will normally be quickly corrected by MIDACO. However, especially during the first ten’s or hundred’s of evaluation, those miss-placements may temporarily occur.

Does MIDACO support parallelization for multi-objective optimization?

Yes. MIDACO’s parallelization feature is fully available for all problem types, including multi-objective, large-scale and mixed integer problems. This means that in the extreme case, MIDACO can be used to solve:

Many-objective large-scale MINLP’s with massive parallelization

What are agents?

In MIDACO 7 the parallelization factor P is split over a number of agents: independent instances of the MIDACO search, each with its own random seed and its own part of the workspace, which exchange their best solution. Agent number a evaluates a of the P candidates, so P = 10 gives four agents with 1, 2, 3 and 4 candidates. The agents are not a user setting: P is the only knob, and P = 1 is a plain serial run with exactly one agent. The returned solution is always the best solution of all agents.

Because every agent needs a full workspace of its own, the workspace lengths LRW and LIW grow with P (see IFLAG 501 and 601 on the IFLAG Messages page).

Should parallelization be used?

Parallelization can be very effective, if the objectives and/or constraints evaluation is CPU-time expensive. This means that a single evaluation of F(X) and/or G(X) requires significant time. However, in case those evaluation is not CPU-time expensive, parallelization is normally not recommended. In fact, for CPU-time cheap problems, parallelization can even increase the overall time, due to the overhead introduced by the parallelization scheduler. In case of CPU-time cheap problems, executing several independent MIDACO runs with different random-seeds is normally more effective.

A special case occurs if the CPU-time for an evaluation can drastically vary. For example some evaluation may take up to some seconds/minutes, while others only take few milliseconds. In such case, parallel-overclocking with MIDACO can be a promising strategy (see user manual, section 8.8).