ortools.math_opt.python.mathopt
Module exporting all classes and functions needed for MathOpt.
This module defines aliases to all classes and functions needed for regular use of MathOpt. It removes the need for users to have multiple imports for specific sub-modules.
For example instead of:
from ortools.math_opt.python import model from ortools.math_opt.python import solve
m = model.Model() solve.solve(m)
we can simply do: from ortools.math_opt.python import mathopt
m = mathopt.Model() mathopt.solve(m)
1# Copyright 2010-2024 Google LLC 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14"""Module exporting all classes and functions needed for MathOpt. 15 16This module defines aliases to all classes and functions needed for regular use 17of MathOpt. It removes the need for users to have multiple imports for specific 18sub-modules. 19 20For example instead of: 21 from ortools.math_opt.python import model 22 from ortools.math_opt.python import solve 23 24 m = model.Model() 25 solve.solve(m) 26 27we can simply do: 28 from ortools.math_opt.python import mathopt 29 30 m = mathopt.Model() 31 mathopt.solve(m) 32""" 33 34# pylint: disable=unused-import 35# pylint: disable=g-importing-member 36 37from ortools.math_opt.python.callback import BarrierStats 38from ortools.math_opt.python.callback import CallbackData 39from ortools.math_opt.python.callback import CallbackRegistration 40from ortools.math_opt.python.callback import CallbackResult 41from ortools.math_opt.python.callback import Event 42from ortools.math_opt.python.callback import GeneratedConstraint 43from ortools.math_opt.python.callback import MipStats 44from ortools.math_opt.python.callback import parse_callback_data 45from ortools.math_opt.python.callback import PresolveStats 46from ortools.math_opt.python.callback import SimplexStats 47from ortools.math_opt.python.compute_infeasible_subsystem_result import ( 48 ComputeInfeasibleSubsystemResult, 49) 50from ortools.math_opt.python.compute_infeasible_subsystem_result import ModelSubset 51from ortools.math_opt.python.compute_infeasible_subsystem_result import ( 52 ModelSubsetBounds, 53) 54from ortools.math_opt.python.compute_infeasible_subsystem_result import ( 55 parse_compute_infeasible_subsystem_result, 56) 57from ortools.math_opt.python.compute_infeasible_subsystem_result import ( 58 parse_model_subset, 59) 60from ortools.math_opt.python.compute_infeasible_subsystem_result import ( 61 parse_model_subset_bounds, 62) 63from ortools.math_opt.python.errors import InternalMathOptError 64from ortools.math_opt.python.errors import status_proto_to_exception 65from ortools.math_opt.python.expressions import evaluate_expression 66from ortools.math_opt.python.expressions import fast_sum 67from ortools.math_opt.python.hash_model_storage import HashModelStorage 68from ortools.math_opt.python.message_callback import list_message_callback 69from ortools.math_opt.python.message_callback import log_messages 70from ortools.math_opt.python.message_callback import printer_message_callback 71from ortools.math_opt.python.message_callback import SolveMessageCallback 72from ortools.math_opt.python.message_callback import vlog_messages 73from ortools.math_opt.python.model import as_flat_linear_expression 74from ortools.math_opt.python.model import as_flat_quadratic_expression 75from ortools.math_opt.python.model import as_normalized_linear_inequality 76from ortools.math_opt.python.model import BoundedLinearExpression 77from ortools.math_opt.python.model import BoundedLinearTypes 78from ortools.math_opt.python.model import BoundedLinearTypesList 79from ortools.math_opt.python.model import LinearBase 80from ortools.math_opt.python.model import LinearConstraint 81from ortools.math_opt.python.model import LinearConstraintMatrixEntry 82from ortools.math_opt.python.model import LinearExpression 83from ortools.math_opt.python.model import LinearLinearProduct 84from ortools.math_opt.python.model import LinearProduct 85from ortools.math_opt.python.model import LinearSum 86from ortools.math_opt.python.model import LinearTerm 87from ortools.math_opt.python.model import LinearTypes 88from ortools.math_opt.python.model import LinearTypesExceptVariable 89from ortools.math_opt.python.model import LowerBoundedLinearExpression 90from ortools.math_opt.python.model import Model 91from ortools.math_opt.python.model import NormalizedLinearInequality 92from ortools.math_opt.python.model import Objective 93from ortools.math_opt.python.model import QuadraticBase 94from ortools.math_opt.python.model import QuadraticExpression 95from ortools.math_opt.python.model import QuadraticProduct 96from ortools.math_opt.python.model import QuadraticSum 97from ortools.math_opt.python.model import QuadraticTerm 98from ortools.math_opt.python.model import QuadraticTermKey 99from ortools.math_opt.python.model import QuadraticTypes 100from ortools.math_opt.python.model import Storage 101from ortools.math_opt.python.model import StorageClass 102from ortools.math_opt.python.model import UpdateTracker 103from ortools.math_opt.python.model import UpperBoundedLinearExpression 104from ortools.math_opt.python.model import VarEqVar 105from ortools.math_opt.python.model import Variable 106from ortools.math_opt.python.model_parameters import ModelSolveParameters 107from ortools.math_opt.python.model_parameters import parse_solution_hint 108from ortools.math_opt.python.model_parameters import SolutionHint 109from ortools.math_opt.python.model_storage import BadLinearConstraintIdError 110from ortools.math_opt.python.model_storage import BadVariableIdError 111from ortools.math_opt.python.model_storage import LinearConstraintMatrixIdEntry 112from ortools.math_opt.python.model_storage import LinearObjectiveEntry 113from ortools.math_opt.python.model_storage import ModelStorage 114from ortools.math_opt.python.model_storage import ModelStorageImpl 115from ortools.math_opt.python.model_storage import ModelStorageImplClass 116from ortools.math_opt.python.model_storage import QuadraticEntry 117from ortools.math_opt.python.model_storage import QuadraticTermIdKey 118from ortools.math_opt.python.model_storage import StorageUpdateTracker 119from ortools.math_opt.python.model_storage import UsedUpdateTrackerAfterRemovalError 120from ortools.math_opt.python.parameters import Emphasis 121from ortools.math_opt.python.parameters import emphasis_from_proto 122from ortools.math_opt.python.parameters import emphasis_to_proto 123from ortools.math_opt.python.parameters import GlpkParameters 124from ortools.math_opt.python.parameters import GurobiParameters 125from ortools.math_opt.python.parameters import lp_algorithm_from_proto 126from ortools.math_opt.python.parameters import lp_algorithm_to_proto 127from ortools.math_opt.python.parameters import LPAlgorithm 128from ortools.math_opt.python.parameters import SolveParameters 129from ortools.math_opt.python.parameters import solver_type_from_proto 130from ortools.math_opt.python.parameters import solver_type_to_proto 131from ortools.math_opt.python.parameters import SolverType 132from ortools.math_opt.python.result import FeasibilityStatus 133from ortools.math_opt.python.result import Limit 134from ortools.math_opt.python.result import ObjectiveBounds 135from ortools.math_opt.python.result import parse_objective_bounds 136from ortools.math_opt.python.result import parse_problem_status 137from ortools.math_opt.python.result import parse_solve_result 138from ortools.math_opt.python.result import parse_solve_stats 139from ortools.math_opt.python.result import parse_termination 140from ortools.math_opt.python.result import ProblemStatus 141from ortools.math_opt.python.result import SolveResult 142from ortools.math_opt.python.result import SolveStats 143from ortools.math_opt.python.result import Termination 144from ortools.math_opt.python.result import TerminationReason 145from ortools.math_opt.python.solution import Basis 146from ortools.math_opt.python.solution import BasisStatus 147from ortools.math_opt.python.solution import DualRay 148from ortools.math_opt.python.solution import DualSolution 149from ortools.math_opt.python.solution import optional_solution_status_to_proto 150from ortools.math_opt.python.solution import parse_basis 151from ortools.math_opt.python.solution import parse_dual_ray 152from ortools.math_opt.python.solution import parse_dual_solution 153from ortools.math_opt.python.solution import parse_optional_solution_status 154from ortools.math_opt.python.solution import parse_primal_ray 155from ortools.math_opt.python.solution import parse_primal_solution 156from ortools.math_opt.python.solution import parse_solution 157from ortools.math_opt.python.solution import PrimalRay 158from ortools.math_opt.python.solution import PrimalSolution 159from ortools.math_opt.python.solution import Solution 160from ortools.math_opt.python.solution import SolutionStatus 161from ortools.math_opt.python.solve import compute_infeasible_subsystem 162from ortools.math_opt.python.solve import IncrementalSolver 163from ortools.math_opt.python.solve import solve 164from ortools.math_opt.python.solve import SolveCallback 165from ortools.math_opt.python.solver_resources import SolverResources 166from ortools.math_opt.python.sparse_containers import LinearConstraintFilter 167from ortools.math_opt.python.sparse_containers import parse_linear_constraint_map 168from ortools.math_opt.python.sparse_containers import parse_variable_map 169from ortools.math_opt.python.sparse_containers import SparseVectorFilter 170from ortools.math_opt.python.sparse_containers import to_sparse_double_vector_proto 171from ortools.math_opt.python.sparse_containers import to_sparse_int32_vector_proto 172from ortools.math_opt.python.sparse_containers import VariableFilter 173from ortools.math_opt.python.sparse_containers import VarOrConstraintType 174 175# pylint: enable=unused-import 176# pylint: enable=g-importing-member