ParameterizedLinearStandardFormCompiler

(class from pyomo.repn.plugins.parameterized_standard_form)

class pyomo.repn.plugins.parameterized_standard_form.ParameterizedLinearStandardFormCompiler[source]

Bases: LinearStandardFormCompiler

Compiler to convert a “Parameterized” LP to the matrix representation of the standard form:

\[\begin{split}\min\ & c^Tx \\ s.t.\ & Ax \le b\end{split}\]

by treating the variables specified in the wrt list as data (constants). The resulting compiled representation is returned as NumPy arrays and SciPy sparse matrices in a LinearStandardFormInfo .

__init__()

Methods

__init__()

write(model[, ostream])

Convert a model to standard form treating the Vars specified in wrt as data.

Attributes

CONFIG

Member Documentation

write(model, ostream=None, **options)[source]

Convert a model to standard form treating the Vars specified in wrt as data.

Return type:

LinearStandardFormInfo

Parameters:
  • model (ConcreteModel) – The concrete Pyomo model to write out.

  • ostream (None) – This is provided for API compatibility with other writers and is ignored here.

Keyword Arguments:
  • nonnegative_vars (bool, default=False) – Convert all variables to be nonnegative variables

  • slack_form (bool, default=False) – Add slack variables and return \(\min c^Tx; s.t. Ax = b\)

  • mixed_form (bool, default=False) – Return A in mixed form (the comparison operator is a mix of <=, ==, and >=)

  • set_sense (InEnum[ObjectiveSense], default=<ObjectiveSense.minimize: 1>) – If not None, map all objectives to the specified sense.

  • show_section_timing (bool, default=False) – Print timing after each stage of the compilation process

  • file_determinism (InEnum[FileDeterminism], default=<FileDeterminism.ORDERED: 10>) –

    How much effort do we want to put into ensuring the resulting matrices are produced deterministically:

    • NONE (0): None

    • ORDERED (10): rely on underlying component ordering (default)

    • SORT_INDICES (20) : sort keys of indexed components

    • SORT_SYMBOLS (30) : sort keys AND sort names (not declaration order)

  • row_order (optional) – List of constraints in the order that they should appear in the resulting A matrix. Unspecified constraints will appear at the end.

  • column_order (optional) – List of variables in the order that they should appear in the compiled representation. Unspecified variables will be appended to the end of this list.

  • wrt (ComponentDataSet(Var), optional) –

    Optional list of Vars to be treated as data while compiling the standard form.

    For example, if this is the standard form of an inner problem in a multilevel optimization problem, then the outer problem’s Vars would be specified in this list since they are not variables from the perspective of the inner problem.