ortools.linear_solver.python.model_builder_helper

def to_mpmodel_proto(unknown):

to_mpmodel_proto(helper: operations_research::ModelBuilderHelper) -> operations_research::MPModelProto

class MPModelExportOptions(pybind11_builtins.pybind11_object):
MPModelExportOptions()
class ModelBuilderHelper(pybind11_builtins.pybind11_object):
ModelBuilderHelper()
def read_model_from_proto_file(unknown):

read_model_from_proto_file(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, filename: str) -> bool

def write_model_to_proto_file(unknown):

write_model_to_proto_file(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, filename: str) -> bool

def import_from_mps_string(unknown):

import_from_mps_string(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, mps_string: str) -> bool

def import_from_mps_file(unknown):

import_from_mps_file(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, mps_file: str) -> bool

def import_from_lp_string(unknown):

import_from_lp_string(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, lp_string: str) -> bool

def import_from_lp_file(unknown):

import_from_lp_file(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, lp_file: str) -> bool

def fill_model_from_sparse_data(unknown):

fill_model_from_sparse_data(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, variable_lower_bound: numpy.ndarray[numpy.float64[m, 1]], variable_upper_bound: numpy.ndarray[numpy.float64[m, 1]], objective_coefficients: numpy.ndarray[numpy.float64[m, 1]], constraint_lower_bounds: numpy.ndarray[numpy.float64[m, 1]], constraint_upper_bounds: numpy.ndarray[numpy.float64[m, 1]], constraint_matrix: scipy.sparse.csr_matrix[numpy.float64]) -> None

def add_var(unknown):
def add_var_array(unknown):

add_var_array(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, arg0: list[int], arg1: float, arg2: float, arg3: bool, arg4: str) -> numpy.ndarray[numpy.int32]

def add_var_array_with_bounds(unknown):

add_var_array_with_bounds(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, arg0: numpy.ndarray[numpy.float64], arg1: numpy.ndarray[numpy.float64], arg2: numpy.ndarray[bool], arg3: str) -> numpy.ndarray[numpy.int32]

def set_var_lower_bound(unknown):

set_var_lower_bound(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, var_index: int, lb: float) -> None

def set_var_upper_bound(unknown):

set_var_upper_bound(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, var_index: int, ub: float) -> None

def set_var_integrality(unknown):

set_var_integrality(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, var_index: int, is_integer: bool) -> None

def set_var_objective_coefficient(unknown):

set_var_objective_coefficient(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, var_index: int, coeff: float) -> None

def set_objective_coefficients(unknown):

set_objective_coefficients(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, arg0: list[int], arg1: list[float]) -> None

def set_var_name(unknown):

set_var_name(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, var_index: int, name: str) -> None

def var_lower_bound(unknown):

var_lower_bound(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, var_index: int) -> float

def var_upper_bound(unknown):

var_upper_bound(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, var_index: int) -> float

def var_is_integral(unknown):

var_is_integral(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, var_index: int) -> bool

def var_objective_coefficient(unknown):

var_objective_coefficient(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, var_index: int) -> float

def var_name(unknown):
def add_linear_constraint(unknown):
def set_constraint_lower_bound(unknown):

set_constraint_lower_bound(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, lb: float) -> None

def set_constraint_upper_bound(unknown):

set_constraint_upper_bound(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, ub: float) -> None

def add_term_to_constraint(unknown):

add_term_to_constraint(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, var_index: int, coeff: float) -> None

def add_terms_to_constraint(unknown):

add_terms_to_constraint(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, arg0: int, arg1: list[int], arg2: list[float]) -> None

def safe_add_term_to_constraint(unknown):

safe_add_term_to_constraint(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, var_index: int, coeff: float) -> None

def set_constraint_name(unknown):

set_constraint_name(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, name: str) -> None

def set_constraint_coefficient(unknown):

set_constraint_coefficient(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, var_index: int, coeff: float) -> None

def constraint_lower_bound(unknown):

constraint_lower_bound(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int) -> float

def constraint_upper_bound(unknown):

constraint_upper_bound(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int) -> float

def constraint_name(unknown):

constraint_name(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int) -> str

def constraint_var_indices(unknown):

constraint_var_indices(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int) -> list[int]

def constraint_coefficients(unknown):

constraint_coefficients(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int) -> list[float]

def add_enforced_linear_constraint(unknown):

add_enforced_linear_constraint(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper) -> int

def is_enforced_linear_constraint(unknown):

is_enforced_linear_constraint(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, arg0: int) -> bool

def set_enforced_constraint_lower_bound(unknown):

set_enforced_constraint_lower_bound(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, lb: float) -> None

def set_enforced_constraint_upper_bound(unknown):

set_enforced_constraint_upper_bound(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, ub: float) -> None

def add_term_to_enforced_constraint(unknown):

add_term_to_enforced_constraint(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, var_index: int, coeff: float) -> None

def add_terms_to_enforced_constraint(unknown):

add_terms_to_enforced_constraint(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, arg0: int, arg1: list[int], arg2: list[float]) -> None

def safe_add_term_to_enforced_constraint(unknown):

safe_add_term_to_enforced_constraint(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, var_index: int, coeff: float) -> None

def set_enforced_constraint_name(unknown):

set_enforced_constraint_name(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, name: str) -> None

def set_enforced_constraint_coefficient(unknown):

set_enforced_constraint_coefficient(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, var_index: int, coeff: float) -> None

def enforced_constraint_lower_bound(unknown):

enforced_constraint_lower_bound(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int) -> float

def enforced_constraint_upper_bound(unknown):

enforced_constraint_upper_bound(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int) -> float

def enforced_constraint_name(unknown):

enforced_constraint_name(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int) -> str

def enforced_constraint_var_indices(unknown):

enforced_constraint_var_indices(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int) -> list[int]

def enforced_constraint_coefficients(unknown):

enforced_constraint_coefficients(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int) -> list[float]

def set_enforced_constraint_indicator_variable_index(unknown):

set_enforced_constraint_indicator_variable_index(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, var_index: int) -> None

def set_enforced_constraint_indicator_value(unknown):

set_enforced_constraint_indicator_value(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int, positive: bool) -> None

def enforced_constraint_indicator_variable_index(unknown):

enforced_constraint_indicator_variable_index(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int) -> int

def enforced_constraint_indicator_value(unknown):

enforced_constraint_indicator_value(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, ct_index: int) -> bool

def num_variables(unknown):
def num_constraints(unknown):
def set_name(unknown):
def clear_objective(unknown):
def maximize(unknown):
def set_maximize(unknown):
def set_objective_offset(unknown):

set_objective_offset(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, offset: float) -> None

def objective_offset(unknown):
def clear_hints(unknown):
def add_hint(unknown):

add_hint(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, var_index: int, var_value: float) -> None

def sort_and_regroup_terms(unknown):

sort_and_regroup_terms(self: ortools.linear_solver.python.model_builder_helper.ModelBuilderHelper, arg0: numpy.ndarray[numpy.int32], arg1: numpy.ndarray[numpy.float64]) -> tuple[list[int], list[float]]

class SolveStatus(pybind11_builtins.pybind11_object):

Members:

OPTIMAL

FEASIBLE

INFEASIBLE

UNBOUNDED

ABNORMAL

NOT_SOLVED

MODEL_IS_VALID

CANCELLED_BY_USER

UNKNOWN_STATUS

MODEL_INVALID

INVALID_SOLVER_PARAMETERS

SOLVER_TYPE_UNAVAILABLE

INCOMPATIBLE_OPTIONS

SolveStatus()
name

name(self: object) -> str

OPTIMAL = <SolveStatus.OPTIMAL: 0>
FEASIBLE = <SolveStatus.FEASIBLE: 1>
INFEASIBLE = <SolveStatus.INFEASIBLE: 2>
UNBOUNDED = <SolveStatus.UNBOUNDED: 3>
ABNORMAL = <SolveStatus.ABNORMAL: 4>
NOT_SOLVED = <SolveStatus.NOT_SOLVED: 5>
MODEL_IS_VALID = <SolveStatus.MODEL_IS_VALID: 6>
CANCELLED_BY_USER = <SolveStatus.CANCELLED_BY_USER: 7>
UNKNOWN_STATUS = <SolveStatus.UNKNOWN_STATUS: 8>
MODEL_INVALID = <SolveStatus.MODEL_INVALID: 9>
INVALID_SOLVER_PARAMETERS = <SolveStatus.INVALID_SOLVER_PARAMETERS: 10>
SOLVER_TYPE_UNAVAILABLE = <SolveStatus.SOLVER_TYPE_UNAVAILABLE: 11>
INCOMPATIBLE_OPTIONS = <SolveStatus.INCOMPATIBLE_OPTIONS: 12>
OPTIMAL = <SolveStatus.OPTIMAL: 0>
FEASIBLE = <SolveStatus.FEASIBLE: 1>
INFEASIBLE = <SolveStatus.INFEASIBLE: 2>
UNBOUNDED = <SolveStatus.UNBOUNDED: 3>
ABNORMAL = <SolveStatus.ABNORMAL: 4>
NOT_SOLVED = <SolveStatus.NOT_SOLVED: 5>
MODEL_IS_VALID = <SolveStatus.MODEL_IS_VALID: 6>
CANCELLED_BY_USER = <SolveStatus.CANCELLED_BY_USER: 7>
UNKNOWN_STATUS = <SolveStatus.UNKNOWN_STATUS: 8>
MODEL_INVALID = <SolveStatus.MODEL_INVALID: 9>
INVALID_SOLVER_PARAMETERS = <SolveStatus.INVALID_SOLVER_PARAMETERS: 10>
SOLVER_TYPE_UNAVAILABLE = <SolveStatus.SOLVER_TYPE_UNAVAILABLE: 11>
INCOMPATIBLE_OPTIONS = <SolveStatus.INCOMPATIBLE_OPTIONS: 12>
class ModelSolverHelper(pybind11_builtins.pybind11_object):
ModelSolverHelper()
def solver_is_supported(unknown):
def solve_serialized_request(unknown):

solve_serialized_request(self: ortools.linear_solver.python.model_builder_helper.ModelSolverHelper, arg0: str) -> bytes

def interrupt_solve(unknown):

interrupt_solve(self: ortools.linear_solver.python.model_builder_helper.ModelSolverHelper) -> bool

Returns true if the interrupt signal was correctly sent, that is, if the underlying solver supports it.

def set_log_callback(unknown):

set_log_callback(self: ortools.linear_solver.python.model_builder_helper.ModelSolverHelper, arg0: std::function, std::allocator > const&)>) -> None

def clear_log_callback(unknown):
def set_time_limit_in_seconds(unknown):

set_time_limit_in_seconds(self: ortools.linear_solver.python.model_builder_helper.ModelSolverHelper, limit: float) -> None

def set_solver_specific_parameters(unknown):

set_solver_specific_parameters(self: ortools.linear_solver.python.model_builder_helper.ModelSolverHelper, solver_specific_parameters: str) -> None

def enable_output(unknown):
def has_solution(unknown):
def has_response(unknown):
def response(unknown):

response(self: ortools.linear_solver.python.model_builder_helper.ModelSolverHelper) -> operations_research::MPSolutionResponse

def status_string(unknown):
def wall_time(unknown):
def user_time(unknown):
def objective_value(unknown):
def best_objective_bound(unknown):
def var_value(unknown):
def reduced_cost(unknown):

reduced_cost(self: ortools.linear_solver.python.model_builder_helper.ModelSolverHelper, var_index: int) -> float

def dual_value(unknown):
def activity(unknown):
def variable_values(unknown):

variable_values(self: ortools.linear_solver.python.model_builder_helper.ModelSolverHelper) -> numpy.ndarray[numpy.float64[m, 1]]

def expression_value(unknown):

expression_value(self: ortools.linear_solver.python.model_builder_helper.ModelSolverHelper, arg0: list[int], arg1: list[float], arg2: float) -> float

def reduced_costs(unknown):

reduced_costs(self: ortools.linear_solver.python.model_builder_helper.ModelSolverHelper) -> numpy.ndarray[numpy.float64[m, 1]]

def dual_values(unknown):

dual_values(self: ortools.linear_solver.python.model_builder_helper.ModelSolverHelper) -> numpy.ndarray[numpy.float64[m, 1]]