14.2.23 Class ModelConstraint

mosek.fusion.ModelConstraint

Base class for all constraints that directly corresponds to a block of constraints in the underlying task, i.e. all objects created from Model.Constraint.

Implements:

Constraint

Members:

Constraint.Dual – Get the dual solution values of the 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.Index – Get a single element from a constraint.

Constraint.Level – Get the primal solution values of the constraint.

Constraint.Slice – Create a slice constraint.

Constraint.Update – Update part of a constraint.

ModelConstraint.Remove – Remove the constraint from the model.

ModelConstraint.ToString – Create a human readable string representation of the constraint.

Implemented by:

LinearConstraint, ConicConstraint, RangedConstraint, PSDConstraint, LinearPSDConstraint

ModelConstraint.Remove
void Remove()

Remove the constraint from the model. Using the constraint object after this method has been called results in undefined behavior.

ModelConstraint.ToString
string ToString()

Create a human readable string representation of the constraint.

Return:

(string)