title: Linear program model formulation
body: <p>I'm having a hard time formulating a model that will later be implemented with (Octave, glpk function) linear programming.</p>
  
  <p>The problem appears to be quite simple but I fail to translate it into the mathematical notation.</p>
  
  <p>I have warehouses, each of them accumulates certain amounts of material.
  This material needs to be transported to other locations called processing facilities.
  The processing facility can ether exist at the same location the warehouse is or not at all.
  The model would have to tell me which warehouses should have a processing facility with regards to cost.</p>
  
  <p>I have a distance matrix between all warehouses and transportation cost per mile per tone of material.</p>
  
  <p>Placing a processing facility has a price as well.</p>
  
  <p>The problem I'm having is how to incorporate facility placement and transportation price to the model in such a way that the model would tell me where the processing should be done.</p>
  
  <p>I've followed <a href="https://www.utdallas.edu/~scniu/OPRE-6201/documents/TP1-Formulation.pdf" rel="nofollow">this example</a>.</p>
  
  <p>But I'm getting a feeling that my problem is a multivariate and should be solved differently.</p>