title: Gekko: Is it not possible to use logical conditions sequentially in Gekko Python?
body: <p>I coded a model in Gekko and faced an error. So, I started checking line by line and found an issue that I couldn't understand. The code below (partial model code is shown, input file <a href="https://drive.google.com/file/d/1FyWf2NktTuRg6RM1urqXHxPlMvJ7iJb-/view?usp=sharing" rel="nofollow noreferrer">link</a>) can be executed, and the result is also correct. However, when I uncommented the 31st line, an error occurs. Would it be because I used the logical conditions (<code>ab3</code>, <code>max3</code>) sequentially? Is there any way to solve this issue?</p>
  <pre class="lang-py prettyprint-override"><code>import numpy as np
  from gekko import GEKKO
  
  # Read weather data
  weatherData = np.load(&quot;Atlanta_TMY3_climate.npy&quot;)
  
  # create GEKKO model
  m = GEKKO(remote=False)
  m.open_folder()
  print(m.path)
  
  weatherData = np.insert(weatherData, 0, np.zeros((1,15)), 0)
  
  days_to_consider = 1
  m.time = np.linspace(0, 24*days_to_consider, 24*days_to_consider+1)
  
  # Declare parameters
  focc = m.Param(value = [0,0.05,0.05,0.05,0.05,0.05,0.05,0.1,\
                          0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,\
                          0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1], name=&quot;focc&quot;)
  
  setpoint = [16.00, 16.00, 16.00, 16.00, 16.00, 16.00, 16.00, 16.00, \
              16.00, 16.00, 16.00, 16.38, 17.43, 17.88, 18.08, 18.35, \
              17.85, 17.13,16.27, 16.00, 16.00, 16.00, 16.00, 16.00, 16.00]
  T_air_set  = m.Param(value=setpoint, name=&quot;T_air_set&quot;)
  Te         = m.Param(value = weatherData[0:24*days_to_consider+1,0], name=&quot;Te&quot;)
  qv_infil_wind  = m.Param(value = 0.0769*0.6*(0.75*0.8* \
                           weatherData[0:24*days_to_consider+1,1]**2)**0.667,\
                           name=&quot;qv_infil_wind&quot;)
  
  # 1) Airflow
  qv_mech_sup     = m.Intermediate(2.519244226731981*focc*1, name=&quot;qv_mech_sup&quot;)
  
  qv_infil_stack = m.Intermediate(0.0146*0.6*(0.7*8.5* \
                                  m.abs3(Te-T_air_set))**0.667, \
                                  name=&quot;qv_infil_stack&quot;)
  
  # When below line code is uncommented, an error occurs.
  ##qv_infil_sw = m.Intermediate(m.max3(qv_infil_stack, qv_infil_wind) + \
  ##                             0.14*qv_infil_stack*qv_infil_wind/0.6, \
  ##                             name=&quot;qv_infil_sw&quot;)
  
  m.options.IMODE = 6
  m.options.DIAGLEVEL = 4
  m.options.SOLVER = 3
  m.options.MAX_ITER = 1000
  m.solve(disp=True, GUI=False)
  </code></pre>