Apps

* %list list-page% [[Attach:sunco.apm | Gas Blending]]

----

!!! Problem

Sunco oil has three different processes that can be used to manufacture various types of gasoline. Each process involves blending oils in the company's catalytic cracker.

!!! Process 1

Running process 1 for an hour costs $5 and requires 2 barrels of crude oil 1 and 3 barrels of crude oil 2. The output from running process 1 for an hour is 2 barrels of gas 1 and 1 barrel of gas 2.

!!! Process 2

Running process 2 for an hour costs $4 and requires 1 barrel of crude 1 and 3 barrels of crude 2. The output from process 2 for an hour is 3 barrels of gas 2.

!!! Process 3

Running process 3 for an hour costs $1 and requires 2 barrels of crude 2 and 3 barrels of gas 2. The output from running process 3 for an hour is 2 barrels of gas 3.

Each week, 200 barrels of crude 1, at $2/ barrel, and 300 barrels of crude 2 at $3/barrel, may be purchased. All gas produced can be sold at the following per-barrel prices: gas 1, $9; gas 2, $10; gas 3, $24. Formulate an LP whose solution will maximize revenues less costs. Assume that only 100 hours of time on the catalytic cracker are available each week.

* Let x[i] = no. of hours process i is run per week (where i =1,2,3)

* Let o[i] = no. of barrels of oil i that is purchased per week (i =1,2)

* Let g[i] = no. of barrels of gas i sold per week (i=1,2,3)

(:html:)<pre>

Model sunco

Variables

x[1:3] = 30, >=0

o[1] = 100, >=0, <=200

o[2] = 100, >=0, <=300

g[1:3] = 100, >=0

obj

profit

End Variables

Equations

! minimize (-profit) = maximize (profit)

obj = -profit

! profit per week = revenue - costs

profit = 9*g[1]+10*g[2]+24*g[3]-5*x[1]-4*x[2]-x[3]-2*o[1]-3*o[2]

! consumption of crude 1

2*x[1] + x[2] = o[1]

! consumption of crude 2

3*x[1] + 3*x[2] + 2*x[3] = o[2]

! generation of gas 1

2*x[1] = g[1]

! generation (and consumption) of gas 2

x[1] + 3*x[2] - 3*x[3] = g[2]

! generation of gas 3

2*x[3] = g[3]

! cat cracker available 100 hours per week

x[1] + x[2] + x[3] <= 100

End Equations

End Model

</pre>

(:htmlend:)

----

!!! Model

* %list list-page% [[Attach:sunoco.apm | Gas Blending]]

----

!!! Problem

## Sunco Gasoline Blending Optimization

## Apps.GasBlending History

Show minor edits - Show changes to output

Changed lines 32-33 from:

* %list list-page% [[~~https~~:~~//apmonitor~~.~~com/online/view_pass.php?f=sunco.~~apm | ~~Solve Sunco Gas ~~Blending~~ Optimization~~]]

to:

* %list list-page% [[Attach:sunco.apm | Gas Blending]]

Changed line 78 from:

* %list list-page% [[~~Attach~~:~~sunco~~.apm | ~~Gas~~ Blending]]

to:

* %list list-page% [[https://apmonitor.com/online/view_pass.php?f=sunco.apm | Solve Sunco Gas Blending Optimization]]

Changed lines 32-33 from:

* %list list-page% [[~~Attach~~:~~sunco~~.apm | ~~Gas~~ Blending]]

to:

* %list list-page% [[https://apmonitor.com/online/view_pass.php?f=sunco.apm | Solve Sunco Gas Blending Optimization]]

Added lines 77-79:

* %list list-page% [[Attach:sunco.apm | Gas Blending]]

Added lines 1-4:

(:title Sunco Gasoline Blending Optimization:)

(:keywords nonlinear, APMonitor, algebraic modeling language, optimization:)

(:description Sunco oil has three different processes that can be used to manufacture various types of gasoline. Each process involves blending oils in the company's catalytic cracker.:)

(:keywords nonlinear, APMonitor, algebraic modeling language, optimization:)

(:description Sunco oil has three different processes that can be used to manufacture various types of gasoline. Each process involves blending oils in the company's catalytic cracker.:)

Changed line 30 from:

(:html:)<font size=~~1~~><pre>

to:

(:html:)<font size=2><pre>

Changed line 30 from:

(:html:)<pre>

to:

(:html:)<font size=1><pre>

Changed line 67 from:

</pre>

to:

</pre></font>

Added lines 5-25:

!!! Problem

Sunco oil has three different processes that can be used to manufacture various types of gasoline. Each process involves blending oils in the company's catalytic cracker.

!!! Process 1

Running process 1 for an hour costs $5 and requires 2 barrels of crude oil 1 and 3 barrels of crude oil 2. The output from running process 1 for an hour is 2 barrels of gas 1 and 1 barrel of gas 2.

!!! Process 2

Running process 2 for an hour costs $4 and requires 1 barrel of crude 1 and 3 barrels of crude 2. The output from process 2 for an hour is 3 barrels of gas 2.

!!! Process 3

Running process 3 for an hour costs $1 and requires 2 barrels of crude 2 and 3 barrels of gas 2. The output from running process 3 for an hour is 2 barrels of gas 3.

Each week, 200 barrels of crude 1, at $2/ barrel, and 300 barrels of crude 2 at $3/barrel, may be purchased. All gas produced can be sold at the following per-barrel prices: gas 1, $9; gas 2, $10; gas 3, $24. Formulate an LP whose solution will maximize revenues less costs. Assume that only 100 hours of time on the catalytic cracker are available each week.

* Let x[i] = no. of hours process i is run per week (where i =1,2,3)

* Let o[i] = no. of barrels of oil i that is purchased per week (i =1,2)

* Let g[i] = no. of barrels of gas i sold per week (i=1,2,3)

----

Sunco oil has three different processes that can be used to manufacture various types of gasoline. Each process involves blending oils in the company's catalytic cracker.

!!! Process 1

Running process 1 for an hour costs $5 and requires 2 barrels of crude oil 1 and 3 barrels of crude oil 2. The output from running process 1 for an hour is 2 barrels of gas 1 and 1 barrel of gas 2.

!!! Process 2

Running process 2 for an hour costs $4 and requires 1 barrel of crude 1 and 3 barrels of crude 2. The output from process 2 for an hour is 3 barrels of gas 2.

!!! Process 3

Running process 3 for an hour costs $1 and requires 2 barrels of crude 2 and 3 barrels of gas 2. The output from running process 3 for an hour is 2 barrels of gas 3.

Each week, 200 barrels of crude 1, at $2/ barrel, and 300 barrels of crude 2 at $3/barrel, may be purchased. All gas produced can be sold at the following per-barrel prices: gas 1, $9; gas 2, $10; gas 3, $24. Formulate an LP whose solution will maximize revenues less costs. Assume that only 100 hours of time on the catalytic cracker are available each week.

* Let x[i] = no. of hours process i is run per week (where i =1,2,3)

* Let o[i] = no. of barrels of oil i that is purchased per week (i =1,2)

* Let g[i] = no. of barrels of gas i sold per week (i=1,2,3)

----

Deleted line 30:

Deleted line 66:

Deleted lines 68-88:

----

!!! Problem

Sunco oil has three different processes that can be used to manufacture various types of gasoline. Each process involves blending oils in the company's catalytic cracker.

!!! Process 1

Running process 1 for an hour costs $5 and requires 2 barrels of crude oil 1 and 3 barrels of crude oil 2. The output from running process 1 for an hour is 2 barrels of gas 1 and 1 barrel of gas 2.

!!! Process 2

Running process 2 for an hour costs $4 and requires 1 barrel of crude 1 and 3 barrels of crude 2. The output from process 2 for an hour is 3 barrels of gas 2.

!!! Process 3

Running process 3 for an hour costs $1 and requires 2 barrels of crude 2 and 3 barrels of gas 2. The output from running process 3 for an hour is 2 barrels of gas 3.

Each week, 200 barrels of crude 1, at $2/ barrel, and 300 barrels of crude 2 at $3/barrel, may be purchased. All gas produced can be sold at the following per-barrel prices: gas 1, $9; gas 2, $10; gas 3, $24. Formulate an LP whose solution will maximize revenues less costs. Assume that only 100 hours of time on the catalytic cracker are available each week.

* Let x[i] = no. of hours process i is run per week (where i =1,2,3)

* Let o[i] = no. of barrels of oil i that is purchased per week (i =1,2)

* Let g[i] = no. of barrels of gas i sold per week (i=1,2,3)

Added lines 8-49:

(:html:)<pre>

Model sunco

Variables

x[1:3] = 30, >=0

o[1] = 100, >=0, <=200

o[2] = 100, >=0, <=300

g[1:3] = 100, >=0

obj

profit

End Variables

Equations

! minimize (-profit) = maximize (profit)

obj = -profit

! profit per week = revenue - costs

profit = 9*g[1]+10*g[2]+24*g[3]-5*x[1]-4*x[2]-x[3]-2*o[1]-3*o[2]

! consumption of crude 1

2*x[1] + x[2] = o[1]

! consumption of crude 2

3*x[1] + 3*x[2] + 2*x[3] = o[2]

! generation of gas 1

2*x[1] = g[1]

! generation (and consumption) of gas 2

x[1] + 3*x[2] - 3*x[3] = g[2]

! generation of gas 3

2*x[3] = g[3]

! cat cracker available 100 hours per week

x[1] + x[2] + x[3] <= 100

End Equations

End Model

</pre>

(:htmlend:)

Changed lines 26-28 from:

Let x[i] = no. of hours process i is run per week (where i =1,2,3)

Let o[i] = no. of barrels of oil i that is purchased per week (i =1,2)

Let g[i] = no. of barrels of gas i sold per week (i=1,2,3)

Let o[i] = no. of barrels of oil i that is purchased per week (i =1,2)

Let g[i] = no. of barrels of gas i sold per week (i=1,2,3)

to:

* Let x[i] = no. of hours process i is run per week (where i =1,2,3)

* Let o[i] = no. of barrels of oil i that is purchased per week (i =1,2)

* Let g[i] = no. of barrels of gas i sold per week (i=1,2,3)

* Let o[i] = no. of barrels of oil i that is purchased per week (i =1,2)

* Let g[i] = no. of barrels of gas i sold per week (i=1,2,3)

Changed line 7 from:

* %list list-page% [[Attach:~~sunoco~~.apm | Gas Blending]]

to:

* %list list-page% [[Attach:sunco.apm | Gas Blending]]

Added lines 2-11:

----

!!! Model

* %list list-page% [[Attach:sunoco.apm | Gas Blending]]

----

!!! Problem

Added lines 1-28:

!! Gasoline Blending

Sunco oil has three different processes that can be used to manufacture various types of gasoline. Each process involves blending oils in the company's catalytic cracker.

!!! Process 1

Running process 1 for an hour costs $5 and requires 2 barrels of crude oil 1 and 3 barrels of crude oil 2. The output from running process 1 for an hour is 2 barrels of gas 1 and 1 barrel of gas 2.

!!! Process 2

Running process 2 for an hour costs $4 and requires 1 barrel of crude 1 and 3 barrels of crude 2. The output from process 2 for an hour is 3 barrels of gas 2.

!!! Process 3

Running process 3 for an hour costs $1 and requires 2 barrels of crude 2 and 3 barrels of gas 2. The output from running process 3 for an hour is 2 barrels of gas 3.

Each week, 200 barrels of crude 1, at $2/ barrel, and 300 barrels of crude 2 at $3/barrel, may be purchased. All gas produced can be sold at the following per-barrel prices: gas 1, $9; gas 2, $10; gas 3, $24. Formulate an LP whose solution will maximize revenues less costs. Assume that only 100 hours of time on the catalytic cracker are available each week.

Let x[i] = no. of hours process i is run per week (where i =1,2,3)

Let o[i] = no. of barrels of oil i that is purchased per week (i =1,2)

Let g[i] = no. of barrels of gas i sold per week (i=1,2,3)

----

!!! Solution

Run process 2 for 100 hours/week = $1500/week

If gas 1 price rises above $11.5/barrel, the optimal solution is to run process 1.

If gas 3 price rises above $26/barrel, the optimal solution is to run processes

2 and 3 for equal periods of time (50 hours).

Sunco oil has three different processes that can be used to manufacture various types of gasoline. Each process involves blending oils in the company's catalytic cracker.

!!! Process 1

Running process 1 for an hour costs $5 and requires 2 barrels of crude oil 1 and 3 barrels of crude oil 2. The output from running process 1 for an hour is 2 barrels of gas 1 and 1 barrel of gas 2.

!!! Process 2

Running process 2 for an hour costs $4 and requires 1 barrel of crude 1 and 3 barrels of crude 2. The output from process 2 for an hour is 3 barrels of gas 2.

!!! Process 3

Running process 3 for an hour costs $1 and requires 2 barrels of crude 2 and 3 barrels of gas 2. The output from running process 3 for an hour is 2 barrels of gas 3.

Each week, 200 barrels of crude 1, at $2/ barrel, and 300 barrels of crude 2 at $3/barrel, may be purchased. All gas produced can be sold at the following per-barrel prices: gas 1, $9; gas 2, $10; gas 3, $24. Formulate an LP whose solution will maximize revenues less costs. Assume that only 100 hours of time on the catalytic cracker are available each week.

Let x[i] = no. of hours process i is run per week (where i =1,2,3)

Let o[i] = no. of barrels of oil i that is purchased per week (i =1,2)

Let g[i] = no. of barrels of gas i sold per week (i=1,2,3)

----

!!! Solution

Run process 2 for 100 hours/week = $1500/week

If gas 1 price rises above $11.5/barrel, the optimal solution is to run process 1.

If gas 3 price rises above $26/barrel, the optimal solution is to run processes

2 and 3 for equal periods of time (50 hours).