MindOpt
2.3.0

Contents:

  • 1. Introduction
  • 2. Overview
    • 2.1. Quick Start
      • 2.1.1. Overview of Solving Capabilities
      • 2.1.2. Acquisition and Deployment
      • 2.1.3. Usage and Modeling Tools
      • 2.1.4. Case Examples and Learning Tools
    • 2.2. Change Log
      • 2.2.1. v2.3.0
      • 2.2.2. v2.2.0
      • 2.2.3. V2.1.2
      • 2.2.4. V2.1.1
      • 2.2.5. V2.1.0
      • 2.2.6. V2.0.0
      • 2.2.7. V1.3.0
      • 2.2.8. V1.2.1
      • 2.2.9. V1.2.0
      • 2.2.10. V1.1.0
      • 2.2.11. V1.0.1
      • 2.2.12. V1.0.0
      • 2.2.13. V0.25.0
      • 2.2.14. V0.24.1
      • 2.2.15. V0.24.0
      • 2.2.16. V0.23.1
      • 2.2.17. V0.23.0
      • 2.2.18. Previous version
    • 2.3. License Agreement
      • 2.3.1. MindOpt Solver
      • 2.3.2. ZLIB
      • 2.3.3. BZLIB2
      • 2.3.4. Intel MKL
      • 2.3.5. Sphinx
      • 2.3.6. JSON for C++
      • 2.3.7. Cereal
      • 2.3.8. CURL
      • 2.3.9. TFlite
  • 3. Installation
    • 3.1. Support platform and software and hardware requirements
    • 3.2. Installer Download
    • 3.3. Installation Instructions
      • 3.3.1. Windows Platform
      • 3.3.2. Linux Platform
      • 3.3.3. macOS Platform
    • 3.4. Directory Structure
    • 3.5. License Setup
      • 3.5.1. License Acquisition
      • 3.5.2. License Configuration
      • 3.5.3. Windows Platform
      • 3.5.4. Linux & macOS Platforms
      • 3.5.5. Common Error Codes
      • 3.5.6. Frequently Asked Questions
  • 4. Command-Line & API
    • 4.1. Command Line
      • 4.1.1. Brief Description
      • 4.1.2. An Example
      • 4.1.3. Input File Format
      • 4.1.4. Parameter Settings
      • 4.1.5. Data Desensitization
    • 4.2. Call MindOpt with C
      • 4.2.1. Edit .c File
      • 4.2.2. Compile on Linux Platform
      • 4.2.3. Compile on macOS Platform
      • 4.2.4. Compile on Windows Platform
    • 4.3. Call MindOpt with C++
      • 4.3.1. Edit .cpp File
      • 4.3.2. Compile on Linux Platform
      • 4.3.3. Compile on macOS Platform
      • 4.3.4. Compile on Windows Platform
    • 4.4. Call MindOpt with Python
      • 4.4.1. Install mindoptpy Library
      • 4.4.2. Edit .py File
      • 4.4.3. Execution on Windows Platform
      • 4.4.4. Execution on Linux and macOS
    • 4.5. Call MindOpt with JAVA
      • 4.5.1. Edit .java File
      • 4.5.2. Compile on Linux and macOS Platforms
      • 4.5.3. Compile on Windows Platform
    • 4.6. Call MindOpt with C#
      • 4.6.1. Edit .cs File
      • 4.6.2. Compile on Linux and macOS Platforms
      • 4.6.3. Compile on Windows Platform
    • 4.7. Call MindOpt with MATLAB
      • 4.7.1. Edit .m File
      • 4.7.2. Execution on Linux
      • 4.7.3. Execution on macOS
      • 4.7.4. Execution on Windows
  • 5. Modeling and Optimization
    • 5.1. Linear Programming (LP)
      • 5.1.1. Modeling for Linear Programming
      • 5.1.2. LP Modeling and Optimization in C
      • 5.1.3. LP Modeling and Optimization in C++
      • 5.1.4. LP Modeling and Optimization in JAVA
      • 5.1.5. LP Modeling and Optimization in Python
      • 5.1.6. LP Modeling and Optimization in C#
    • 5.2. Mixed-Integer Linear Programming (MILP)
      • 5.2.1. Modeling for Mixed-Integer Linear Programming
      • 5.2.2. MILP Modeling and Optimization in C
      • 5.2.3. MILP Modeling and Optimization in C++
      • 5.2.4. MILP Modeling and Optimization in JAVA
      • 5.2.5. MILP Modeling and Optimization in Python
      • 5.2.6. MILP Modeling and Optimization in C#
      • 5.2.7. MILP Warmstart
      • 5.2.8. General Constraints in MILP
      • 5.2.9. MILP Solution Pool
    • 5.3. Quadratic Programming (QP)
      • 5.3.1. Modeling for Quadratic Programming
      • 5.3.2. QP Modeling and Optimization in C
      • 5.3.3. QP Modeling and Optimization in C++
      • 5.3.4. QP Modeling and Optimization in JAVA
      • 5.3.5. QP Modeling and Optimization in Python
      • 5.3.6. QP Modeling and Optimization in C#
    • 5.4. Quadratically Constrained Programming (QCP)
      • 5.4.1. Modeling for Quadratically Constrained Programming
      • 5.4.2. QCP Modeling and Optimization in C
      • 5.4.3. QCP Modeling and Optimization in C++
      • 5.4.4. QCP Modeling and Optimization in Python
      • 5.4.5. QCP Modeling and Optimization in Java
      • 5.4.6. QCP Modeling and Optimization in C#
    • 5.5. Mixed Integer Quadratic Programming (MIQP)
      • 5.5.1. Modeling for Mixed Integer Quadratic Programming
      • 5.5.2. MIQP Modeling and Optimization in C
      • 5.5.3. MIQP Modeling and Optimization in C++
      • 5.5.4. MIQP Modeling and Optimization in Python
      • 5.5.5. MIQP Modeling and Optimization in JAVA
      • 5.5.6. MIQP Modeling and Optimization in C#
    • 5.6. Mixed-Integer Quadratically Constrained Programming (MIQCP)
      • 5.6.1. Modeling for Mixed Integer Quadratically Constrained Programming
      • 5.6.2. MIQCP Modeling and Optimization in C
      • 5.6.3. MIQCP Modeling and Optimization in C++
      • 5.6.4. MIQCP Modeling and Optimization in Python
      • 5.6.5. MIQCP Modeling and Optimization in Java
      • 5.6.6. MIQCP Modeling and Optimization in C#
      • 5.6.7. MISOCP Modeling and Optimization in C
      • 5.6.8. MISOCP Modeling and Optimization in C++
      • 5.6.9. MISOCP Modeling and Optimization in Python
      • 5.6.10. MISOCP Modeling and Optimization in Java
      • 5.6.11. MISOCP Modeling and Optimization in C#
    • 5.7. Semi-Definite Programming (SDP)
      • 5.7.1. Modeling for Semi-Definite Programming
      • 5.7.2. SDP Modeling and Optimization in C
      • 5.7.3. SDP Modeling and Optimization in C++
      • 5.7.4. SDP Modeling and Optimization in JAVA
      • 5.7.5. SDP Modeling and Optimization in Python
      • 5.7.6. SDP Modeling and Optimization in C#
    • 5.8. Non-Linear Programming (NLP)
      • 5.8.1. Non-linear Programming Modeling
      • 5.8.2. Modeling and Optimization Based on MAPL
      • 5.8.3. Modeling and Optimization Based on MaplPy
  • 6. Advanced Modeling Tools
    • 6.1. Irreducible Inconsistent Subsystem (IIS)
      • 6.1.1. IIS Computation in C
      • 6.1.2. IIS Computation in C++
      • 6.1.3. IIS Computation in Python
    • 6.2. Callback
      • 6.2.1. Callback API
      • 6.2.2. Callback Code
      • 6.2.3. Callback SDK
      • 6.2.4. Example
    • 6.3. Using CUDA to accelerate optimization(PDLP)
      • 6.3.1. CUDA calling method
      • 6.3.2. GPU/CUDA requirements
      • 6.3.3. CUDA error codes
    • 6.4. Multi-Objective Optimization
      • 6.4.1. User Interface
      • 6.4.2. Computational Logic
  • 7. Modeling Languages for MindOpt
    • 7.1. Modeling and Optimization with MindOpt APL
      • 7.1.1. Try MAPL Locally
      • 7.1.2. Try MAPL on the Cloud
      • 7.1.3. Set MindOpt Parameters with MAPL
      • 7.1.4. An Example of MAPL
    • 7.2. Modeling and Optimization with AMPL
      • 7.2.1. Install mindoptampl
      • 7.2.2. Install AMPL
      • 7.2.3. Parameters and Return Values
      • 7.2.4. An Example of AMPL Calling MindOpt
    • 7.3. Modeling and Optimization with CVXPY
      • 7.3.1. Installing CVXPY
      • 7.3.2. CVXPY Interface
      • 7.3.3. Example: cvxpy_mip_finance
    • 7.4. Modeling and Optimization with Pyomo
      • 7.4.1. Install Pyomo
      • 7.4.2. Pyomo Interface
      • 7.4.3. SOS Function
      • 7.4.4. Callback Function
      • 7.4.5. Modeling Example: mdo_pyomo_lo_ex1
    • 7.5. Modeling and Optimization with PuLP
      • 7.5.1. Install PuLP
      • 7.5.2. PuLP Interface
      • 7.5.3. Modeling Example: mdo_pulp_lo_ex1
    • 7.6. Modeling and Optimization with JuMP
      • 7.6.1. Install JuMP
      • 7.6.2. JuMP Interface
      • 7.6.3. Modeling Example: jump_lp_ex1
  • 8. API
    • 8.1. Attributes
      • 8.1.1. Model attributes
      • 8.1.2. Variable attributes
      • 8.1.3. Constraint attributes
      • 8.1.4. Quadratic constraint attributes
      • 8.1.5. General constraint attributes
      • 8.1.6. PSD variable attributes
      • 8.1.7. PSD constraint attributes
    • 8.2. Parameters
      • 8.2.1. Int parameters
      • 8.2.2. Double parameters
      • 8.2.3. String parameters
    • 8.3. Constants
      • 8.3.1. status
      • 8.3.2. errors
    • 8.4. C API
      • 8.4.1. Attribute Accessor
      • 8.4.2. Parameter Accessor
      • 8.4.3. Environment
      • 8.4.4. Model Operations
      • 8.4.5. Callback
      • 8.4.6. Examples
    • 8.5. C++ API
      • 8.5.1. MDOException
      • 8.5.2. MDOMatrix
      • 8.5.3. MDOVar
      • 8.5.4. MDOConstr
      • 8.5.5. MDOQConstr
      • 8.5.6. MDOSOS
      • 8.5.7. MDOGenConstr
      • 8.5.8. MDOPsdVar
      • 8.5.9. MDOPsdConstr
      • 8.5.10. MDOLinExpr
      • 8.5.11. MDOQuadExpr
      • 8.5.12. MDOPsdExpr
      • 8.5.13. MDOColumn
      • 8.5.14. MDOTempConstr
      • 8.5.15. MDOEnv
      • 8.5.16. MDOModel
      • 8.5.17. MDOCallback
      • 8.5.18. Examples
    • 8.6. JAVA API
      • 8.6.1. MDOException
      • 8.6.2. MDOMatrix
      • 8.6.3. MDOEnv
      • 8.6.4. MDOPsdExpr
      • 8.6.5. MDOConstr
      • 8.6.6. MDOQConstr
      • 8.6.7. MDOSOS
      • 8.6.8. MDOGenConstr
      • 8.6.9. MDOPsdConstr
      • 8.6.10. MDOPsdVar
      • 8.6.11. MDOColumn
      • 8.6.12. MDOVar
      • 8.6.13. MDOModel
      • 8.6.14. MDOLinExpr
      • 8.6.15. MDOQuadExpr
      • 8.6.16. MDOCallback
      • 8.6.17. Get mindoptj
      • 8.6.18. Examples
    • 8.7. Python API
      • 8.7.1. Global functions
      • 8.7.2. Matrix friendly functions
      • 8.7.3. MindoptError
      • 8.7.4. tuplelist
      • 8.7.5. tupledict
      • 8.7.6. Var
      • 8.7.7. MVar
      • 8.7.8. PsdVar
      • 8.7.9. Constr
      • 8.7.10. QConstr
      • 8.7.11. SOS
      • 8.7.12. GenConstr
      • 8.7.13. MConstr
      • 8.7.14. MQConstr
      • 8.7.15. PsdConstr
      • 8.7.16. TempConstr
      • 8.7.17. Column
      • 8.7.18. LinExpr
      • 8.7.19. QuadExpr
      • 8.7.20. MLinExpr
      • 8.7.21. MQuadExpr
      • 8.7.22. PsdExpr
      • 8.7.23. Env
      • 8.7.24. Model
      • 8.7.25. Examples
    • 8.8. C# API
      • 8.8.1. MDOException
      • 8.8.2. MDOMatrix
      • 8.8.3. MDOEnv
      • 8.8.4. MDOPsdExpr
      • 8.8.5. MDOConstr
      • 8.8.6. MDOQConstr
      • 8.8.7. MDOSOS
      • 8.8.8. MDOGenConstr
      • 8.8.9. MDOPsdConstr
      • 8.8.10. MDOPsdVar
      • 8.8.11. MDOColumn
      • 8.8.12. MDOVar
      • 8.8.13. MDOModel
      • 8.8.14. MDOLinExpr
      • 8.8.15. MDOQuadExpr
      • 8.8.16. MDOCallback
      • 8.8.17. Examples
    • 8.9. MATLAB API
      • 8.9.1. MATLAB functions
      • 8.9.2. model
      • 8.9.3. Examples
  • 9. Input and Output
    • 9.1. Model Files
      • 9.1.1. MPS File Format
      • 9.1.2. QPS File
      • 9.1.3. REW File
      • 9.1.4. DUA File
      • 9.1.5. LP File Format
      • 9.1.6. ILP File
      • 9.1.7. RLP File
      • 9.1.8. DLP File
    • 9.2. Solution-related Files
      • 9.2.1. BAS File
      • 9.2.2. SOL File
      • 9.2.3. MST File
    • 9.3. Other Files
      • 9.3.1. PRM Files
  • 10. Contact Us
MindOpt
  • »
  • 9. Input and Output »
  • 9.2. Solution-related Files

9.2. Solution-related Files¶

After using MindOpt to solve, the obtained optimal solution or feasible solution can be output to a file.

File Type

Model Type

Description

BAS

LP

Basis status of variables and constraints

SOL

LP & MIP

Solution of variables

MST

MIP

Solution of discontinuous variables

9.2.1. BAS File¶

After successfully solving a linear programming problem, the basis status of each variable in the primal problem and each variable in the dual problem can be written to a file using the bas file format. A bas file can also be read before solving a linear programming problem to initialize a basis status for the solver.

A bas file contains multiple lines. The first line records the model name

NAME             : foo

The first line starts with a keyword NAME, followed by : and a space, with the rest of the line recording the model name.

The next lines record the basis status of dual problem variables, i.e., RowBasis, with each line corresponding to one variable in the dual problem. For example:

FR R0

As can be seen, this line contains a status code FR and a constraint name R0, indicating that the dual variable corresponding to constraint R0 has a basis status of “free”.

The correspondence of basis status codes is shown in the following table:

Code

Status Meaning

FR

isFree

BS

basic

UU

atUpperBound

UL

atLowerBound

SB

superBasic

EQ

isFixed

UK

unknown

The following multiple lines record the basis status of primal problem variables, i.e., ColBasis, with each line corresponding to one variable. For example:

BS C0

This indicates that variable C0 is a basic variable.

Note

Lines recording basis status should start with a space, i.e., indented by 1 space.

Finally, the bas file ends with an unindented ENDATA.

ENDATA

9.2.2. SOL File¶

After successfully solving with MindOpt, the solutions of the primal and dual problems can be output to a sol file. A sol file contains three parts of information:

  • Model information, including name, objective function values of primal and dual problems, etc.

  • Variable solutions

  • Dual variable solutions

First is the model information, for example:

NAME             : foo
PRIMAL OBJECTIVE : -4.88569887318817E+00
DUAL OBJECTIVE   : -4.88569887318827E+00
PROBLEM STATUS   : OPTIMAL

Contains four lines, each with two fields separated by :. They represent respectively:

  • Model name

  • Primal problem objective function value

  • Dual problem objective function value

  • Solution status

Next is a blank line, followed by multiple lines of variable solutions (i.e., X):

VARIABLES
C0                                       +4.76048966504162E-01
C1                                       +8.73391945822582E-01
C2                                       +0.00000000000000E+00
C3                                       +3.36918727744315E-01
C4                                       +8.96258337238064E-01
C5                                       +6.36894231964933E-01
C6                                       +8.62158935460491E-01

Variable solutions start with “VARIABLES” on a separate line. The first field of each line is the variable name, and the second field is the variable’s solution.

Next is another blank line, followed by multiple lines of dual variable solutions (i.e., DualSoln):

CONSTRAINTS
c0                                       -1.32829351698292E-01
c1                                       -4.53378851617045E-01
c2                                       +1.07104207431984E-01
c3                                       +6.87509566168726E-01
c4                                       +6.09393433447014E-03
c5                                       -2.88026626252556E-01
c6                                       +1.56943391710642E+00

Dual variable solutions start with “CONSTRAINTS” on a separate line. The first field of each line is the constraint name, and the second field is the solution of the dual variable corresponding to that constraint.

9.2.3. MST File¶

MST files are designed to implement warm starts for MIP problems. After solving a mixed integer programming problem, we can output the current integer variable solutions to a file to use as initial solutions for another problem.

Since mixed integer programming is typically much slower than linear programming, determining solutions for integer variables is more difficult than for continuous variables. To reduce file size, mst files only record solutions for integer variables. Moreover, providing solutions for all integer variables is not mandatory, as the solver will attempt to infer the missing values.

mst files are designed to be easy to edit and modify manually, with a very simple format. They contain multiple lines, each recording the solution of one integer variable, such as:

# Solutions
c0 0
c1 1
c2 0

This records the solutions for three integer variables c0, c1, and c2. Any line starting with # will be treated as a comment and ignored.

However, reading an initial solution from a file for warm start before solving a problem does not necessarily take effect. In any case, the solver will only treat this initial solution as a reference.

Reading an mst file containing some variables is equivalent to setting Start for these variables.

Next Previous

© Copyright 2026. Last updated on Feb 02, 2026.

Built with Sphinx using a theme provided by Read the Docs.