pyoptinterface.mosek package

class pyoptinterface.mosek.Env(*args, **kwargs)

Bases: object

close(self) None
putlicensecode(self, arg: collections.abc.Sequence[int], /) None
class pyoptinterface.mosek.Model(env=None)

Bases: RawModel

add_exp_cone_constraint(self, variables: collections.abc.Sequence[pyoptinterface._src.core_ext.VariableIndex], name: str = '', dual: bool = False) pyoptinterface._src.core_ext.ConstraintIndex
add_linear_constraint(expr: VariableIndex | ScalarAffineFunction | ExprBuilder, sense: ConstraintSense, rhs: float, name: str = '')
add_linear_constraint(con: ComparisonConstraint, name: str = '')
add_m_linear_constraints(A, x, sense, b)

add constraints Ax <= / = / >= b

A is a 2-dimensional numpy array or scipy sparse matrix x is an iterable of variables sense is one of (poi.Leq, poi.Eq, poi.Geq) b is an iterable of values or a single scalar

add_m_variables(shape: Tuple[int, ...] | int, domain: VariableDomain | None = None, lb: float | None = None, ub: float | None = None, name: str | None = None, start: float | None = None)
add_quadratic_constraint(expr: ScalarQuadraticFunction | ExprBuilder, sense: ConstraintSense, rhs: float, name: str = '')
add_quadratic_constraint(con: ComparisonConstraint, name: str = '')
add_second_order_cone_constraint(self, variables: collections.abc.Sequence[pyoptinterface._src.core_ext.VariableIndex], name: str = '', rotated: bool = False) pyoptinterface._src.core_ext.ConstraintIndex
add_variable(self, domain: pyoptinterface._src.core_ext.VariableDomain = VariableDomain.Continuous, lb: float = -1e+30, ub: float = 1e+30, name: str = '') pyoptinterface._src.core_ext.VariableIndex
add_variables(*coords: Collection, domain: VariableDomain | None = None, lb: float | None = None, ub: float | None = None, name: str | None = None, start: float | None = None)
close(self) None
delete_constraint(self, arg: pyoptinterface._src.core_ext.ConstraintIndex, /) None
delete_variable(self, arg: pyoptinterface._src.core_ext.VariableIndex, /) None
delete_variables(self, arg: collections.abc.Sequence[pyoptinterface._src.core_ext.VariableIndex], /) None
disable_log(self) None
get_constraint_attribute(constraint, attribute: ConstraintAttribute)
get_constraint_dual(self, arg: pyoptinterface._src.core_ext.ConstraintIndex, /) float
get_constraint_name(self, arg: pyoptinterface._src.core_ext.ConstraintIndex, /) str
get_constraint_primal(self, arg: pyoptinterface._src.core_ext.ConstraintIndex, /) float
get_model_attribute(attribute: ModelAttribute)
get_normalized_coefficient(self, arg0: pyoptinterface._src.core_ext.ConstraintIndex, arg1: pyoptinterface._src.core_ext.VariableIndex, /) float
get_normalized_rhs(self, arg: pyoptinterface._src.core_ext.ConstraintIndex, /) float
get_obj_sense(self) pyoptinterface._src.core_ext.ObjectiveSense
get_objective_coefficient(self, arg: pyoptinterface._src.core_ext.VariableIndex, /) float
get_raw_information(param_name: str)
get_raw_information_double(self, arg: str, /) float
get_raw_information_int(self, arg: str, /) int
get_raw_model(self) types.CapsuleType
get_raw_parameter(param_name: str)
get_raw_parameter_double(self, arg: str, /) float
get_raw_parameter_int(self, arg: str, /) int
get_raw_parameter_string(self, arg: str, /) str
get_value(self, arg: pyoptinterface._src.core_ext.VariableIndex, /) float
get_value(self, arg: pyoptinterface._src.core_ext.ScalarAffineFunction, /) float
get_value(self, arg: pyoptinterface._src.core_ext.ScalarQuadraticFunction, /) float
get_value(self, arg: pyoptinterface._src.core_ext.ExprBuilder, /) float
get_variable_attribute(variable, attribute: VariableAttribute)
get_variable_dual(self, arg: pyoptinterface._src.core_ext.VariableIndex, /) float
get_variable_lower_bound(self, arg: pyoptinterface._src.core_ext.VariableIndex, /) float
get_variable_name(self, arg: pyoptinterface._src.core_ext.VariableIndex, /) str
get_variable_type(self, arg: pyoptinterface._src.core_ext.VariableIndex, /) pyoptinterface._src.core_ext.VariableDomain
get_variable_upper_bound(self, arg: pyoptinterface._src.core_ext.VariableIndex, /) float
getdualobj(self) float
getnumcon(self) int
getnumvar(self) int
getprimalobj(self) float
getprosta(self) int
getsolsta(self) int
init(self, arg: pyoptinterface._src.mosek_model_ext.Env, /) None
is_constraint_active(self, arg: pyoptinterface._src.core_ext.ConstraintIndex, /) bool
is_variable_active(self, arg: pyoptinterface._src.core_ext.VariableIndex, /) bool
number_of_constraints(type: ConstraintType)
number_of_variables()
optimize(self) int
pprint(self, arg: pyoptinterface._src.core_ext.VariableIndex, /) str
pprint(self, expr: pyoptinterface._src.core_ext.ScalarAffineFunction, precision: int = 4) str
pprint(self, expr: pyoptinterface._src.core_ext.ScalarQuadraticFunction, precision: int = 4) str
pprint(self, expr: pyoptinterface._src.core_ext.ExprBuilder, precision: int = 4) str
raw_parameter_type(self, arg: str, /) int
set_constraint_attribute(constraint, attribute: ConstraintAttribute, value)
set_constraint_name(self, arg0: pyoptinterface._src.core_ext.ConstraintIndex, arg1: str, /) None
set_logging(self, arg: collections.abc.Callable[[str], None], /) None
set_model_attribute(attribute: ModelAttribute, value)
set_normalized_coefficient(self, arg0: pyoptinterface._src.core_ext.ConstraintIndex, arg1: pyoptinterface._src.core_ext.VariableIndex, arg2: float, /) None
set_normalized_rhs(self, arg0: pyoptinterface._src.core_ext.ConstraintIndex, arg1: float, /) None
set_obj_sense(self, arg: pyoptinterface._src.core_ext.ObjectiveSense, /) None
set_objective(self, expr: pyoptinterface._src.core_ext.ScalarQuadraticFunction, sense: pyoptinterface._src.core_ext.ObjectiveSense = ObjectiveSense.Minimize) None
set_objective(self, expr: pyoptinterface._src.core_ext.ScalarAffineFunction, sense: pyoptinterface._src.core_ext.ObjectiveSense = ObjectiveSense.Minimize) None
set_objective(self, expr: pyoptinterface._src.core_ext.ExprBuilder, sense: pyoptinterface._src.core_ext.ObjectiveSense = ObjectiveSense.Minimize) None
set_objective(self, expr: pyoptinterface._src.core_ext.VariableIndex, sense: pyoptinterface._src.core_ext.ObjectiveSense = ObjectiveSense.Minimize) None
set_objective(self, expr: float, sense: pyoptinterface._src.core_ext.ObjectiveSense = ObjectiveSense.Minimize) None
set_objective_coefficient(self, arg0: pyoptinterface._src.core_ext.VariableIndex, arg1: float, /) None
set_raw_parameter(param_name: str, value)
set_raw_parameter_double(self, arg0: str, arg1: float, /) None
set_raw_parameter_int(self, arg0: str, arg1: int, /) None
set_raw_parameter_string(self, arg0: str, arg1: str, /) None
set_variable_attribute(variable, attribute: VariableAttribute, value)
set_variable_bounds(self, variable: pyoptinterface._src.core_ext.VariableIndex, lb: float, ub: float) None
set_variable_lower_bound(self, arg0: pyoptinterface._src.core_ext.VariableIndex, arg1: float, /) None
set_variable_name(self, arg0: pyoptinterface._src.core_ext.VariableIndex, arg1: str, /) None
set_variable_primal(self, arg0: pyoptinterface._src.core_ext.VariableIndex, arg1: float, /) None
set_variable_type(self, arg0: pyoptinterface._src.core_ext.VariableIndex, arg1: pyoptinterface._src.core_ext.VariableDomain, /) None
set_variable_upper_bound(self, arg0: pyoptinterface._src.core_ext.VariableIndex, arg1: float, /) None
static supports_constraint_attribute(attribute: ConstraintAttribute, settable=False)
static supports_model_attribute(attribute: ModelAttribute, settable=False)
static supports_variable_attribute(attribute: VariableAttribute, settable=False)
version_string(self) str
write(self, arg: str, /) None
pyoptinterface.mosek.autoload_library()