I have an optimization model to which I need to add the following piecewise function as a constraint:
C_{i,k} = { PR_{i} * HSE_{k} i∈Ω, k = 1,...,M,
1 i∈Ω, k = 1,...,M
I read PR and HSE from excel cells
¿Is there a nice way to do this in Julia? I have not found any documentation on this in Julia
A piecewise linear function is something like:
There may be more segments.
You describe just an OR (not a piecewise linear function):
What you describe can be modeled with an extra binary variable
δ[i,k] ∈ {0,1}
as:This is linear, as PR and HSE are constants. I assume that
C
is a decision variable.