# Modelling not evenly distributed discrete levels of a decision variable

I have a decision variable for the power of a heating device $$P$$ that can have the following levels: 0, 900, 1300, 2000 (Unit is Watt [W]).

Now I would like to know if and how I can model in an equation. If the levels were distributed evenly, I could just use an integer variable $$x$$ with 4 values $${0, 1,2,3}$$ and calculate the output power by using

$$P = x* (1/3)* P^{max}$$

But for my application this can't be done. A way to archieve this is to use 4 binary variables with one variable for each level and ensure in an additional constraint that only one of them can be active. However, this would create multiple additional binary variables. So I am asking you whether you are aware of a way how to model this elegantly?

• Adding a binary variable usually (not always) adds to solution time, but does not necessarily increase it "significantly". Whether your model will be tractable with the required number of binaries (and associated constraints) is an empirical question. Linear approximation might solve faster (not guaranteed but plausible), but would not necessarily produce an optimal solution to the original model. Depending on how $P$ occurs in the model, the linearized solution might not even be feasible. So I would suggest trying the SOS1 formulation before surrendering and using an approximation.