MODEL Centrala_Bucuresti_Sud

/*----------------------------------------------------------------------------*/
/* Data Creare     : 03 August    1995                                        */
/* Data Modificare : 07 Octombrie 1997                                        */
/*----------------------------------------------------------------------------*/

/*----------------------------------------------------------------------------*/
/*     Modelul reprezinta o aproximare lineara a procesului desfasurat zilnic */
/* in centrala CET-SUD Bucuresti care  furnizeaza  energie  termica (abur sau */
/* apa calda) unor beneficiari din imprejurimi. Consumul/productia de energie */
/* electrica se incadreaza in cerintele impuse de sistemul energetic national.*/
/*     Centrala consuma gaz metan, pacura, apa rece,energie electrica, pentru */
/* a produce energie termica ( abur sau apa calda ) si energie electrica care */
/* sunt furnizate beneficiarilor conform unor cerinte sau grafice orare.      */
/*     Centrala este  alcatuita dintr-un set de obiecte modelate care apartin */
/* de urmatoarelor clase : cazane ce produc abur, cazane ce produc apa calda, */
/* boilere captatoare de energie calorica (din aburul  utilizat de turbine si */
/* prin intermediul  apei reci ) , statii de reducere si racire abur, bari de */
/* abur, bara de apa calda, bara de energie electrica , turbine ( compuse din */
/* prize de citeva tipuri ), prize din citeva tipuri care sunt componente ale */
/* turbinelor, rezervor de pacura , conducta de aprovizionare centrala cu gaz */
/* metan. Fiecare  obiect are una sau mai multe intrari precum si una sau mai */
/* multe iesiri. O intrare a unui obiect  este o iesire din alt obiect, iar o */
/* iesire este de regula o intrare pentru alt obiect.                         */
/*     Modelul isi propune sa minimizeze costurile necesare pentru ca centrala*/
/* sa-si onoreze contractele pe un anumit interval de timp orar (sub 24 ore). */
/* Daca exista o solutie  optima din  rezolvarea modelului, indirect ea ne va */
/* spune ce comenzi  trebuie sa dam orar unor  obiecte din centrala pentru ca */
/* impreuna sa realizeze acel  proces de functionare incit sa reduca la maxim */
/* costurile pentru  indeplinirea  obligatiilor. Aceasta inseamna ca aprioric */
/* se cunoaste acea  stare de pe aparatura de comanda  care aduce economii pe */
/* intervalul abordat.                                                        */
/*     Trebuie mentionat ca tot ce tine de costurile legate de apa rece si de */
/* tratamentul ei precum si alti  factori de cost nu au  fost luati in calcul */
/* fiind considerat un cost inevitabil. In schimb consumul de combustibil gaz */
/* metan sau pacura, modul de repartie pe obiectele  consumatoare, eventualul */
/* consum de energie electrica sunt decidente in  costul global al procesului.*/
/*----------------------------------------------------------------------------*/

    FILE fcsd="cetsud.dat"

 /* DECLARATII VARIABILE AUXILIARE */
 /*================================*/

    INTEGER
 

 THRZ   READ fcsd;    /* Numar Ore din orizontul de lucru    */
 

        /* Marimea claselor de obiecte din centrala */

 NCAB   READ fcsd;    /* Numar Cazane producatoare de abur   */
 NCAF   READ fcsd;    /* Numar Cazane producatoare apa calda */
 NBLR   READ fcsd;    /* Numar Boilere captatoare caldura    */
 NTRB   READ fcsd;    /* Numar Turbine pentru en.electrica   */
 NSRR   READ fcsd;    /* Numar Statii reducere-racire        */
 NCNAB  READ fcsd;    /* Numar Consumatori de abur           */
 NCNAF  READ fcsd;    /* Numar Consumatori de apa calda      */
 NBAB   READ fcsd     /* Numar Bare de abur                  */

        /* Domenii */

    RANGE

 HRZ    = [1,THRZ];   /* Orizontul de optimizare             */
 HRZE   = [1,THRZ+1]; /* Orizontul extins                    */
 HRZR   = [1,THRZ-1]; /* Orizontul redus                     */

 CAB    = [1,NCAB];   /* Coduri interne cazane abur          */
 CAF    = [1,NCAF];   /* Coduri interne cazane apa calda     */
 BLR    = [1,NBLR];   /* Coduri interne boilere              */

 SRR    = [1,NSRR];   /* Coduri interne statii reduc.-racire */

 TRB    = [1,NTRB];   /* Coduri interne turbine              */

 CNAB   = [1,NCNAB];  /* Coduri interne consumatori de abur  */
 CNAF   = [1,NCNAF];  /* Coduri interne consumatori apa calda*/

 BAB    = [1,NBAB]    /* Coduri interne bare de abur         */

/*----------------------------------------------------------------------------*/

    INTEGER

 /* Accesibilitatea CAB-uri la combustibil */

 CABG [cab] READ fcsd;  /* Accesul la gaz metan */

 CABP [cab] READ fcsd;  /* Accesul la pacura    */

 /* Accesibilitatea CAF-uri la combustibil */

 CAFG [caf] READ fcsd;  /* Accesul la gaz metan */

 CAFP [caf] READ fcsd;  /* Accesul la pacura    */

 /* Compozitia TRB-uri privitor la prize */

 TPIN [trb] READ fcsd;  /* Priza industriabila reglabila */
 TPTM [trb] READ fcsd;  /* Priza termoficare reglabila   */
 TPRG [trb] READ fcsd;  /* Priza regenerativa            */
 TPNR [trb] READ fcsd;  /* Priza nereglabila             */
 TPCD [trb] READ fcsd   /* Regim in condensatie          */

 /* 1/0 = turbina dispune/nu dispune de priza respectiva */

/*----------------------------------------------------------------------------*/

    REAL

 /* Preturi de achizitie */

 PRG        READ fcsd;  /* Gaz metan        [lei/Nm3] */

 PRP        READ fcsd;  /* Pacura           [lei/Kg ] */

 PRPEA [hrz]READ fcsd;  /* Putere electrica [lei/Kwh] */

/*----------------------------------------------------------------------------*/

 /* Limite ce privesc combustibilul si consumul pe centrala */

 OGRZI READ fcsd; /* Consum minim de gaz [Nm3/s] */

 OGRZS READ fcsd; /* Consum maxim de gaz [Nm3/s] */

 PRZI  READ fcsd; /* Stoc minim admis in rezervorul de pacura [kg] */

 PRZS  READ fcsd; /* Stoc maxim admis in rezervorul de pacura [kg] */

 OPRZI READ fcsd; /* Consum minim din rezervorul de pacura  [kg/s] */

 OPRZS READ fcsd; /* Consum maxim din rezervorul de pacura  [kg/s] */

 PRZINI READ fcsd;/* Stocul rezervor pacura la inceput proces [kg] */

/*----------------------------------------------------------------------------*/

 /* Constante de transformare combustibil --> abur in CAB-uri */

 GAB     [cab] READ fcsd;  /* Gaz metan-->abur  [kg/Nm3] */

 PAB     [cab] READ fcsd;  /* Pacura-->abur     [kg/kg]  */

 PACTCAB [cab] READ fcsd;  /* Pierdere de activizare [kg abur/s] */

 /* Constante de transformare combustibil --> abur in CAF-uri */

 GAF     [caf] READ fcsd;  /* Gaz metan->apa calda [Gcal/h/Nm3/s] */

 PAF     [caf] READ fcsd;  /* Pacura --> apa calda [Gcal/h/kg/s]  */

 PACTCAF [caf] READ fcsd;  /* Pierderea de activizare [Gcal/h]    */

/*----------------------------------------------------------------------------*/

 /* Consum maxim de combustibil permis pentru CAB-uri */

 GCABS [cab] READ fcsd; /* Maxim gaz metan [Nm3/s]*/

 PCABS [cab] READ fcsd; /* Maxim pacura    [kg/s] */

        /* Debit minim/maxim de abur permis a se produce in CAB-uri */

 OCABI [cab] READ fcsd; /* Minimul de abur [kg/s] */

 OCABS [cab] READ fcsd; /* Maximul de abur [kg/s] */

/*----------------------------------------------------------------------------*/

 /* Consum maxim de combustibil permis pentru CAF-uri */

 GCAFS [caf] READ fcsd; /* Maxim gaz metan [Nm3/s] */

 PCAFS [caf] READ fcsd; /* Maxim pacura    [kg/s]  */

        /* Debit minim/maxim caldura permisa a se produce in CAF-uri */

 OCAFI [caf] READ fcsd; /* Minim caldura [Gcal/h] */

 OCAFS [caf] READ fcsd  /* Maxim caldura [Gcal/h] */

/*----------------------------------------------------------------------------*/

    REAL

 /* Margini superioare de preluare caldura de catre BLR-uri */

 OBLRS [blr] READ fcsd; /* Maxim caldura [Gcal/h] */

 TABAF [blr] READ fcsd;

 /* Coeficient de transformare abur-caldura [kg abur/s/Gcal/h] */

/*----------------------------------------------------------------------------*/

 /* Margini ale debitului de intrare in SRR-uri */

 ISRRI [srr] READ fcsd; /* Minim abur [kg/s]  */

 ISRRS [srr] READ fcsd; /* Maxim abur [kg/s]  */

 TABAB [srr] READ fcsd;

 /* Coeficient de transformare abur-abur in SRR-uri [kg/s/kg/s] */

/*----------------------------------------------------------------------------*/

 /* Limitari de abur la intrare/putere generata TRB-uri */

 ITRBI [trb] READ fcsd; /* Minim abur   [kg/s] */

 ITRBS [trb] READ fcsd; /* Maxim abur   [kg/s] */

 WTRBS [trb] READ fcsd; /* Puterea maxima [kw] */
 

 /* Limitari ale aburului la intrare in prizele turbinelor */

 IPNRI [trb] READ fcsd; /* Minim PNR [kg/s] */

 IPNRS [trb] READ fcsd; /* Maxim PNR [kg/s] */

 IPINI [trb] READ fcsd; /* Minim PIN [kg/s] */

 IPINS [trb] READ fcsd; /* Maxim PIN [kg/s] */

 IPTMI [trb] READ fcsd; /* Minim PTM [kg/s] */

 IPTMS [trb] READ fcsd; /* Maxim PTM [kg/s] */

 IPRGI [trb] READ fcsd; /* Minim PRG [kg/s] */

 IPRGS [trb] READ fcsd; /* Maxim in PRG [kg/s] */

 IPCDI [trb] READ fcsd; /* Minim in PCD [kg/s] */

 IPCDS [trb] READ fcsd; /* Maxim in PCD [kg/s] */

 /* Constantele de transformare abur-putere */

 HPNR [trb] READ fcsd;  /* H prize nereglabile */

 HPIN [trb] READ fcsd;  /* H prize industriale */

 HPTM [trb] READ fcsd;  /* H prize termoficare */

 HPRG [trb] READ fcsd;  /* H prize regenerative*/

 HPCD [trb] READ fcsd;  /* H in condensatie    */

 EPRG [trb] READ fcsd;  /* E prize regenerative*/

 EPNR [trb] READ fcsd;  /* E prize nereglabile */

 PACTW[trb] READ fcsd;  /* Pierderea in activizare turbine [kw] */

/*----------------------------------------------------------------------------*/

 /* Consumuri de abur, caldura si putere */

 CNSAB [cnab,hrz] READ fcsd; /* Abur solicitat     [kg/s]   */

 CNSAF [cnaf,hrz] READ fcsd; /* Caldura solicitata [Gcal/h] */

 CNSEL [hrz]      READ fcsd; /* Consum electric    [kw]    */

/*----------------------------------------------------------------------------*/

 /* Limite ale energiei/puterii achizitionate/livrate */

 PEAS [hrz] READ fcsd;  /* Maxim putere achizitionata     [kw] */

 PELS [hrz] READ fcsd;  /* Maxim putere electrica livrata [kw] */

 ENAI       READ fcsd;  /* Minim energie achizitionata [kwh/zi]*/

 ENAS       READ fcsd;  /* Maxim energie achizitionata [kwh/zi]*/

 ENLI       READ fcsd;  /* Minimul energiei livrate    [kwh/zi]*/

 ENLS       READ fcsd   /* Maximul de energie livrata  [kwh/zi]*/

/*============================================================================*/

  VARIABLES
 

    XORZG [hrz] IS FOR [k IN hrz] XORZG[k] IN [OGRZI,OGRZS];

 /* Debit orar de consum gaz metan pe centrala [Nm3/sec] */

    XRZP [hrze] IS {FOR [k IN hrz] XRZP[k+1] IN [PRZI,PRZS];XRZP[1] = PRZINI};

 /* Cantitatea existenta orar in rezervorul de pacura */

    XIRZP [hrz]; /* Debit orar de pacura necesar a fi introdus in rezervor */

        /*pentru a sustine consumul cerut pe intreaga centrala [kg/sec] */

    XORZP [hrz] IS FOR [k IN hrz] XORZP[k] IN [OPRZI,OPRZS];

 /* Debit orar consumat din rezervorul de pacura [kg/sec] */

/*----------------------------------------------------------------------------*/

    XGCAB [cab,hrz] IS FOR [j IN cab, k IN hrz] XGCAB[j,k] <= GCABS[j];

 /* Debit gaz metan la intrare in CAB */

    XPCAB [cab,hrz] IS FOR [j IN cab, k IN hrz] XPCAB[j,k] <= PCABS[j];

 /* Debit pacura la intrare in CAB */

    XOCAB [cab,hrz] IS /* Debit abur la iesire din CAB */

          FOR [j IN cab, k IN hrz] XOCAB[j,k] IN [OCABI[j],OCABS[j]];

    XGCAF [caf,hrz] IS FOR [j IN caf, k IN hrz] XGCAF[j,k] <= GCAFS[j];

 /* Debit gaz metan la intrare in CAF */

    XPCAF [caf,hrz] IS FOR [j IN caf, k IN hrz] XPCAF[j,k] <= PCAFS[j];

 /* Debit pacura la intrare in CAF */

    XOCAF [caf,hrz] IS  /* Debit abur la iesire din CAF */

          FOR [j IN caf, k IN hrz] XOCAF[j,k] IN [OCAFI[j],OCAFS[j]];

/*----------------------------------------------------------------------------*/

    XIBLR  [blr,hrz]; /* Debit abur la intrare in boilere */

    XOBLR  [blr,hrz] IS FOR [k IN hrz] /* Debit apa la iesire din boilere */

           { FOR [j IN [1,6]] XOBLR[j,k] <= OBLRS[j];

             FOR [j IN [8,9]] XOBLR[j,k] <= OBLRS[j]};

/*----------------------------------------------------------------------------*/
 

    XISRR [srr,hrz] IS  /* Debit la intrare statii reducere-racire */

          FOR [j IN srr, k IN hrz] XISRR[j,k] IN [ISRRI[j],ISRRS[j]];

    XOSRR [srr,hrz]; /* Debit la iesire statii reducere-racire */

/*----------------------------------------------------------------------------*/

    XUAB [cnab,hrz] IS FOR[j IN cnab,k IN hrz] XUAB[j,k] = CNSAB[j,k];

 /* Debit abur furnizat consumatorilor */

    XUEF [cnaf,hrz] IS FOR[j IN cnaf,k IN hrz] XUEF[j,k] = CNSAF[j,k];

 /* Debit caldura furnizata consumatorilor */

/*----------------------------------------------------------------------------*/

    XITRB [trb,hrz] IS  /* Debit de abur la intrare in turbine */

          FOR[j IN trb, k IN hrz] XITRB[j,k] IN [ITRBI[j],ITRBS[j]];

    XOTRB [trb,hrz] IS FOR[j IN trb,k IN hrz] XOTRB[j,k] <= WTRBS[j];

 /* Puterea electrica generata de turbine */

    XPNR  [trb,hrz] IS FOR[k IN hrz] XPNR[5,k] IN [IPNRI[5],IPNRS[5]];

 /* Debit abur in prizele nereglabile */

    XPIN  [trb,hrz] IS  /* Debit abur in prizele industriale */

          FOR[j IN trb,k IN hrz] XPIN[j,k] IN [IPINI[j],IPINS[j]];

    XPTM  [trb,hrz] IS  /* Debit abur in prizele de termoficare */

          FOR[j IN trb,k IN hrz] XPTM[j,k] IN [IPTMI[j],IPTMS[j]];

    XPCD  [trb,hrz] IS  /* Debit abur in turbina in condensatie */

          FOR[j IN trb,k IN hrz] XPCD[j,k] IN [IPCDI[j],IPCDS[j]];

/*----------------------------------------------------------------------------*/

    XUEWH [hrz] IS FOR[k IN hrz] XUEWH[k] <= PELS[k];

 /* Puterea electrica livrata */

    XACWH [hrz] IS FOR[k IN hrz] XACWH[k] <= PEAS[k];

 /* Puterea electrica achizitionata */

    XUIWH [hrz] IS FOR[k IN hrz] XUIWH[k] = CNSEL[k];

 /* Consumul energie electrica */

/*----------------------------------------------------------------------------*/

/*  Variabile Statistice ce privesc procesul din centrala */

    XABH  [hrz]; /* Debit total orar abur generat */

    XAB   ;      /* Debit total de abur generat   */

    XAFH  [hrz]; /* Debit total orar de caldura   */

    XAF   ;      /* Debit total de caldura        */

    XWH   [hrz]; /* Puterea electrica totala orara*/

    XW    ;      /* Puterea electrica totala      */

    XCWAH [hrz]; /* Cheltuieli orare cu energie el. achizitionata */

    XCWA  ;      /* Cheltuieli totale cu energie el. achizitionata*/

    XCGH  [hrz]; /* Cheltuieli orare pentru gazul consumat        */

    XCG   ;      /* Cheltuieli totale pentru gazul consumat       */

    XCPH  [hrz]; /* Cheltuieli orare pentru pacura consumata      */

    XCP   ;      /* Cheltuieli totale cu pacura consumata         */

    XCCMBH[hrz]; /* Cheltuieli orale cu combustibilul consumat    */

    XCCMB ;      /* Cheltuieli totale cu combustibilul consumat   */

    XCTH  [hrz]; /* Cheltuieli orare pe centrala                  */

    XCT   ;      /*Cheltuieli totale pe centrala                  */

    XUEW  IS XUEW IN [ENLI,ENLS]; /* Energia totala livrata       */

    XACW  IS XACW IN [ENAI,ENAS]  /* Energia totala achizitionata */
 

/*============================================================================*/

  OBJECTIVES
 

    cost  IS cost:= 3600.0 * SUM[k IN hrz](PRP*XORZP[k]+PRG*XORZG[k]) +

                    SUM[k IN hrz] (PRPEA[k]*XACWH[k])

 /* Cheltuieli pe combustibil si energie electrica achizitionata */
 /* pe intregul orizont de lucru supus procesului de optimizare  */

    MINIMIZE cost

/*============================================================================*/

  CONSTRAINTS
 

    DRZP [hrz] IS FOR [k IN hrz]  /* Dinamica rezervorului de pacura */

         DRZP[k] := XRZP[k+1] = XRZP[k] + (XIRZP[k]-XORZP[k])*3600.;

/*----------------------------------------------------------------------------*/

    BRZG  [hrz] IS FOR [k IN hrz] BRZG[k] := XORZG[k] =

          SUM[j IN cab](CABG[j]*XGCAB[j,k])+SUM[j IN caf] (CAFG[j]*XGCAF[j,k]);

 /* Bilantul de consum orar de gaz metan pe intreaga centrala */

    BRZP  [hrz] IS FOR [k IN hrz] BRZP[k] := XORZP[k] =

          SUM[j IN cab](CABP[j]*XPCAB[j,k])+SUM[j IN caf] (CAFP[j]*XPCAF[j,k]);

 /* Bilantul de consum orar de pacura pe intreaga centrala */
 /* Este bilantul consumului orar din rezervorul de pacura */
 

/*----------------------------------------------------------------------------*/

/* Ecuatiile CAB-urilor */

    ECAB [cab,hrz] IS FOR [j IN cab, k IN hrz] ECAB[j,k] := XOCAB[j,k] =

         CABG[j]*GAB[j]*XGCAB[j,k] + CABP[j]*PAB[j]*XPCAB[j,k] - PACTCAB[j];

 /* Debit de abur din CAB-uri */

    CAB5TR [hrz] IS FOR [k IN hrz] CAB5TR[k] := XOCAB[5,k] = XITRB[5,k];

    CAB6TR [hrz] IS FOR [k IN hrz] CAB6TR[k] := XOCAB[6,k] = XITRB[6,k];

        /* Bilant la legaturi CAB-uri - turbine */

/*----------------------------------------------------------------------------*/

/* Ecuatiile CAF-urilor */

    ECAF [caf,hrz] IS FOR [j IN caf, k IN hrz] ECAF[j,k] := XOCAF[j,k] =

         CAFG[j]*GAF[j]*XGCAF[j,k] + CAFP[j]*PAF[j]*XPCAF[j,k] - PACTCAF[j];

 /* Debit de abur din CAF-uri */

/*----------------------------------------------------------------------------*/
 

/* Ecuatiile boilerelor */

    EBLR [blr,hrz] IS FOR [k IN hrz] /* Debit de abur in boilere */

         { FOR [j IN [1,6]] EBLR[j,k] := XIBLR[j,k] = TABAF[j]*XOBLR[j,k];

           FOR [j IN [8,9]] EBLR[j,k] := XIBLR[j,k] = TABAF[j]*XOBLR[j,k]};

/* Bilant la legaturi boilere - turbine */

    BLR2TR [hrz] IS FOR [k IN hrz] BLR2TR[k] := XPTM[2,k] = XIBLR[2,k];

    BLR3TR [hrz] IS FOR [k IN hrz] BLR3TR[k] := XPTM[3,k] = XIBLR[3,k];

    BLR4TR [hrz] IS FOR [k IN hrz] BLR4TR[k] := XPTM[4,k] = XIBLR[4,k];

    BLR5TR [hrz] IS FOR [k IN hrz] BLR5TR[k] := XPNR[5,k] = XIBLR[5,k];

    BLR6TR [hrz] IS FOR [k IN hrz] BLR6TR[k] := XPCD[6,k] = XIBLR[6,k];

    BLR8TR [hrz] IS FOR [k IN hrz] BLR8TR[k] := XPTM[5,k] = XIBLR[8,k];

    BLR9TR [hrz] IS FOR [k IN hrz] BLR9TR[k] := XPTM[6,k] = XIBLR[9,k];

/*----------------------------------------------------------------------------*/

    B1BAB [hrz] IS FOR [k IN hrz] B1BAB[k] := SUM[j IN [1,4]](XOCAB[j,k])=

           SUM[j IN [1,4]](XITRB[j,k]) + XISRR[1,k] + XISRR[2,k];

 /* Bilant la prima bara de abur (inalta presiune) */

    B2BAB [hrz] IS FOR [k IN hrz] B2BAB[k] :=

           XOSRR[2,k]+XPIN[1,k] = XISRR[4,k]+XUAB[1,k]+XUAB[3,k];

 /* Bilant la a doua bara de abur */

    B3BAB [hrz] IS FOR [k IN hrz] B3BAB[k] := XOSRR[1,k] + XOSRR[4,k] +

           XPIN[2,k]= XISRR[3,k]+XUAB[2,k]+XUAB[4,k];

 /* Bilant la a treia bara de abur */

    B4BAB [hrz] IS FOR [k IN hrz] B4BAB[k] :=

          XOSRR[3,k]+XPTM[1,k] = XUAB[5,k] + XUAB[6,k] + XIBLR[1,k];

 /* Bilant la a patra bara de abur */

    BBAF  [hrz] IS FOR [k IN hrz] BBAF[k] := SUM[j IN caf](XOCAF[j,k]) +

          SUM[j IN [1,6]](XOBLR[j,k])+ SUM[j IN [8,9]](XOBLR[j,k])=XUEF[1,k];

 /* Bilant la bara de caldura */

/*----------------------------------------------------------------------------*/

    ESRR [srr,hrz] IS FOR [j IN srr, k IN hrz] /* Ecuatiile SRR-uri */

         ESRR[j,k] :=  XISRR[j,k] = TABAB[j]*XOSRR[j,k];
 
 

/*----------------------------------------------------------------------------*/

/* Ecuatiile turbinelor */

    BATRB [trb,hrz] IS FOR [j IN trb, k IN hrz] BATRB[j,k] := XITRB[j,k]=

      TPIN[j]*XPIN[j,k]+TPTM[j]*XPTM[j,k]+TPNR[j]*XPNR[j,k]+TPCD[j]*XPCD[j,k];

 /* Bilant abur in turbine */

    RPNR [hrz] IS FOR [k IN hrz] RPNR[k] :=XPNR[5,k]= EPNR[5]*XITRB[5,k];

 /* Ecuatia prizei nereglabile */

    BWTRB [trb,hrz] IS FOR [j IN trb, k IN hrz] BWTRB[j,k] := XOTRB[j,k] =

          TPIN[j] * HPIN[j] * XPIN[j,k] + TPTM[j] * HPTM[j] * XPTM[j,k] +

          TPNR[j]*HPNR[j]*XPNR[j,k] + TPCD[j] * HPCD[j] * XPCD[j,k] - PACTW[j];

 /* Ecuatia de generare putere electrica in turbine */

/*----------------------------------------------------------------------------*/

    BBEL [hrz] IS FOR[k IN hrz] BBEL[k] :=

          SUM[j IN trb] (XOTRB[j,k]) + XACWH[k] = XUIWH[k] + XUEWH[k];

        /* Bilantul la bara de putere electrica */

/*----------------------------------------------------------------------------*/

/* Ecuatii de limitare a energiei achizitionate/livrate */

    RACW  IS RACW := XACW = SUM[k IN hrz] (XACWH[k]);

 /* Limitare superioara a energiei achizitionate */

    RUEW IS RUEW := XUEW = SUM[k IN hrz] (XUEWH[k]);

 /* Ecuatia de limitare superioara a energiei livrate */

/*----------------------------------------------------------------------------*/
 

/* Ecuatii pentru statistica pe Centrala */

    BABH [hrz] IS  /* Abur orar generat */

         FOR [k IN hrz] BABH[k] :=XABH[k]= SUM[j IN cab](3600.0 * XOCAB[j,k]);

    RBAB IS  RBAB := XAB = SUM[k IN hrz] (XABH[k]) ; /* Abur total generat */

    BAFH [hrz] IS FOR [k IN hrz] BAFH[k]:= XAFH[k] = XUEF[1,k];

        /* Caldura orara generata */

    BAF IS BAF := XAF = SUM[k IN hrz](XAFH[k]); /* Caldura totala generata */

    BWH [hrz] IS FOR [k IN hrz]  BWH[k] := XWH[k] = SUM[j IN trb](XOTRB[j,k]);

        /* Putere orara generata */

    BWT IS BWT := XW = SUM[k IN hrz](XWH[k]); /* Puterea totala generata */

    BGH [hrz] IS FOR [k IN hrz] BGH[k] := XCGH[k] = 3600.0 * XORZG[k] * PRG ;

        /* Cheltuieli orare pentru gaz metan */

    BGT IS BGT := XCG = SUM[k IN hrz](XCGH[k]); /* Cheltuieli pe gaz metan */

    BPH [hrz] IS FOR [k IN hrz] BPH[k] := XCPH[k] = 3600.0 * XORZP[k] * PRP;

        /* Cheltuieli orare pentru pacura */

    BPT IS BPT := XCP = SUM[k IN hrz](XCPH[k]); /* Cheltuieli pentru pacura */

    BCCMBH [hrz] IS FOR [k IN hrz] BCCMBH[k] := XCCMBH[k] = XCGH[k] + XCPH[k];

        /* Cheltuieli orare pentru combustibil */

    BCCMB IS BCCMB := XCCMB = XCG + XCP; /* Cheltuieli totale pe combustibil */

    BCWAH [hrz] IS FOR [k IN hrz] BCWAH[k] := XCWAH[k] = PRPEA[k] * XACWH[k];

        /* Cheltuieli orare pentru energie electrica */

    BCWA IS BCWA := XCWA = SUM[k IN hrz](XCWAH[k]);

        /* Cheltuieli totale pentru energie electrica achizitionata */

    BCTH [hrz] IS FOR [k IN hrz] BCTH[k] := XCTH[k] = XCCMBH[k] + XCWAH[k];

        /* Cheltuieli totale orare */

    BCT IS BCT := XCT = XCCMB + XCWA /* Cheltuieli totale pe combustibil */

END


Return la Tabela Modele