Constraints

The following constraints are used in this example:

  • bounds on variables

  • for $i \in \text {NODES} \setminus \{ \text {‘source’},\text {‘sink’}\} $,

    \[  \sum _{(i,j) \in \text {ARCS}} \Variable{Flow[i,j]} = \sum _{(j,i) \in \text {ARCS}} \Argument{arc\_ mult[j,i]} \cdot \Variable{Flow[j,i]}  \]
  • for $(i,j) \in \text {ARCS such that}\  i \in \text {CRUDES}$,

    \[ \Variable{Flow[i,j]} = \Variable{CrudeDistilled[i]} \]
  • for $(i,j) \in \text {ARCS such that}\  i \in \text {CRACKED\_ OILS}$,

    \[ \Variable{Flow[i,j]} = \Variable{OilCracked[i]} \]
  • for $\text {petrol} \in \text {PETROLS}$,

    \[  \frac{\sum \limits _{(i,\text {petrol}) \in \text {ARCS}} \Argument{octane[i]} \cdot \Argument{arc\_ mult[i,petrol]} \cdot \Variable{Flow[i,petrol]}}{\sum \limits _{(i,\text {petrol}) \in \text {ARCS}} \Argument{arc\_ mult[i,petrol]} \cdot \Variable{Flow[i,petrol]}} \ge \Argument{octane\_ lb[petrol]}  \]
  • $\displaystyle { \frac{\sum \limits _{(i,\text {‘jet\_ fuel’}) \in \text {ARCS}} \Argument{vapour\_ pressure[i]} \cdot \Argument{arc\_ mult[i,`jet\_ fuel]} \cdot \Variable{Flow[i,`jet\_ fuel]}}{\sum _{(i,\text {‘jet\_ fuel’}) \in \text {ARCS}} \Argument{arc\_ mult[i,`jet\_ fuel]} \cdot \Variable{Flow[i,`jet\_ fuel]}} \le \Argument{vapour\_ pressure\_ ub} }$

  • for $(i,\text {‘fuel\_ oil’}) \in \text {ARCS}$,

    \[  \frac{\Variable{Flow[i,`fuel\_ oil]}}{\sum \limits _{(j,\text {‘fuel\_ oil’}) \in \text {ARCS}} \Variable{Flow[j,`fuel\_ oil]}} = \frac{\Argument{fuel\_ oil\_ coefficient[i]}}{\Argument{sum\_ fuel\_ oil\_ coefficient}}  \]
  • $\displaystyle { \sum _{i \in \text {CRUDES}} \Variable{CrudeDistilled[i]} \le \Argument{crude\_ total\_ ub} }$

  • $\displaystyle { \sum _{\substack {(i,\text {‘reformed\_ gasoline’}) \in \text {ARCS}:\\ \text {index(}i\text {,‘naphtha’)} > 0}} \Variable{Flow[i,`reformed\_ gasoline]} \le \Argument{naphtha\_ ub} }$

  • $\displaystyle { \sum _{(i,\text {‘cracked\_ oil’}) \in \text {ARCS}} \Variable{Flow[i,`cracked\_ oil]} \le \Argument{cracked\_ oil\_ ub} }$

  • $\displaystyle { \Argument{lube\_ oil\_ lb} \le \Variable{Flow[`lube\_ oil,`sink]} \le \Argument{lube\_ oil\_ ub} }$

  • $\displaystyle { \frac{\sum \limits _{(\text {‘premium\_ petrol’},j) \in \text {ARCS}} \Variable{Flow[`premium\_ petrol,j]}}{\sum \limits _{(\text {‘regular\_ petrol’},j) \in \text {ARCS}} \Variable{Flow[`regular\_ petrol,j]}} \ge \Argument{premium\_ ratio} }$