how to ensure minimum output of a generator (else zero output) in linear programming?

I want to ensure, that a generator (in my case a heat generator, for example a boiler) first starts to output thermal energy, when a certain minimum output can be realized. Otherwise the output should be zero. For example, the boiler should not run if it can only output 1mW, first if it can output at least 1kW or so.

So what I actually want to do, is make the the value of a variable dependent on its own value. Basically:

IF $$x\geq x_\text{min}$$: $$x=x$$

ELSE: $$x=0$$

To show what I mean, here is a broken down version of my problem formulation:

sets:

$$\mathcal{T}$$ for timesteps

Parameters:

$$d_t\quad\forall t\in\mathcal{T}$$ for thermal demand at timestep $$t$$

$$\eta$$ for boiler efficiency

$$h_\text{min}$$ for minimum possible boiler heat output

Variables:

$$g_t\quad\forall t\in\mathcal{T}$$ for gas fed to boiler at timestep $$t$$

$$h_t\quad\forall t\in\mathcal{T}$$ for heat from boiler at timestep $$t$$

$$r_t\quad\forall t\in\mathcal{T}$$ for deciding whether the boiler is running at timestep $$t$$ (binary variable)

Objective:

Minimize difference between thermal demand and supply by boiler (I think enforcing equality via constraint would lead to infeasibility, if the boiler can only run with a certain minimum output). $$\text{min.}\quad\sum_{t\in\mathcal{T}}d_t-h_t$$

Constraints:

Balance input/output of boiler: $$h_t=\eta\cdot g_t\quad\forall t\in\mathcal{T}$$

And my approach to enforce minimum output (which does not work for $$r_t=0$$): $$h_t\geq r_t\cdot h_\text{min}\quad\forall t\in\mathcal{T}$$

I have seen Solutions like here or here. However, I think these solutions are not applicable here, since there is one variable dependent on the value of another variable. But here I really want to say: "If the output $$x$$ is greater than for example 1 kW, say 2kW, than $$x=2$$kW, but otherwise $$x=0$$kW"

Is there a possibility to achieve this if-else like behaviour?

• Does this answer your question? Linear Programming with additional "if-then"/"Default to zero" constraints? Commented Feb 2, 2023 at 13:40
• thank you for the interesting link! Is it possible to use such semicontinuous variables with pyomo/glpk? Because the binary variables are exploding my calculation time :( Commented Feb 10, 2023 at 11:29

What you describe is the disjunction $$(x \geq x_\min) \mbox{ or } (x=0),$$
which can be input directly into any optimization software that supports disjunctive constraints. Alternatively, you need an upper bound on $$x$$, say $$x_\max$$, which leads to the Big-M formulation $$x_\min z \leq x \leq x_\max z,\; z \in \{0,1\}.$$
In your application, I guess $$x_\max$$ would be interpreted as the maximum possible thermal output from the boiler, and $$z$$ is whether thermal energy is being output from the boiler or not.