You are not logged in.
Pages: 1
Hello,
i have a question about a problem i'm trying to solve.
I'll explain the problem here and show you what i've come up with after....
Ok so a clay company is considering the mining arrangements at four sites (A, B, C and D)
where it has the option of mining over a three-year period.
here are the data...
A B C D
Reserve 650 950 625 840
(thousands
of tonnes)
Quality of clay 66 64.1 63 62.1
Cost of mining 22 21 17 18
open or not open not open open open not open
(£ per tonne)
opening cost (£) 350,000 - - 300,000
Reserve is the maximum quantity of clay that can be extracted during the three-year period.
Quality of clay is expressed as a single figure. Better quality clay have higher ratings on this scale. It may be assumed that all the clay from a given mine is of the same quality.
Cost of mining is the total cost of mining and processing a single tonne of clay. It does not include the cost of opening new mines.
The company wishes to know which mines to work in each of the next three years in order to minimize costs, subject to the following restrictions.
i) produce 640,000 tonnes of mixed clay in year 1,
produce 850,000 tonnes of mixed clay in year 2,
produce 750,000 tonnes of mixed clay in year 3.
ii) The average quality of the mixed clay mined in any year must not be less than 64.0.
iii) Only two mines can be worked in the first year.
iv) The cost of mining clay will increase by £2 per tonne in year 2 and another £1 per tonne in year 3.
v) Clay (either mixed or from a single mine) cannot be stored from one year to the next.
Remember, there's a difference between a mine being 'open' and a mine being 'worked'.
Ok, here's what i've got so far....i'm sure there are mistakes in there and there are probably constraints or something missing.
Two things that are not included (because my attempts have been wrong) in my code are....
the constraint for i) the yearly production requirement mentioned above.
and also the constraint for ii) the average quality clay being at least 64 for every year.
Please help, i've tried many times, and now this is about as far as i can get. I appreciate your time, thank you.
MODEL:
! clay company problem;
SETS:
! I;
MINES/A1,B1,C1,D1/:CAP,QUAL,OPEN,FIXCOST;
! J;
YEAR/Y1,Y2,Y3/:DEMAND;
! I,J;
ALLOC(MINES,YEAR):COST,VOLUME,USED;
ENDSETS
@FOR(ALLOC(I,J):@SUM(YEAR(J):VOLUME(I,J)-DUMMY*USED(I,J))<=0);
@FOR(YEAR(J):@SUM(ALLOC(I,J):USED(I,J))=1);
! ONLY 2 MINES CAN BE WORKED ON IN YEAR 1;
@FOR(ALLOC(I,1):@SUM(YEAR(J):USED(I,J))<=2);
! THE OBJECTIVE;
MIN=@SUM(ALLOC(I,J):COST(I,J)*VOLUME(I,J))+@SUM(MINES(I):OPEN(I)*FIXCOST(I));
! DEMAND CONSTRAINTS;
@FOR(YEAR(J):@SUM(MINES(I):VOLUME(I,J))=DEMAND(J));
! SUPPLY CONSTRAINT;
@FOR(MINES(I):@SUM(YEAR(J):VOLUME(I,J))<=(CAP(I)*OPEN(I)));
! TIGHTENING CONSTRAINTS;
@FOR(ALLOC(I,J):VOLUME(I,J)<=DEMAND(J)*OPEN(I));
! MAKE THE OPEN AND USED VARIABLES BINARY;
@FOR(MINES(I):@BIN(OPEN(I)));
@FOR(ALLOC(I,J):@BIN(USED(I,J)));
DATA:
! CAPACITY OF EACH MINE;
CAP=650, 950, 625, 840;
! QUALITY OF CLAY FOR EACH MINE;
QUAL=66, 64.1, 63, 62.1;
! DEMAND FOR EACH YEAR;
DEMAND=640, 850, 750;
! FIXED COST OF OPENING MINES;
FIXCOST=350, 0, 0, 300;
! COST OF MINING CLAY FOR EACH SITE AND FOR EACH YEAR;
COST=22,24,25,
21,23,24,
17,19,20,
18,20,21;
DUMMY=10000;
ENDDATA
END
Offline
Pages: 1