title: How to use a mutable Param pyomo?
body: <p>I'm trying to make Param mutable with initializer zero but when I tried to read the Param in the constraint its doesn't understand what is reading, the only way that I found to read is using .value but when the problem finishes declaring the whole constraint. the solver found the first solution but when I defined the new param value, it doesn't change the value of the param. I know if I am doing bad the declared or I haven't found the correct white to do that.</p>
  <p>As a solver im using CPLEX</p>
  <p>This is the way i defined the Param:</p>
  <pre><code>model.s_value = pe.Param(mutable=True, initialize=0)
  </code></pre>
  <p>But if I use the Param as a normal Param is a constraint promo sent this message:</p>
  <pre><code>   ValueError: Constraint 'def_constraint[0]' encountered a strict inequality expression ('&gt;' or '&lt;'). All constraints must be formulated using using '&lt;=', '&gt;=', or '=='.
  </code></pre>
  <p>I think is because when pyomo tired to read the param that sends an object like this:</p>
  <pre><code>pyomo.core.base.param.IndexedParam object at 0x1939C6A0
  </code></pre>
  <p>After declaring all the variable I put the solver inside a for and there I redefine the value of the Param:</p>
  <pre><code>model.s_value.value= new_value
  </code></pre>
  <p>Please. Someone can explain to me who can I use correctly the mutable Param and how can I iterate the model.</p>