title: GLPK - Minimize a variable value
body: <p>I'm working in virtual network embedding, and I'm creating a model with glpk to embed the networks.
  I have this following objective function:</p>
  
  <pre><code>minimize cost: sum{(i,j) in VEdges} sum{u in SNodes, v in SNodes} weight[u,v] * fw[i,j,u,v] * secSupEdge[u,v] + sum{u in SNodes, v in SNodes} r[u,v] * secSupEdge[u,v];
  </code></pre>
  
  <p>Then I have the following two restrictions (among others)</p>
  
  <pre><code>s.t. relConst2{(i,j) in VEdges, u in AllNodes, v in AllNodes}: bwDem[i,j] * phiw[i,j,u,v] &gt;= fw[i,j,u,v];
  
  s.t. linkSecConst0{(i,j) in VEdges, u in SNodes, v in SNodes}: phiw[i,j,u,v] * secDemEdge[i,j] &lt;= secSupEdge[u,v];
  </code></pre>
  
  <p>"<strong>phiw</strong>" is a binary variable</p>
  
  <p>"<strong>fw</strong>" and "<strong>r</strong>" are variables that take any value >= 0</p>
  
  <p>all the others ("<strong>weight</strong>", "<strong>bwDem</strong>", "<strong>secDemEdges</strong>", "<strong>secSupEdge</strong>") are just params</p>
  
  <p>I want to relate <strong>phiw</strong> with <strong>fw</strong>. When <strong>fw</strong> > 0, <strong>phiw</strong> should take the value 1. When <strong>fw</strong> == 0, <strong>phiw</strong> should take the value 0. </p>
  
  <p>Normally it does what I want, but sometimes <strong>phiw</strong> takes the value 1 when <strong>fw</strong> has the value 0, which is not what I want. This happens because the restrictions are met:</p>
  
  <p>Example 1:</p>
  
  <p>s.t. relConst2: 4 * 1 >= 0</p>
  
  <p>s.t. linkSecConst0: 1 * 2 &lt;= 2</p>
  
  <p>Is there a way to minimize the value of <strong>phiw</strong> variable but not putting it in the objective function? Or putting it in the objective function but not changing the value of the result neither the value of all other variables?</p>