14.3.3 Class BoundInterfaceConstraint¶
- mosek.fusion.BoundInterfaceConstraint¶
Interface to either the upper bound or the lower bound of a ranged constraint.
This class is never explicitly instantiated; is is created by a
RangedConstraint
to allow accessing a bound value and the dual variable value corresponding to the relevant bound as a separate object. The constraint\[b_l \leq a^T x \leq b_u\]has two bounds and two dual variables; these are not immediately available through the
RangedConstraint
object, but can be accessed through aBoundInterfaceConstraint
.- Implements:
- Members:
BoundInterfaceConstraint.dual – Get the dual solution values of the constraint.
BoundInterfaceConstraint.index – Get a single element from a one-dimensional constraint.
BoundInterfaceConstraint.slice – Create a slice constraint.
Constraint.getModel – Return the model that the constraint belongs to.
Constraint.getND – Return the number of dimensions in the constraint shape.
Constraint.getShape – Return the constraint’s shape.
Constraint.getSize – Return the total number of elements in the constraint.
Constraint.level – Get the primal solution values of the constraint.
Constraint.remove – Remove the constraint from the model.
Constraint.update – Update part of a constraint.
SliceConstraint.toString – Create a human readable string representation of the constraint.
- BoundInterfaceConstraint.dual¶
dual() -> float[]
Get the dual solution value of the constraint as an array.
- Return:
(
float
[])
- BoundInterfaceConstraint.index¶
index(int idx) -> Constraint index(int[] idxa) -> Constraint
Get a single element from a one-dimensional constraint.
- Parameters:
idx
(int
) – The element index.idxa
(int
[]) – Array of integer coordinates in each dimension.
- Return:
- BoundInterfaceConstraint.slice¶
slice(int first, int last) -> Constraint slice(int[] firsta, int[] lasta) -> Constraint
Create a slice constraint.
- Parameters:
first
(int
) – Index of the first element in the slice.last
(int
) – Index of the first element after the end of the slice.firsta
(int
[]) – The indexes of first elements in the slice along each dimension.lasta
(int
[]) – The indexes of first elements after the end of the slice along each dimension.
- Return: