lumix.core.enums.LXConstraintSense

class lumix.core.enums.LXConstraintSense(value)[source]

Constraint sense enumeration for inequality and equality constraints.

Defines the relationship between left-hand side (LHS) and right-hand side (RHS) of constraints in the optimization model.

LE

Less-than-or-equal constraint (<=) Meaning: LHS <= RHS Use for: Capacity limits, maximum bounds, upper limits Example: total_production <= factory_capacity

GE

Greater-than-or-equal constraint (>=) Meaning: LHS >= RHS Use for: Minimum requirements, lower bounds, demand satisfaction Example: production >= minimum_quota

EQ

Equality constraint (==) Meaning: LHS == RHS Use for: Balance equations, exact requirements, flow conservation Example: inflow - outflow == 0

Note

  • LE and GE constraints define feasible regions (inequalities)

  • EQ constraints are more restrictive and may reduce feasibility

  • All constraints must be satisfied for a solution to be feasible

Examples

Different constraint types:

# Capacity constraint (upper limit)
LXConstraint("capacity")
    .expression(resource_usage_expr)
    .le()
    .rhs(max_capacity)

# Demand constraint (lower limit)
LXConstraint("demand")
    .expression(production_expr)
    .ge()
    .rhs(min_demand)

# Balance constraint (exact equality)
LXConstraint("flow_balance")
    .expression(inflow - outflow)
    .eq()
    .rhs(0)
__init__()

Attributes

LE

GE

EQ

LE = '<='
GE = '>='
EQ = '=='