pyoptinterface.gurobi package¶
- class pyoptinterface.gurobi.Env(*args, **kwargs)¶
Bases:
RawEnv
- raw_parameter_type¶
- set_raw_parameter(param_name: str, value)¶
- set_raw_parameter_double¶
- set_raw_parameter_int¶
- set_raw_parameter_string¶
- start¶
- class pyoptinterface.gurobi.Model(env=None)¶
Bases:
RawModel
- add_linear_constraint¶
- 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=None, lb=None, ub=None, name=None, start=None)¶
- add_quadratic_constraint¶
- add_second_order_cone_constraint(cone_variables, name='', rotated=False)¶
Convert a second order cone constraint to a quadratic constraint. x[0] >= sqrt(x[1]^2 + … + x[n]^2) to x[0]^2 - x[1]^2 - … - x[n]^2 >= 0 or convert a rotated second order cone constraint to a quadratic constraint. 2 * x[0] * x[1] >= x[2]^2 + … + x[n]^2 to 2 * x[0] * x[1] - x[2]^2 - … - x[n]^2 >= 0
- add_sos_constraint¶
- add_variable¶
- add_variables(*coords: Collection, domain=None, lb=None, ub=None, name=None, start=None)¶
- cb_add_lazy_constraint¶
- cb_add_user_cut¶
- cb_exit¶
- cb_get_info(what)¶
- cb_get_info_double¶
- cb_get_info_int¶
- cb_get_relaxation¶
- cb_get_solution¶
- cb_set_solution¶
- cb_submit_solution¶
- computeIIS¶
- delete_constraint¶
- delete_variable¶
- delete_variables¶
- get_constraint_attribute(constraint, attribute: ConstraintAttribute)¶
- get_constraint_raw_attribute(constraint, name: str)¶
- get_constraint_raw_attribute_char¶
- get_constraint_raw_attribute_double¶
- get_constraint_raw_attribute_int¶
- get_constraint_raw_attribute_string¶
- get_model_attribute(attribute: ModelAttribute)¶
- get_model_raw_attribute(name: str)¶
- get_model_raw_attribute_double¶
- get_model_raw_attribute_int¶
- get_model_raw_attribute_list_double¶
- get_model_raw_attribute_string¶
- get_model_raw_attribute_vector_double¶
- get_normalized_coefficient¶
- get_normalized_rhs¶
- get_objective_coefficient¶
- get_raw_model¶
- get_raw_parameter(param_name: str)¶
- get_raw_parameter_double¶
- get_raw_parameter_int¶
- get_raw_parameter_string¶
- get_value¶
- get_variable_attribute(variable, attribute: VariableAttribute)¶
- get_variable_raw_attribute(variable, name: str)¶
- get_variable_raw_attribute_char¶
- get_variable_raw_attribute_double¶
- get_variable_raw_attribute_int¶
- get_variable_raw_attribute_string¶
- init¶
- is_constraint_active¶
- is_variable_active¶
- number_of_constraints(type: ConstraintType)¶
- number_of_variables()¶
- optimize¶
- pprint¶
- raw_attribute_type¶
- raw_parameter_type¶
- set_callback¶
- set_constraint_attribute(constraint, attribute: ConstraintAttribute, value)¶
- set_constraint_name¶
- set_constraint_raw_attribute(constraint, name: str, value)¶
- set_constraint_raw_attribute_char¶
- set_constraint_raw_attribute_double¶
- set_constraint_raw_attribute_int¶
- set_constraint_raw_attribute_string¶
- set_model_attribute(attribute: ModelAttribute, value)¶
- set_model_raw_attribute(name: str, value)¶
- set_model_raw_attribute_double¶
- set_model_raw_attribute_int¶
- set_model_raw_attribute_string¶
- set_normalized_coefficient¶
- set_normalized_rhs¶
- set_objective¶
- set_objective_coefficient¶
- set_raw_parameter(param_name: str, value)¶
- set_raw_parameter_double¶
- set_raw_parameter_int¶
- set_raw_parameter_string¶
- set_variable_attribute(variable, attribute: VariableAttribute, value)¶
- set_variable_bounds¶
- set_variable_name¶
- set_variable_raw_attribute(variable, name: str, value)¶
- set_variable_raw_attribute_char¶
- set_variable_raw_attribute_double¶
- set_variable_raw_attribute_int¶
- set_variable_raw_attribute_string¶
- static supports_constraint_attribute(attribute: ConstraintAttribute, settable=False)¶
- static supports_model_attribute(attribute: ModelAttribute, settable=False)¶
- static supports_variable_attribute(attribute: VariableAttribute, settable=False)¶
- update¶
- version_string¶
- write¶
- pyoptinterface.gurobi.autoload_library()¶