title: Providing constraints in Pymoo Optimisation
body: <p>I have an objective function which looks like:</p>
  
  <pre><code>f1 = -1 * (constant1 * (variable1 - constant2))
  </code></pre>
  
  <p>And I have a constraint such that the function <code>f1</code> should only take values between 10 to 20 i.e.</p>
  
  <pre><code>10 &lt;= f1 &lt;= 20    where, f1 = -1 * (constant1 * (variable1 - constant2))
  </code></pre>
  
  <p>How do I code the above constraints in <code>pymoo</code> optimisation problem. I'm not interested in the bounds because as I see from the documentation, bounds are only for defining limits on the input(x) values and not for defining the limits on the output values of the objective function(f1) itself. I see that there are 2 ways to define a constraint:</p>
  
  <ol>
  <li>Define the constraint directly inside the objective function itself</li>
  <li>Define a <code>Repair</code> function and specify the constraints inside it</li>
  </ol>
  
  <p>Can anyone guide me in framing the code for this constraint equation using <code>repair</code> or the default method? <code>repair</code> would be much more preferable since it seems flexible</p>
  
  <p>I have gone through the documentation of pymoo, and this is all I am able to frame for the constraint equation:</p>
  
  <pre><code>g1 = f1-10
  g2 = 20-f1
  </code></pre>