title: How to use Continuous Variables for IF-THEN constraints on DOCPLEX (Python)?
body: <p>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:</p>
  
  <pre><code>DOcplexException: Model.if_then(), nbBus40 &gt;= 3.0 is not discrete
  </code></pre>
  
  <p>This is happening because I have declared <strong>nbbus40</strong> variable to be <strong>continuous</strong>, as shown in the code below:</p>
  
  <pre><code>from docplex.mp.model import Model
  
  mdl = Model(name='buses')
  nbbus40 = mdl.continuous_var(name='nbBus40')
  nbbus30 = mdl.integer_var(name='nbBus30')
  mdl.add_constraint(nbbus40*40 + nbbus30*30 &gt;= 300, 'kids')    
  mdl.add(mdl.if_then((nbbus40&gt;=3),(nbbus30&gt;=7)))
  mdl.minimize(nbbus40*500 + nbbus30*400)
  
  mdl.solve()
  
  for v in mdl.iter_integer_vars():
      print(v," = ",v.solution_value)
  </code></pre>
  
  <p>However, if I keep the <strong>nbbus40</strong> variable as an <strong>integer</strong>, then I get the solution to the MILP problem, as shown below:</p>
  
  <pre><code>from docplex.mp.model import Model
  
  mdl = Model(name='buses')
  nbbus40 = mdl.integer_var(name='nbBus40')
  nbbus30 = mdl.integer_var(name='nbBus30')
  mdl.add_constraint(nbbus40*40 + nbbus30*30 &gt;= 300, 'kids')  
  mdl.add(mdl.if_then((nbbus40&gt;=3),(nbbus30&gt;=7)))
  mdl.minimize(nbbus40*500 + nbbus30*400)
  
  mdl.solve()
  
  for v in mdl.iter_integer_vars():
      print(v," = ",v.solution_value)
  </code></pre>
  
  <p>RESULT:</p>
  
  <pre><code>nbBus40  =  0
  nbBus30  =  10.0
  </code></pre>
  
  <p>How can I use the IF-THEN constraint in DOCPLEX for continuous variables?</p>