linopy.objective.Objective#
- class linopy.objective.Objective(expression, model, sense='min')#
An objective expression containing all relevant information.
- __init__(expression, model, sense='min')#
Methods
__init__(expression, model[, sense])assign(**fields)Wrapper for the expression <function assign_multiindex_safe at 0x790f0edb6340> function for linopy.Objective.
sel([indexers, method, tolerance, drop])Wrapper for the expression <function Dataset.sel at 0x790f0edb6c00> function for linopy.Objective.
set_value(value)Sets the value of the objective.
to_matrix(*args, **kwargs)Wrapper for expression.to_matrix
to_polars(**kwargs)Returns the objective as a polars DataFrame.
Attributes
attrsReturns the attributes of the objective.
coeffsReturns the coefficients of the objective.
coordsReturns the coordinates of the objective.
dataReturns the data of the objective.
Returns the expression of the objective.
flatReturns the flattened objective.
indexesReturns the indexes of the objective.
Whether the objective expression is linear.
Whether the objective expression is quadratic.
modelReturns the model of the objective.
ntermReturns the number of terms in the objective.
Returns the sense of the objective.
sizesReturns the sizes of the objective.
Returns the value of the objective.
varsReturns the variables of the objective.