14.1 Fusion API conventions

14.1.1 General conventions

All the classes of the Fusion interface are contained in the package mosek.fusion. The user should not directly instantiate objects of any class other than creating a Model.

M = Model()
M = Model('modelName')

with Model() as M:

The model is the main access point to an optimization problem and its solution. All other objects should be created through the model (Model.variable, Model.constraint, etc.) or using static factory methods (Matrix.sparse etc.).

14.1.2 Numerical types

Whenever a method expects a numeric or integer array, this can be either a Python list or a NumPy array of appropriate shape.

For NumPy arrays the element type must agree exactly with the type expected by the method, for instance for an argument of type float[] one can pass an array of type numpy.array(dtype=float) but not of type numpy.array(dtype=int).

For sparse arrays use a Matrix created with Matrix.sparse.