Module src.olaaaf.mlo_solver.MLOSolver
Abstract MLOSolver class, representing mixed linear constraint solver.
Classes
class MLOSolver-
Abstract MLOSolver class, representing mixed linear constraint solver.
Expand source code
class MLOSolver(ABC): """ Abstract MLOSolver class, representing mixed linear constraint solver. """ @abstractmethod def solve(self, variables : list[Variable], objectif : list[Fraction], constraints : list[tuple[list[Fraction], ConstraintOperator, Fraction]])\ -> tuple[OptimizationValues, list[Fraction], Fraction]: """ Method returning the result of a mixed linear problem. Parameters ---------- variables : list of olaaaf.variable.variable.Variable Variables used in constraints. objectif : list of fractions.Fraction Weights of the objective function to optimize. constraints : list of tuple of the form (list of fractions.Fraction, olaaaf.formula.nullaryFormula.constraint.constraintOperator.ConstraintOperator, fractions.Fraction) Each tuple represents a linear constraint, with the first element being the weights, the second the operator and the third the bound. Returns ------- olaaaf.mlo_solver.optimizationValues.OptimizationValues Information of the final state of the problem. list of fractions.Fraction The point at the optimal, if found. fractions.Fraction The optimal value, if found. """ passAncestors
- abc.ABC
Subclasses
Methods
def solve(self, variables: list[Variable], objectif: list[Fraction], constraints: list[tuple[list[Fraction], ConstraintOperator, Fraction]]) ‑> tuple[OptimizationValues, list[fractions.Fraction], fractions.Fraction]-
Method returning the result of a mixed linear problem.
Parameters
variables:listofolaaaf.variable.variable.Variable- Variables used in constraints.
objectif:listoffractions.Fraction- Weights of the objective function to optimize.
constraints:listoftupleofthe form (listoffractions.Fraction, olaaaf.formula.nullaryFormula.constraint.constraintOperator.ConstraintOperator, fractions.Fraction)- Each tuple represents a linear constraint, with the first element being the weights, the second the operator and the third the bound.
Returns
olaaaf.mlo_solver.optimizationValues.OptimizationValues- Information of the final state of the problem.
listoffractions.Fraction- The point at the optimal, if found.
fractions.Fraction- The optimal value, if found.