'Modelling piecewise function constraints in Gurobi

I have defined the piecewise function PF and was wondering how to model such constraints where a variable is an element of the piecewise function.

Any help would be much appreciated! Thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source