$TITLE MEXICO STEEL - SMALL STATIC   (MEXSS,SEQ=15) 
$STITLE SET DEFINITIONS 
*  A SIMPLIFIED REPRESENTATION OF THE MEXICAN STEEL SECTOR IS USED
*  TO INTRODUCE A PROCESS INDUSTRY PRODUCTION AND DISTRIBUTION
*  SCHEDULING PROBLEM.
* 
*  REFERENCE: KENDRICK D, MEERAUS A AND ALATORRE J, 1984, THE PLANNING OF 
*             INVESTMENT PROGRAMS IN THE STEEL INDUSTRY, THE JOHNS HOPKINS
*             UNIVERSITY PRESS, BALTIMORE AND LONDON. 
  
 SET I     STEEL PLANTS            / AHMSA      ALTOS HORNOS - MONCLOVA 
                                     FUNDIDORA  MONTERREY 
                                     SICARTSA   LAZARO CARDENAS 
                                     HYLSA      MONTERREY 
                                     HYLSAP     PUEBLA
                                                                        / 
  
  
     J     MARKETS                 / MEXICO-DF, MONTERREY, GUADALAJA /
  
     C     COMMODITIES             / PELLETS    IRON ORE PELLETS - TONS 
                                     COKE       TONS
                                     NAT-GAS    NATURAL GAS - 1000 N CUBIC METERS 
                                     ELECTRIC   ELECTRICITY - MWH 
                                     SCRAP      TONS
                                     PIG-IRON   MOLTEN PIG IRON - TONS
                                     SPONGE     SPONGE IRON - TONS
                                     STEEL      TONS                   /
  
     CF(C) FINAL PRODUCTS          / STEEL /
  
  
     CI(C) INTERMEDIATE PRODUCTS   / SPONGE, PIG-IRON / 
  
     CR(C) RAW MATERIALS           / PELLETS, COKE, NAT-GAS, ELECTRIC, SCRAP /
  
     P     PROCESSES               / PIG-IRON   PIG IRON PRODUCTION FROM PELLETS
                                     SPONGE     SPONGE IRON PRODUCTION
                                     STEEL-OH   STEEL PRODUCTION: OPEN HEARTH 
                                     STEEL-EL   STEEL PRODUCTION: ELECTRIC FURNACE
                                     STEEL-BOF  STEEL PRODUCTION: BOF   / 
  
     M     PRODUCTIVE UNITS        / BLAST-FURN BLAST FURNACES
                                     OPENHEARTH OPEN HEARTH FURNACES
                                     BOF        BASIC OXYGEN CONVERTERS 
                                     DIRECT-RED DIRECT REDUCTION UNITS
                                     ELEC-ARC   ELECTRIC ARC FURNACES    /
  
$STITLE MODEL PARAMETERS
          TABLE  A(C,P)  INPUT-OUTPUT COEFFICIENTS
  
            PIG-IRON  SPONGE  STEEL-OH  STEEL-EL  STEEL-BOF 
  
 PELLETS     -1.58     -1.38
 COKE         -.63
 NAT-GAS                -.57
 ELECTRIC                                 -.58
 SCRAP                          -.33                -.12
 PIG-IRON     1.0               -.77                -.95
 SPONGE                 1.0              -1.09
 STEEL                          1.0       1.0       1.0 
  
  
          TABLE  B(M,P)  CAPACITY UTILIZATION 
  
             PIG-IRON  SPONGE  STEEL-OH  STEEL-EL  STEEL-BOF
  
 BLAST-FURN     1.0 
 OPENHEARTH                        1.0
 BOF                                                  1.0 
 DIRECT-RED               1.0 
 ELEC-ARC                                    1.0
  
  
          TABLE  K(M,I)   CAPACITIES OF PRODUCTIVE UNITS (MILL TPY) 
  
             AHMSA  FUNDIDORA  SICARTSA  HYLSA  HYLSAP
  
 BLAST-FURN   3.25    1.40        1.10
 OPENHEARTH   1.50     .85
 BOF          2.07    1.50        1.30
 DIRECT-RED                                .98    1.00
 ELEC-ARC                                 1.13     .56
  
  
   SCALARS     DT       TOTAL DEMAND FOR FINAL GOODS IN 1979 (MILLION TONS) /  5.209 /
               RSE      RAW STEEL EQUIVALENCE (PERCENT)                     / 40     /
   PARAMETERS  D(C,J)   DEMAND FOR STEEL IN 1979 (MILL TPY) 
               DD(J)    DISTRIBUTION OF DEMAND / MEXICO-DF   55, MONTERREY   30, GUADALAJA   15 /;
  
   D("STEEL",J) = DT * (1 + RSE/100) * DD(J)/100; 
  
$EJECT
          TABLE  RD(*,*)   RAIL DISTANCES FROM PLANTS TO MARKETS (KM) 
  
             MEXICO-DF  MONTERREY  GUADALAJA    EXPORT
  
 AHMSA          1204      218        1125          739
 FUNDIDORA      1017                 1030          521
 SICARTSA        819     1305         704 
 HYLSA          1017                 1030          521
 HYLSAP          185     1085         760          315
 IMPORT          428      521         300 
  
  
   PARAMETER  MUF(I,J)  TRANSPORT RATE: FINAL PRODUCTS(US$ PER TON) 
              MUV(J)    TRANSPORT RATE: IMPORTS       (US$ PER TON) 
              MUE(I)    TRANSPORT RATE: EXPORTS       (US$ PER TON) ; 
  
  
        MUF(I,J) = ( 2.48 + .0084*RD(I,J))       $RD(I,J);
        MUV(J)   = ( 2.48 + .0084*RD("IMPORT",J))$RD("IMPORT",J); 
        MUE(I)   = ( 2.48 + .0084*RD(I,"EXPORT"))$RD(I,"EXPORT"); 
  
  
  
          TABLE PRICES(C,*)  PRODUCT PRICES (US$ PER UNIT)
  
             DOMESTIC  IMPORT  EXPORT 
  
 PELLETS        18.7
 COKE           52.17 
 NAT-GAS        14.0
 ELECTRIC       24.0
 SCRAP         105.0
 STEEL                   150.   140.
  
  
  
   PARAMETERS  PD(C)   DOMESTIC PRICES(US$ PER UNIT)
               PV(C)   IMPORT PRICES  (US$ PER UNIT)
               PE(C)   EXPORT PRICES  (US$ PER UNIT)
               EB      EXPORT BOUND   (MILL TPY) ;
  
      PD(C) = PRICES(C,"DOMESTIC"); 
      PV(C) = PRICES(C,"IMPORT"); 
      PE(C) = PRICES(C,"EXPORT"); 
      EB    = 1.0;
  
$STITLE MODEL DEFINITION
 VARIABLES  Z(P,I)          PROCESS LEVEL                             (MILL TPY)
            X(C,I,J)        SHIPMENT OF FINAL PRODUCTS                (MILL TPY)
            U(C,I)          PURCHASE OF DOMESTIC MATERIALS (MILL UNITS PER YEAR)
            V(C,J)          IMPORTS                                   (MILL TPY)
            E(C,I)          EXPORTS                                   (MILL TPY)
            PHI             TOTAL COST                                (MILL US$)
            PHIPSI          RAW MATERIAL COST                         (MILL US$)
            PHILAM          TRANSPORT COST                            (MILL US$)
            PHIPI           IMPORT COST                               (MILL US$)
            PHIEPS          EXPORT REVENUE                            (MILL US$)
  
 POSITIVE VARIABLES Z, X, U, V, E 
  
 EQUATIONS  MBF(C,I)        MATERIAL BALANCES: FINAL PRODUCTS         (MILL TPY)
            MBI(C,I)        MATERIAL BALANCES: INTERMEDIATES          (MILL TPY)
            MBR(C,I)        MATERIAL BALANCES: RAW MATERIALS          (MILL TPY)
            CC(M,I)         CAPACITY CONSTRAINT                       (MILL TPY)
            MR(C,J)         MARKET REQUIREMENTS                       (MILL TPY)
            ME(C)           MAXIMUM EXPORT                            (MILL TPY)
            OBJ             ACCOUNTING: TOTAL COST                    (MILL US$)
            APSI            ACCOUNTING: RAW MATERIAL COST             (MILL US$)
            ALAM            ACCOUNTING: TRANSPORT COST                (MILL US$)
            API             ACCOUNTING: IMPORT COST                   (MILL US$)
            AEPS            ACCOUNTING: EXPORT COST                   (MILL US$); 
  
   MBF(CF,I)..  SUM(P, A(CF,P)*Z(P,I)) =G= SUM(J, X(CF,I,J)) + E(CF,I); 
  
   MBI(CI,I)..  SUM(P, A(CI,P)*Z(P,I)) =G= 0 ;
  
   MBR(CR,I)..  SUM(P, A(CR,P)*Z(P,I)) + U(CR,I) =G= 0 ;
  
   CC(M,I)..    SUM(P, B(M,P)*Z(P,I)) =L= K(M,I); 
  
   MR(CF,J)..   SUM(I, X(CF,I,J)) + V(CF,J) =G= D(CF,J);
  
   ME(CF)..     SUM(I, E(CF,I)) =L= EB ;
  
   OBJ..        PHI      =E= PHIPSI + PHILAM + PHIPI - PHIEPS ; 
  
   APSI..       PHIPSI   =E= SUM((CR,I), PD(CR)*U(CR,I)) ;
  
   ALAM..       PHILAM   =E= SUM((CF,I,J), MUF(I,J)*X(CF,I,J))
                           + SUM((CF,J),   MUV(J)*V(CF,J))
                           + SUM((CF,I),   MUE(I)*E(CF,I))     ;
  
   API..        PHIPI    =E= SUM((CF,J), PV(CF)*V(CF,J)) ;
  
   AEPS..       PHIEPS   =E= SUM((CF,I), PE(CF)*E(CF,I)) ;
  
 MODEL MEXSS  SMALL STATIC PROBLEM / ALL / ;
  
 SOLVE MEXSS USING LP MINIMIZING PHI ;
