title: Optimization in R with arbitrary constraints
body: <p>I have done it in Excel but need to run a proper simulation in R.</p>
  
  <p>I need to minimize function <code>F(x)</code> (<code>x</code> is a vector) while having constraints that <code>sum(x)=1</code>, all values in <code>x</code> are <code>[0,1]</code> and another function <code>G(x) &gt; G_0</code>. </p>
  
  <p>I have tried it with <code>optim</code> and <code>constrOptim</code>. None of them give you this option. </p>