Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MODEL:
- SETS:
- MESES/1..6/;
- SUSTANCIAS/1..5/:DUREZA,II;
- MATRIZ(MESES,SUSTANCIAS): COSTO, PROD, IF, COMP;
- ENDSETS
- DATA:
- COSTO, PVENTA, ARTIFICIALMAX, NATURALMAX, ALMACEN, COSTOALM, DUREZAMIN, DUREZAMAX, DUREZA, II =
- @OLE('C:\Users\indust\Desktop\DataEjemploPropuesto.xlsx');
- @OLE('C:\Users\indust\Desktop\DataEjemploPropuesto.xlsx') = PROD, COMP, IF;
- ENDDATA
- MAX = @SUM(MATRIZ(I,J): PROD(I,J)*PVENTA) - @SUM(MATRIZ(I,J):COSTO(I,J)*COMP(I,J)) -
- @SUM(MATRIZ(I,J)|I#LE#5:IF(I,J)*COSTOALM) - @SUM(SUSTANCIAS(J):II(J)*COSTOALM);
- !Refinar a lo mas 320 de artificial y 350 de natural;
- @FOR(MESES(I):@SUM(SUSTANCIAS(J)|J#LE#2:PROD(I,J)) <= ARTIFICIALMAX);
- @FOR(MESES(I):@SUM(SUSTANCIAS(J)|J#GT#2:PROD(I,J)) <= NATURALMAX);
- !No sobrepasar limite almacen;
- @FOR(MATRIZ(I,J):IF(I,J)<=ALMACEN);
- !Cosas locas de inventarios;
- @FOR(MATRIZ(I,J)|I#EQ#1:IF(I,J) = II(I) + COMP(I,J) - PROD(I,J));
- @FOR(MATRIZ(I,J)|I#GT#1:IF(I,J) = IF(I-1,J) + COMP(I,J) - PROD(I,J));
- @FOR(MATRIZ(I,J)|I#EQ#6:IF(I,J) = 730);
- !Dureza max y min;
- @FOR(MESES(I):@SUM(SUSTANCIAS(J):DUREZA(J)*PROD(I,J))>=DUREZAMIN*(@SUM(MATRIZ(I,J):PROD(I,J))));
- @FOR(MESES(I):@SUM(SUSTANCIAS(J):DUREZA(J)*PROD(I,J))<=DUREZAMAX*(@SUM(MATRIZ(I,J):PROD(I,J))));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement