MAiNGO
MAiNGO Output

Depending on the settings, MAiNGO may produce different types of output printed to the screen or written into files. These are described in the following sections. When using the C++ API of MAiNGO (or its Python equivalent), there are also various functions for querying all results and statistics from the MAiNGO object in code. These are not covered here. Please refer to the documentation of the MAiNGO class and the file examples/mainCppApi.cpp instead.

Logging Output

Depending on the setting loggingDestination, MAiNGO will write information on the progress and solution to the screen or to a log file (called maingo.log by default). This logging information typically looks something like this:

|************************************************************************************************************************
|* *
|* You are using MAiNGO v0.4.0 *
|* *
|* Please cite the latest MAiNGO report from http://permalink.avt.rwth-aachen.de/?id=729717 : *
|* Bongartz, D., Najman, J., Sass, S. and Mitsos, A., MAiNGO - McCormick-based Algorithm for mixed-integer Nonlinear *
|* Global Optimization. Technical Report, Process Systems Engineering (AVT.SVT), RWTH Aachen University (2018). *
|* *
|************************************************************************************************************************
|
| Read settings from file MAiNGOSettings.txt.
| Settings set by the user:
| epsilonA 0.01
| epsilonR 0.01
| Done.
|
| Pre-processing at root node:
| Initialize subsolvers...
| Multistart: IPOPT
| Upper bounding: SLSQP
| Lower bounding: CPLEX
| Constraint propagation...
| Optimization-based bound tightening (feasibility only)...
| Multistart local searches...
| User-specified initial point is feasible with objective value 4.35581
| Constraint propagation...
| Optimization-based bound tightening (feasibility and optimality)...
| CPU time: 0.015 s.
| Done.
|
| Entering branch-and-bound loop:
| Iteration LBD UBD NodesLeft AbsGap RelGap CPU
| 1 -3.108624e-15 4.355813e+00 2 4.355813e+00 1.000000e+00 1.500000e-02
| 5 4.355812e+00 4.355813e+00 0 1.227713e-06 2.818562e-07 1.500000e-02
| Done.
|
|************************************************************************************************************************
|* *
|* *** Regular termination. *** *
|* *
|************************************************************************************************************************
|
| Problem statistics:
| Variables = 2
| Thereof continuous = 1
| Thereof binary = 1
| Inequality constraints = 1
| Equality constraints = 1
|
| Solution statistics:
| Total UBD problems solved = 2
| Total LBD problems solved = 5
| Total number of iterations = 5
| Maximum number of nodes in memory = 3
| Best solution: First found at iteration 0
|
|===================================================================
|
| Final LBD = 4.355811692854402
| Final absolute gap = 1.227712946416659e-06
| Final relative gap = 2.818562157753893e-07
|
| Objective value = 4.355812920567349
| Solution point:
| x = 0
| y = -1
|
|===================================================================
|
| Additional Model outputs:
| Result of temp1: = -0.1414213562373095
|
|===================================================================
|
| CPU time: 0.015 seconds (Preprocessing + B&B).
| Wall-clock time: 0.061 seconds (Preprocessing + B&B).

First, MAiNGO lists the version you are using together with a note how to cite the software. This is followed by settings read from the settings file (here: MAiNGOSettings.txt, which is also the default settings file name), if such a file could be found.

The actual algorithm starts at the line Pre-processing at root node:, first listing all pre-processing steps. Under the line Initialize subsolvers, the subsolvers used for the current run are listed. After the line Entering branch-and-bound loop:, MAiNGO lists the current number of iterations, the current proven lower bound, the objective value of the current best feasible point, the number of nodes left in the branch-and-bound tree, the current absoulte and relative gaps and the CPU time required until now. For a more detailed description of the algorithm, please refer to the How does MAiNGO work? page. The algorithm finishes with the statement Regular termination..

After the algorithm terminates, problem statistics such as the number and type of variables and constraints are listed. After the first === sign, the final objective value, the solution point and the final lower bound and optimality gaps are listed. Any additional model outputs are listed thereafter followed by the CPU and wall clock times.

Results File

If the setting writeResultFile is set to true, MAiNGO writes a file containing information on the optimal solution. By default, it is called MAiNGOresult.txt. It contains the values of the optimization variables along with their bounds, and lists the values of all constraint residuals evaluated at the final solution point. The MAiNGOresult.txt file should look something like this:

variables lower bound solution point upper bound
x 0 0 1
y -2 1 2
-------------------------------------------------------------------------------------------------------------
objective value 4.355812920567349
-------------------------------------------------------------------------------------------------------------
inequalities value at bound tolerance = 1e-06
x <= 1 -1
-------------------------------------------------------------------------------------------------------------
equalities value tolerance = 1e-06
circle equality 0

If a constraint is fulfilled only within given tolerances, e.g., an equality constraint with absolute value less than or equal to the given feasibility tolerance, it is marked with an asterisk (*). If a constraint is violated at the final solution point, it is marked with the keyword VIOLATED. Usually, this should not happen. If it does, it may either be that your model contains an invalid relaxation-only constraint, or that there are numerical issues. If you feel like something is wrong, please contact the developers at MAiNG.nosp@m.O@av.nosp@m.t.rwt.nosp@m.h-aa.nosp@m.chen..nosp@m.de.

Alternative Output Files

Beyond the two main outputs format described above, MAiNGO is able to write output in csv and json format. These outputs can be enabled via the settings writeCsv and writeJson, respectively. The csv output is divided into to files, called statisticsAndSolution.csv and iterations.csv by default. The former contains the solution point and statistics about the problem and the solution procedure. The latter contains the same information on the individual B&B iterations as the log file, but in csv format. The json output file is called statisticsAndSolution.json by default and also contains the solution point and various statistics.