I can't find the piecewise attributes when using Cplex in Python.
I know with docplex this can be done for example:
from docplex.mp.model import Model
mdl = Model(name='')
f=mdl.piecewise()
Is there a similar attribute for using piecewise with cplex not doccplex? Like
import cplex
mdl = cplex.Cplex()
f=mdl.piecewise()
I tried mdl.piecewise() but it is not working with only cplex but with docplex.
In the model transport.py in CPLEX_Studio2211\cplex\examples\src\python
You have an example
With docplex python API, piecewise are easy to write as can be seen in https://github.com/AlexFleischerParis/zoodocplex/blob/master/zoopiecewise.py
which is the same as
Just to show how you can move the objective to a constraint