Skip to content
Draft
14 changes: 14 additions & 0 deletions flixopt/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,10 @@ def _do_modeling(self):
"""Create transmission efficiency equations and optional absolute loss constraints for both flow directions"""
super()._do_modeling()

# In DCE mode, skip constraint creation - constraints will be added later
if self._model._dce_mode:
return

# first direction
self.create_transmission_equation('dir1', self.element.in1, self.element.out1)

Expand Down Expand Up @@ -870,6 +874,10 @@ def _do_modeling(self):
"""Create linear conversion equations or piecewise conversion constraints between input and output flows"""
super()._do_modeling()

# In DCE mode, skip constraint creation - constraints will be added later
if self._model._dce_mode:
return

# Create conversion factor constraints if specified
if self.element.conversion_factors:
all_input_flows = set(self.element.inputs)
Expand Down Expand Up @@ -929,6 +937,9 @@ def __init__(self, model: FlowSystemModel, element: Storage):
def _do_modeling(self):
"""Create charge state variables, energy balance equations, and optional investment submodels."""
super()._do_modeling()
# In DCE mode, skip variable/constraint creation - will be added later
if self._model._dce_mode:
return
self._create_storage_variables()
self._add_netto_discharge_constraint()
self._add_energy_balance_constraint()
Expand Down Expand Up @@ -1307,6 +1318,9 @@ def _do_modeling(self):
inter-cluster linking. Overrides specific methods to customize behavior.
"""
super()._do_modeling()
# In DCE mode, skip constraint creation - constraints will be added later
if self._model._dce_mode:
return
self._add_intercluster_linking()

def _add_cluster_cyclic_constraint(self):
Expand Down
Loading