How to use Continuous Variables for IF-THEN constraints on DOCPLEX (Python)?
问题 I'm using DOCPLEX to build up a Mixed Integer Linear Programming (MILP) problem which is then solved via CPLEX on Python. However, upon trying to solve the MILP problem using IF-THEN constraints, I receive the following error: DOcplexException: Model.if_then(), nbBus40 >= 3.0 is not discrete This is happening because I have declared nbbus40 variable to be continuous , as shown in the code below: from docplex.mp.model import Model mdl = Model(name='buses') nbbus40 = mdl.continuous_var(name=