Skip to content

Overview of Mathematical Optimization Library Relations

The following sections describe the functionality contained within rel:mathopt. Links to reference material are provided.

Defining Model Variables

RelationDescription
variablesDeclare the optimization model’s variables.
named_variablesDeclare the optimization model’s variables with names derived from the data provided.

Optimizing Models

You can use the following relation to optimize a model:

RelationDescription
optimizeOptimize a model relation.

Exporting Models

You can use the following relation to export a model to a desired file format. This is often useful when debugging models:

RelationDescription
exportExport the optimization model to a given file format as specified in a configuation relation.

Extracting Results

You can use the following relation to extract results from the information returned by the solver:

RelationDescription
extract_resultExtract the data returned by optimizating the model or exporting the model.

Model Configuration

Both optimize and export take an optional options parameter. This parameter is a relation that can be used to configure the model. The following relations can be used to configure the model:

RelationDescription
solverOptimize or export the model with a specified solver. The available embedded solvers are "HiGHS", "DAQP", and "Pavito". Support for "Gurobi" is currently under investigation.
solver_attributesSpecify the attributes of the solver used. Consult the requested solver docs for a list of available attributes.
file_formatSpecify the file format. The available file formats are "lp", "mps", "nl", and "mof".
Was this doc helpful?