Piecewise function as a constraint on Julia JuMP

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 (otherwise)
I read PR and HSE from excel cells
¿Is there a nice way to do this in Julia? I have not found any documentation of this in Julia

Hi @Jesper, welcome to the forum.

I’m not sure I fully understand your question. What is the (otherwise) part? Are PR and HSE constants or decision variables?

There is a small section of the docs on piecewise linear here: