Skip to content

constants

File containing shared constants used across the package.

Code is heavily based on the linopy package by Fabian Hofmann.

MIT License

Config

reset_defaults() classmethod

Resets all configuration options to their default values.

Source code in pyoframe/constants.py
@classmethod
def reset_defaults(cls):
    """
    Resets all configuration options to their default values.
    """
    for key, value in cls._defaults.items():
        setattr(cls, key, value)

ModelStatus

Bases: Enum

Model status.

The set of possible model status is a superset of the solver status set.

Result(status, solution=None) dataclass

Result of the optimization.

Solution(primal, dual, objective) dataclass

Solution returned by the solver.

SolverStatus

Bases: Enum

Solver status.

Status(status, termination_condition) dataclass

Status and termination condition of the solver.

TerminationCondition

Bases: Enum

Termination condition of the solver.