[StatusParameters][flixopt.interface.StatusParameters] model equipment that operates in discrete active/inactive states rather than continuous operation. This captures realistic operational constraints including startup costs, minimum run times, cycling limitations, and maintenance scheduling.
Equipment operation is modeled using a binary state variable:
With:
-
$s(t) = 1$ : equipment is operating (active state) -
$s(t) = 0$ : equipment is shutdown (inactive state)
This state variable controls the equipment's operational constraints and modifies flow bounds using the bounds with state pattern from Bounds and States.
State transitions are tracked using switch variables (see State Transitions):
With:
-
$s^\text{startup}(t) \in {0, 1}$ : equals 1 when switching from inactive to active (startup) -
$s^\text{shutdown}(t) \in {0, 1}$ : equals 1 when switching from active to inactive (shutdown)
Behavior:
- Inactive → Active:
$s^\text{startup}(t) = 1, s^\text{shutdown}(t) = 0$ - Active → Inactive:
$s^\text{startup}(t) = 0, s^\text{shutdown}(t) = 1$ - No change:
$s^\text{startup}(t) = 0, s^\text{shutdown}(t) = 0$
Effects incurred when equipment starts up:
With:
-
$\text{effect}_{e,\text{switch}}$ being the effect value per startup event
Examples:
- Startup fuel consumption
- Wear and tear costs
- Labor costs for startup procedures
- Inrush power demands
Effects incurred while equipment is operating:
With:
-
$\text{effect}_{e,\text{run}}$ being the effect rate per operating hour -
$\Delta t$ being the time step duration
Examples:
- Fixed operating and maintenance costs
- Auxiliary power consumption
- Consumable materials
- Emissions while running
Bounds on total operating time across the planning horizon:
With:
-
$h_\text{min}$ being the minimum total operating hours -
$h_\text{max}$ being the maximum total operating hours
Use cases:
- Minimum runtime requirements (contracts, maintenance)
- Maximum runtime limits (fuel availability, permits, equipment life)
Minimum Consecutive Uptime:
Enforces minimum runtime once started using duration tracking (see Duration Tracking):
With:
-
$d^\text{uptime}(t)$ being the consecutive uptime duration at time$t$ -
$h^\text{uptime}_\text{min}$ being the minimum required uptime
Behavior:
- When shutting down at time
$t$ : enforces equipment was on for at least$h^\text{uptime}_\text{min}$ prior to the switch - Prevents short cycling and frequent startups
Maximum Consecutive Uptime:
Limits continuous operation before requiring shutdown:
Use cases:
- Mandatory maintenance intervals
- Process batch time limits
- Thermal cycling requirements
Minimum Consecutive Downtime:
Enforces minimum shutdown duration before restarting:
With:
-
$d^\text{downtime}(t)$ being the consecutive downtime duration at time$t$ -
$h^\text{downtime}_\text{min}$ being the minimum required downtime
Use cases:
- Cooling periods
- Maintenance requirements
- Process stabilization
Maximum Consecutive Downtime:
Limits shutdown duration before mandatory restart:
Use cases:
- Equipment preservation requirements
- Process stability needs
- Contractual minimum activity levels
Maximum number of startups across the planning horizon:
With:
-
$n_\text{max}$ being the maximum allowed number of startups
Use cases:
- Preventing excessive equipment wear
- Grid stability requirements
- Operational complexity limits
- Maintenance budget constraints
StatusParameters modify flow rate bounds by coupling them to the active/inactive state.
Without StatusParameters (continuous operation): $$ P \cdot \text{rel}\text{lower} \leq p(t) \leq P \cdot \text{rel}\text{upper} $$
With StatusParameters (binary operation): $$ s(t) \cdot P \cdot \max(\varepsilon, \text{rel}\text{lower}) \leq p(t) \leq s(t) \cdot P \cdot \text{rel}\text{upper} $$
Using the bounds with state pattern from Bounds and States.
Behavior:
- When
$s(t) = 0$ : flow is forced to zero - When
$s(t) = 1$ : flow follows normal bounds
For equipment with StatusParameters, the complete constraint system includes:
-
State variable:
$s(t) \in {0, 1}$ -
Switch tracking:
$s^\text{startup}(t) - s^\text{shutdown}(t) = s(t) - s(t-1)$ -
Switch exclusivity:
$s^\text{startup}(t) + s^\text{shutdown}(t) \leq 1$ -
Duration tracking:
- On-duration:
$d^\text{uptime}(t)$ following duration tracking pattern - Off-duration:
$d^\text{downtime}(t)$ following duration tracking pattern
- On-duration:
-
Minimum uptime:
$d^\text{uptime}(t) \geq (s(t-1) - s(t)) \cdot h^\text{uptime}_\text{min}$ -
Maximum uptime:
$d^\text{uptime}(t) \leq h^\text{uptime}_\text{max}$ -
Minimum downtime:
$d^\text{downtime}(t) \geq (s(t) - s(t-1)) \cdot h^\text{downtime}_\text{min}$ -
Maximum downtime:
$d^\text{downtime}(t) \leq h^\text{downtime}_\text{max}$ -
Total hours:
$h_\text{min} \leq \sum_t s(t) \cdot \Delta t \leq h_\text{max}$ -
Cycling limit:
$\sum_t s^\text{startup}(t) \leq n_\text{max}$ -
Flow bounds: $s(t) \cdot P \cdot \max(\varepsilon, \text{rel}\text{lower}) \leq p(t) \leq s(t) \cdot P \cdot \text{rel}\text{upper}$
Python Class: [StatusParameters][flixopt.interface.StatusParameters]
Key Parameters:
effects_per_startup: Costs per startup eventeffects_per_active_hour: Costs per hour of operationactive_hours_min,active_hours_max: Total runtime boundsmin_uptime,max_uptime: Consecutive runtime boundsmin_downtime,max_downtime: Consecutive shutdown boundsstartup_limit: Maximum number of startupsforce_startup_tracking: Create switch variables even without limits (for tracking)
See the [StatusParameters][flixopt.interface.StatusParameters] API documentation for complete parameter list and usage examples.
Mathematical Patterns Used:
- State Transitions - Switch tracking
- Duration Tracking - Consecutive time constraints
- Bounds with State - Flow control
Used in:
- [
Flow][flixopt.elements.Flow] - Active/inactive operation for flows - All components supporting discrete operational states
power_plant = StatusParameters(
effects_per_startup={'startup_cost': 25000}, # €25k per startup
effects_per_active_hour={'fixed_om': 125}, # €125/hour while running
min_uptime=8, # Minimum 8-hour run
min_downtime=4, # 4-hour cooling period
active_hours_max=6000, # Annual limit
)batch_reactor = StatusParameters(
effects_per_startup={'setup_cost': 1500},
min_uptime=12, # 12-hour minimum batch
max_uptime=24, # 24-hour maximum batch
min_downtime=6, # Cleaning time
startup_limit=200, # Max 200 batches
)hvac = StatusParameters(
effects_per_startup={'compressor_wear': 0.5},
min_uptime=1, # Prevent short cycling
min_downtime=0.5, # 30-min minimum off
startup_limit=2000, # Limit compressor starts
)backup_gen = StatusParameters(
effects_per_startup={'fuel_priming': 50}, # L diesel
min_uptime=0.5, # 30-min test duration
max_downtime=720, # Test every 30 days
active_hours_min=26, # Weekly testing requirement
)Time Series Boundary: The final time period constraints for min_uptime/max and min_downtime/max are not enforced at the end of the planning horizon. This allows optimization to end with ongoing campaigns that may be shorter/longer than specified, as they extend beyond the modeled period.