14.2.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 a BoundInterfaceConstraint.

Implements:

SliceConstraint

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
double[] Dual()

Get the dual solution value of the constraint as an array.

Return:

(double[])

BoundInterfaceConstraint.Index
Constraint Index(int idx)
Constraint Index(int[] idxa)

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:

(Constraint)

BoundInterfaceConstraint.Slice
Constraint Slice(int first, int last)
Constraint Slice(int[] firsta, int[] lasta)

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:

(Constraint)