Try our new documentation site (beta).


OPB format

The OPB file format is used to store pseudo-boolean satisfaction and pseudo-boolean optimization models. These models may only contain binary variables, but these variables may be complemented and multiplied together in constraints and objectives. Pseudo-boolean models in OPB files are translated into a MIP representation by Gurobi. The syntax of the OPB format is described in detail by Roussel and Manquinho. However, the OPB format supported by Gurobi is less restrictive, e.g., fractional coefficients are allowed.

The following is an example of a pseduo-boolean optimization model

\begin{displaymath}
\begin{array}{ll}
\mathrm{minimize} & y - 1.3 x (1-z) + (1-z...
... \
& -y \le 0,\
& v, w, x, y, z \in \{0, 1\}.
\end{array}\end{displaymath} (1)

The corresponding OPB file for this example is given by
* This is a dummy pseduo-boolean optimization model
min: y - 1.3 x ~z + ~z;
2 y - 3 x + 1.7 w = 1.7;
-1 y + x + x z ~v >= 0;
-1 y <= 0;

Lines starting with * are treated as comments and ignored. Non-comment lines must end with a semicolon ;. Whitespaces must be used to separate variables. The complement of a variable may be specified with a tilde ~.

Only minimization models are supported. These models must be specified with the min: objective keyword. This keyword must appear before other constraints. Satisfiability models may be definied by omitting the objective.

Constraint senses >=, =, and <= are supported.

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search

Gurobi Optimization