! ! PINTURAS MANCHITA VERSION 1 MAX 15X +

! ! PINTURAS MANCHITA VERSION 1 MAX 15X +
CONTROL DE PROCEDIMIENTOS EN PINTURAS SOBRE TANQUES DE ALMACENAMIENTO
LAS PINTURAS DE LA CAPILLA DEL PALACIO VIEJO DE

LOCALIZADAS LAS PRIMERAS PINTURAS RUPESTRES EN LA PALMA LA
PINTURAS A BASE DE CAL REVISIÓN DEL MERCADO Y
PRINCIPIOS PARA LA PRESERVACIÓN CONSERVACIÓN Y RESTAURACIÓN DE PINTURAS

!----------------------------;
! Pinturas Manchita version 1;
MAX 15x + 25y + 19z
ST
  x + 2y + 2z <= 2
 2x +  y +  z <= 2
  x + 5y +  z <= 3
            z <= 0.8
! Son implicitas las condiciones ;
! x >= 0 ;
! y >= 0 ;
! z >= 0 ;
END 

!----------------------------;
! Pinturas Manchita version 2;
model:
sets:
n /1..3/:x,gan;
endsets
data:
gan = 15, 25, 19;
enddata

max = @sum(n(i):gan(i)*x(i));

1*x(1) + 2*x(2) + 2*x(3) <= 2;
2*x(1) + 1*x(2) + 1*x(3) <= 2;
1*x(1) + 5*x(2) + 1*x(3) <= 3;
0*x(1) + 0*x(2) + 1*x(3) <= 0.8;  
end

!----------------------------;
! Pinturas Manchita version 3;
model:
sets:
n /1..3/:x,gan;
m /1..4/:aditivo;
links (m,n): consumoAP;
endsets
data:
gan     = 15, 25, 19;
aditivo = 2, 2, 3, 0.8;
consumoAP =
          1,2,2,
          2,1,1,
          1,5,1,
          0,0,1; 
enddata

max = @sum(n(i):gan(i)*x(i));

@for(m(j):
    @sum(n(i): consumoAP(j,i)*x(i) ) <= aditivo(j);
);
end

!----------------------------;
! Carpinteria version 1;
MAX 3x + 2y
ST
2x + y <= 100
x + y <= 80
x <= 40
END 

!----------------------------;
! Carpinteria version 2;
MAX 3x + 2y
ST
2x + y <= 100
x + y <= 80
x <= 40
END 
!________________________;
! Forma de codificar que x & y son enteros;
GIN x
GIN y


!----------------------------;
! Carpinteria version 3;
model:
sets:
n /1..2/: x, ventas, costoMP, costoMO, mktInf, mktSup;
m /1..2/:recurso;
links (m,n): consumo;
endsets
! ________________;
! ---- DATOS ---- ;
data:

! Precio de venta unitario;
ventas  = 27, 21;

! Costo de la materia prima por cada objeto;
costoMP = 10,  9;

! Costo de la mano de obra por cada objeto;
costoMO = 14, 10;

! Limites inferiores del mercado por producto; 
mktInf =  0, 0;

! Limites inferiores del mercado por producto; 
mktSup = 40, 10000;

! Limites superiores del mercado por producto; 
recurso = 100, 80;

! Cuanto se consume de los recursos por cada producto;
consumo =
          2,1,
          1,1;
enddata

max = @sum(n(i):ventas(i)*x(i)) - @sum(n(i):costoMP(i)*x(i)) - @sum(n(i):costoMO(i)*x(i));

! No rebasar los recursos disponibles;
@for(m(j):     ! Para cada recurso sumar lo consumido y condicionar no rebasar lo disponible;
    @sum(n(i): consumo(j,i)*x(i) ) <= recurso(j);
);

! Condiciones para las variables de decisión;
@for(n(i): ! Para cada variable ;
    ! No estar por abajo del limite infereior del mercado ;
    mktInf(i) <= x(i);
    ! No estar por abajo del limite superior del mercado ;
    x(i) <= mktSup(i);
    ! La variable de decisión debe ser entera ;
    @gin(x(i));
);
end


!----------------------------;
! Oficina postal version 1;
MIN x1 + x2 + x3 + x4+ x5 + x6 + x7
ST
x1           + x4 + x5 + x6 + x7 >= 17
x1 + x2           + x5 + x6 + x7 >= 13
x1 + x2 + x3           + x6 + x7 >= 15
x1 + x2 + x3 + x4           + x7 >= 14
x1 + x2 + x3 + x4 + x5           >= 16
     x2 + x3 + x4 + x5 + x6      >= 16
          x3 + x4 + x5 + x6 + x7 >= 11
END
GIN x1
GIN x2
GIN x3
GIN x4
GIN x5
GIN x6
GIN x7


!----------------------------;
! Oficina postal version 2   ;
model:
sets:
n /1..7/:x,req;
endsets
data:
req = 17, 13, 15, 14, 16, 16, 11;
enddata

min = @sum(n(i):x(i));

@sum(n(i):x(i))-x(2)-x(3) >= req(1);
@sum(n(i):x(i))-x(3)-x(4) >= req(2);
@sum(n(i):x(i))-x(4)-x(5) >= req(3);
@sum(n(i):x(i))-x(5)-x(6) >= req(4);
@sum(n(i):x(i))-x(6)-x(7) >= req(5);
@sum(n(i):x(i))-x(7)-x(1) >= req(6);
@sum(n(i):x(i))-x(1)-x(2) >= req(7);
  
@for(n(i): @gin(x(i)) );
end

!----------------------------;
! Oficina postal version 3   ;
model:
sets:
n /1..7/:x,req;
endsets
data:
req = 17, 13, 15, 14, 16, 16, 11;
enddata

min = d ;

d= @sum(n(i):x(i));
d-x(2)-x(3) >= req(1);
d-x(3)-x(4) >= req(2);
d-x(4)-x(5) >= req(3);
d-x(5)-x(6) >= req(4);
d-x(6)-x(7) >= req(5);
d-x(7)-x(1) >= req(6);
d-x(1)-x(2) >= req(7);  

@for(n(i): 
  @gin(x(i)); 
);

end


!----------------------------;
! Oficina postal version 3   ;

model:
sets:
n /1..7/:x,req;
endsets
data:
req = 17, 13, 15, 14, 16, 16, 11;
enddata

min = d;
d = @sum(n(i):x(i));
@for( n( i):
    d - x(@wrap(i+1,7)) - x(@wrap(i+2,7)) >= req(i); 
    @gin(x(i)); 
);
end


!------------------------------;
!------------------------------;
!------------------------------;
! El problema de SunCo;
model:
sets:
! Datos relativos a los crudos;
n /1..3/: precioC, limiteProv , octanaje, azufre;

! Datos relativos a las gasolinas variable de decision y;
m /1..3/: precioV, demNat, benPub, azufreR, octanajeR, y;
links (m,n): x;
endsets

data:
precioC    = 45,   35,   25;
octanaje   = 12,    6,    8;
azufre     =  0.5,  2.0,  3.0;
limiteProv = 5000, 5000,  5000;



precioV  = 70,  60,  50;
demNat   = 3000, 2000, 1000;
benPub   = 10, 10, 10;
azufreR  =  1.0, 2.0, 1.0;
octanajeR = 10, 8, 6;

costoT = 4.0;
limiteProd = 14000;

enddata


CMP = @sum(n(i): precioC(i)*@sum(m(j):x(i,j)));
V   = @sum(m(j): precioV(j)*@sum(n(i):x(i,j)));
P   = @sum(m(j): y(j));

@sum(m(j): @sum(n(i): x(i,j))) <= limiteProd;

@for(n(i):
    @sum(m(j): x(i,j)) <= limiteProv(i);
);

@for(m(j):
    @sum(n(i): x(i,j)) = demNat(j) + benPub(j)*y(j) ;

    @sum(n(i): (azufre(i)-azufreR(j))*x(i,j)) <= 0;

    @sum(n(i): (octanaje(i)-octanajeR(j))*x(i,j)) >= 0;

);

max = V - CT - CMP - P;
end



!------------------------------;


TALLER PRÁCTICO EL ENCALADO TRADICIONAL Y LAS PINTURAS DE
TÍTULO “INFLUENCIAS ZEN DE LAS PINTURAS MONOCROMAS ORIENTALES EN


Tags: manchita version, pinturas manchita, pinturas, manchita, version