MODEL Transport

/*----------------------------------------------------------------------------*/
/* Data Creare     : 18 Iunie     1997                                        */
/* Data Modificare : 27 Octombrie 1997                                        */
/*----------------------------------------------------------------------------*/

/*----------------------------------------------------------------------------*/
/* Sursa : Dantzig, G B., Linear Programming and Extensions Princeton Univers.*/
/* Press, Princeton, New Jersey, 1963,Chapter 3-3.                            */
/*                                                                            */
/* Model de transport produse din citeva centre la mai multe piete.           */
/* O companie cu mai multe centre de productie  livreaza produsele unor piete */
/* conform cu cerintele acestora. Se cere minimizarea costurilor de transport */
/*----------------------------------------------------------------------------*/

    FILE ftr="trnsport.dat"

    INTEGER

      nrcp READ ftr IS nrcp>0; /* Numar centre de productie */

      nrmk READ ftr IS nrmk>0  /* Numar piete de desfacere */

    RANGE

      cp=[1,nrcp]; /* Coduri interne pentru centre de productie */

      mk=[1,nrmk]  /* Coduri interne pentru piete */

    REAL

      A[cp] READ ftr IS FOR[c In cp] a[c]>0.0;

        /* Capacitati de productie in unitati conventionale */

      B[mk] READ ftr IS FOR[m IN mk] b[m]>0.0;

        /* Cereri pe piata in unitati conventionale */

      D[cp,mk] READ ftr IS For[c IN cp,m IN mk] d[c,m]>0.0;

        /* Distanta de transport in sute de mile a unei unitati conventionale */

      F Read ftr Is F >0.0 ;

        /* Cost de transport in dolari pe suta de mile a unei unitati conv. */

      CT[cp,mk] IS FOR[c IN cp,m IN mk]  CT[c,m] = F * D[c,m] / 1000

        /* Cost de transport in sute de dolari pe unitate conventionala */

  VARIABLES

    X[cp,mk] /* Cantitati transportate in unitati conventionale */
 

  OBJECTIVES

    COST IS COST:= SUM[c IN cp,m IN mk]( CT[c,m]*X[c,m])

        /* Costul total pentru transport produse */

    MINIMIZE COST
 

  CONSTRAINTS
 

       rcap[cp] IS FOR[c IN cp] rcap[c]:= SUM[m IN mk] (X(c,m)) <= A[c] ;

        /* Cantitatea transportata la piete dintr-un centru  nu poate */
        /* depasi capacitatea productiva din acel centru de productie */
 

       rdem[mk] IS FOR[m IN mk] rdem[m]:= SUM[c IN cp] (X[c,m]) >= B[m]

        /* Cantitatea livrata unei piete din toate centrele trebuie sa */
        /* satisfaca minimul cerut de acea piata */

END


Return la Tabela Modele