Project OR

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

Variables

Let:

δit = 1 if mine i is worked in year t, 0 otherwise.


γit = 1 if mine i is ‘open’ in year t, 0 otherwise.
xit = output from mine i in year t (millions of tons).
qt = quantity of blended ore produced in year t (millions of tons).
Where i = {1,2,3,4} and t = {1.2.3.4.5}
Totally, there are 65 variables.

 Variables in code:
Variable Name Interpretation
IsOpen[mine,year] 1 if mine is open in that year; 0 otherwise
IsWorked[mine,year] 1 if mine is worked in that year; 0 otherwise
Extract[mine,year] output from mine i in year t
ExtractedPerYear[year] quantity of blended ore produced in year t

Constraints:
xit - Miδit ≤ 0 for all i, t.
Where Mi is the maximum anually output from mine i.
These constraints mean that if mine i is not worked in year t there can be no output from it in that
year.
∑𝟒𝐢=𝟏 𝛅it ≤ 3 for all t.
This constraint requires no more than three mines to be worked in any year.

δit - γit ≤ 0 for all i, t.


This constraint satisfies the condition that if mine i is ‘closed’ in year t, it cannot be worked in
that year.
γit+1 - γit ≤ 0 for all i, t < 5.
This forces a mine to be closed in all years subsequent to that in which it is first closed

i=14Qitxit – Ptqt = 0 for all t,


Qi is the quality of the ore from mine i and Pt the quality required in year t

∑𝟒𝐢=𝟏 𝐱it – qt = 0 for all t,


This constraint ensures that the tonnage of blended ore in each year equals the
combined tonnage of the constituents.

This constraint ensures that the tonnage of blended ore in each year equals the combined tonnage
of the constituents. There are five such constraints. In total there are 71 constraints.

 Constraints in code:
- Bound on variables
- For year 𝜖 YEARS,

ExtractedPerYear[year] = ∑𝒎𝒊𝒏𝒆 𝝐 𝑴𝑰𝑵𝑬𝑺 𝑬𝒙𝒕𝒓𝒂𝒄𝒕[𝒎𝒊𝒏𝒆, 𝒚𝒆𝒂𝒓]

- For mine 𝜖 MINES and year 𝜖 YEARS,

Extract[mine,year] ≤ Extract[mine,year].ub∙IsWorked[mine,year]

- For year 𝜖 YEARS,

∑𝒎𝒊𝒏𝒆 𝝐 𝑴𝑰𝑵𝑬𝑺 𝑰𝒔𝑾𝒐𝒓𝒌𝒆𝒅[𝒎𝒊𝒏𝒆, 𝒚𝒆𝒂𝒓] ≤ max_num_worked_per_year


- For mine 𝜖 MINES and year 𝜖 YEARS,

IsWorked[mine,year] ≤ IsOpen[mine,year]

- For mine 𝜖 MINES and year 𝜖 YEARS\ {1},


IsOpen[mine,year] ≤ IsOpen[mine,year-1]

- For year 𝜖 YEARS,


∑𝒎𝒊𝒏𝒆 𝝐 𝑴𝑰𝑵𝑬𝑺 𝒒𝒖𝒂𝒍𝒊𝒕𝒚[𝒎𝒊𝒏𝒆]∙𝐄𝐱𝐭𝐫𝐚𝐜𝐭[𝐦𝐢𝐧𝐞,𝐲𝐞𝐚𝐫]
= quality_required[year]
𝑬𝒙𝒕𝒓𝒂𝒄𝒕𝒆𝒅𝑷𝒆𝒓𝒀𝒆𝒂𝒓[𝒚𝒆𝒂𝒓]
Problem Statement:

A mining company is going to continue operating in a certain area for the next five years. There are four
mines in this area but it can operate at most three in any one year. Although a mine may not operate in a
certain year it is still necessary to keep it ‘open’, in the sense that royalties are payable, should it be
operated in a future year. Clearly if a mine is not going to be worked again it can be closed down
permanently and no more royalties need be paid. The yearly royalties payable on each mine kept ‘open’
are

Mine 1. £5 million
Mine 2. £4 million
Mine 3. £4 million
Mine 4. £5 million

There is an upper limit to the amount of ore which can be extracted from each mine in a year. These upper
limits are:

Mine 1 2.0 x 10^6 tons


Mine 2 2.0 x 10^6 tons
Mine 3 1.3 x 10^6 tons
Mine 4 3.0 x 10^6 tons

The ore from the different mines is of varying quality. This quality is measured on a scale so that blending
ores together results in a linear combination of the quality measurements, e.g. if equal quantities of two
ores were combined the resultant ore would have a quality measurement half way between that of the
ingredient ores. Measured in these units the qualities of the ores from the mines are given below:

Mine 1 1.0
Mine 2 0.7
Mine 3 1.5
Mine 4 0.5
In each year it is necessary to combine the total outputs from each mine to produce a blended ore of
exactly some stipulated quality. For each year these qualities are

Year 1 0.9
Year 2 0.8
Year 3 1.2
Year 4 0.6
Year 5 1.0

The final blended ore sells for £10 per ton each year. Revenue and expenditure for future years must be
discounted at a rate of 10% per annum.
Which mines should be operated each year and how much should they produce?
Objective:
The total profit consists of the income from selling the blended ore minus the royalties payable. This is to be
maximized. It can be written

Rit is the royalty payable on mine i in year t discounted at a rate of 10% per annum. I t is the selling price of each ton
of blended ore in year t discounted at a rate of 10% per annum. The advantage of this formulation of the problem
over an alternative one is discussed by Williams (1978).

There would seem to be advantage in this model in working mines early in the hope that they may be closed
permanently later. In addition, the dis- counting of revenue gives an advantage to working mines early. The
suggested solution strategy is therefore to branch on the variables δ it , giving priority to low values of t.

The objective is to maximize the following function, where TotalRevenue is a linear function of
ExtractedPerYear, and TotalCost is a linear function of isOpen:

Total Profit = Total Revenue – Total Cost


Background of study
This project illustrates how a mining company can continue operating in a
certain area over the period of five years. There are 4 mines but it can operate at
most three in any one year. In spite of the fact that a mine may not work in a
specific year, it is as yet important to keep it 'open', as in sovereignties are
payable, should it be worked in a future year. Plainly if a mine won't be worked
again, it very well may be shut down for all time and no more sovereignties
need be paid. Each mine produces a different grade of ore. This grade is
measured on a scale such that blending ores together results in a linear
combination of the quality requirements. For example, If equal quantities of ore
from two different mines were combined, the resulting ore would have a grade
that is the average of the grade for each of the two ores that were combined.
Each year, the ore produced from each operating mine must be combined to
produce ore of a certain grade. The final blended ore sells for $10/ton. Revenues
and costs for future years are discounted at the rate of 10% per annum. This
project is solved, which aims to find the mines should be operated each year
and how much should they produce.
Parameters
The parameters is given below:
Parameter name Interpretation
Cost[mine] Yearly royalties payable on each mine kept open
Extract_ub[mine] Upper bound on measure of ore seperated from each mine in a
year
Quality[mine] Number of ore from each mine
Quality_required[year] Required number of mixed ore per year
Max_num_worked_per_year Most extreme number of mines worked per year
Revenue_per_ton Revenue per ton of mixed ore
Discount_rate Annual discount portion for future years
Extract[mine,year].ub Upper bound on extract[mine,year]
Quality_sol[year] Number of mixed ore per year

Result

[1] [2] IsOpen IsWorked Extract


Mine 1 1 1 1 2.0000
Mine 1 2 1 0 0.0000
Mine 1 3 1 1 1.9500
Mine 1 4 1 1 0.1250
Mine 1 5 1 1 2.0000
Mine 2 1 1 0 0.0000
Mine 2 2 1 1 2.5000
Mine 2 3 1 0 0.0000
Mine 2 4 1 1 2.5000
Mine 2 5 1 1 2.1667
Mine 3 1 1 1 1.3000
Mine 3 2 1 1 1.3000
Mine 3 3 1 1 1.3000
Mine 3 4 1 0 0.0000
Mine 3 5 1 1 1.3000
Mine 4 1 1 1 2.4500
Mine 4 2 1 1 2.2000
Mine 4 3 1 0 0.0000
Mine 4 4 1 1 3.0000
Mine 4 5 0 0 0.0000
[1] Extract Per Year Quality Solution Quality Required
1 5.7500 0.9 0.9

2 6.0000 0.8 0.8

3 3.2500 1.2 1.2

4 5.6250 0.6 0.6

5 5.4667 1.0 1.0

Coding
code.mod
int NbMines = ...;
range Mines = 1..NbMines;

int NbYears = ...;


range Years = 1..NbYears;
range Years2 = 2..NbYears;

float Royalties[Mines] = ...;


float LimExtract[Mines] = ...;
float LimWork = ...;
float OreQual[Mines] = ...;
float BlendQual[Years] = ...;
float BlendPrice = ...;
float DiscountRate = ...;
float DiscountFactor[Years];
execute INITIALIZE {
DiscountFactor[1] = 1.0;
for(var y in Years2)
DiscountFactor[y] = DiscountFactor[y-1]*(1.0-DiscountRate);
}

dvar boolean Work[Mines,Years];


dvar boolean Open[Mines,Years];
dvar float+ Ore[m in Mines][y in Years] in 0..LimExtract[m];
dvar float+ Blend[Years];

dexpr float Objective =


sum(y in Years) (BlendPrice * DiscountFactor[y] * Blend[y]
- sum(m in Mines) Royalties[m] * DiscountFactor[y] * Open[m][y]);

maximize Objective;

subject to {
// Maximum yearly capacity
forall(m in Mines, y in Years)
ctMaxYearCap: Ore[m][y] <= LimExtract[m] * Work[m][y];

// Limit on mines worked in a year


forall(y in Years)
ctMinLim: sum(m in Mines) Work[m][y] <= LimWork;

// Closed mines cannot be worked


forall(m in Mines, y in Years)
ctClosedMine: Work[m][y] <= Open[m][y];

// Once closed, a mine stays closed


forall(m in Mines, y in 1..NbYears-1)
ctStaysClosed: Open[m][y+1] <= Open[m][y];

// Quality requirement on blended ore


forall(y in Years)
ctQuality: sum(m in Mines) OreQual[m] * Ore[m][y] == BlendQual[y] * Blend[y];

// Balance constraint
forall(y in Years)
ctBalance: sum(m in Mines) Ore[m][y] == Blend[y];

Work[2][3]==0;
Work[1][2]==0;
Work[2][1]==0;
Work[4][4]==1;
Work[4][3]==0;
Work[3][4]==0;
Work[4][5]==0;
}

tuple BlendSolutionT{
int Years;
float value;
};
{BlendSolutionT} BlendSolution = {<i0,Blend[i0]> | i0 in Years};
tuple OpenSolutionT{
int Mines;
int Years;
int value;
};
{OpenSolutionT} OpenSolution = {<i0,i1,Open[i0][i1]> | i0 in Mines,i1 in Years};
tuple OreSolutionT{
int Mines;
int Years;
float value;
};
{OreSolutionT} OreSolution = {<i0,i1,Ore[i0][i1]> | i0 in Mines,i1 in Years};
tuple WorkSolutionT{
int Mines;
int Years;
int value;
};
{WorkSolutionT} WorkSolution = {<i0,i1,Work[i0][i1]> | i0 in Mines,i1 in Years};

File .dat

NbMines = 4;
NbYears = 5;

// Units are millions of pounds for costs, millions of tons for ore
Royalties = [5 4 4 5];
LimExtract = [2 2.5 1.3 3];
LimWork = 3;
OreQual = [1.0 0.7 1.5 0.5];
BlendQual = [0.9 0.8 1.2 0.6 1.0];
BlendPrice = 10;
DiscountRate = 0.10;

You might also like