pregunta 1

1
7/21/2019 Pregunta 1 http://slidepdf.com/reader/full/pregunta-1-56d99f4047aa3 1/1 #DEFINO MIS VARIABLES Y SU NATURALEZA # xij : cantidad de litros de malta i (i=3,5,8,9) utilizados en la produccion de  whiskey j (j=1,2,3) #donde 1=rojo , 2=azul, 3=negro #Malta tipo 3 var x31 >= 0 ; var x32 >= 0 ; var x33 >= 0 ; #Malta tipo 5 var x51 >= 0 ; var x52 >= 0 ; var x53 >= 0 ; #Malta tipo 8 var x81 >= 0 ; var x82 >= 0 ; var x83 >= 0 ; #Malta tipo 9 var x91 >= 0 ; var x92 >= 0 ; var x93 >= 0 ; #FUNCION OBJETIVO maximize z=8*(x31 + x51 + x81 + x91) + 6.5*(x32 + x52 + x82 + x92) + 6*(x33 + x 53 + x83 + x93) - 6.5*(x31 + x32 + x33) - 6*(x51 +x52 + x53) - 5.25*(x81 + x82+ x83) - 4.5(x91 + x92 + x93); #RESTRICCIONES #Suministro de malta subject to restriccion1 : x31 + x32 + x33 <= 10000; subject to restriccion2 : x51 + x52 + x53 <= 12500; subject to restriccion3 : x81 + x82 + x83 <= 15000; subject to restriccion4 : x91 + x92 + x93 <= 15000; # Formulas produccion de whiskey #Etiqueta Roja subject to restriccion5 : x31 = 0.5*(x31 + x51 + x81 + x91); subject to restriccion6 : x51 <= 0.25*(x31 + x51 + x81 + x91); subject to restriccion7 : x91 <= 0.1*(x31 + x51 + x81 + x91); subject to restriccion8 : x51 >= 0.2*(x31 + x51 + x81 + x91); subject to restriccion9 : x81 <= 0.2*(x31 + x51 + x81 + x91); #Etiqueta Azul subject to restriccion10 : x32 <= 0.3*(x32 + x52 + x82 + x92); subject to restriccion11 : x52 >= 0.3*(x32 + x52 + x82 + x92); subject to restriccion12 : x82 = 0.3*(x32 + x52 + x82 + x92); subject to restriccion13 : x92 <= 0.15*(x32 + x52 + x82 + x92); #Etiqueta Negra subject to restriccion14 : x33 = 0; subject to restriccion15: x53 >= 0.3*(x33 + x53 + x83 + x93); subject to restriccion16 : x83 <= 0.1*(x33 + x53 + x83 + x93); subject to restriccion17 : x93 <= 0.25*(x33 + x53 + x83 + x93);

Upload: felipe-andres-orellana

Post on 04-Mar-2016

215 views

Category:

Documents


0 download

DESCRIPTION

descripcion de ampl

TRANSCRIPT

Page 1: Pregunta 1

7/21/2019 Pregunta 1

http://slidepdf.com/reader/full/pregunta-1-56d99f4047aa3 1/1

#DEFINO MIS VARIABLES Y SU NATURALEZA

# xij : cantidad de litros de malta i (i=3,5,8,9) utilizados en la produccion de whiskey j (j=1,2,3)#donde 1=rojo , 2=azul, 3=negro

#Malta tipo 3

var x31 >= 0 ;var x32 >= 0 ;var x33 >= 0 ;#Malta tipo 5var x51 >= 0 ;var x52 >= 0 ;var x53 >= 0 ;#Malta tipo 8var x81 >= 0 ;var x82 >= 0 ;var x83 >= 0 ;#Malta tipo 9

var x91 >= 0 ;var x92 >= 0 ;var x93 >= 0 ;

#FUNCION OBJETIVOmaximize z=8*(x31 + x51 + x81 + x91) + 6.5*(x32 + x52 + x82 + x92) + 6*(x33 + x53 + x83 + x93) - 6.5*(x31 + x32 + x33) - 6*(x51 +x52 + x53) - 5.25*(x81 + x82+x83) - 4.5(x91 + x92 + x93);

#RESTRICCIONES

#Suministro de maltasubject to restriccion1 : x31 + x32 + x33 <= 10000;

subject to restriccion2 : x51 + x52 + x53 <= 12500;subject to restriccion3 : x81 + x82 + x83 <= 15000;subject to restriccion4 : x91 + x92 + x93 <= 15000;

# Formulas produccion de whiskey#Etiqueta Rojasubject to restriccion5 : x31 = 0.5*(x31 + x51 + x81 + x91);subject to restriccion6 : x51 <= 0.25*(x31 + x51 + x81 + x91);subject to restriccion7 : x91 <= 0.1*(x31 + x51 + x81 + x91);subject to restriccion8 : x51 >= 0.2*(x31 + x51 + x81 + x91);subject to restriccion9 : x81 <= 0.2*(x31 + x51 + x81 + x91);

#Etiqueta Azulsubject to restriccion10 : x32 <= 0.3*(x32 + x52 + x82 + x92);subject to restriccion11 : x52 >= 0.3*(x32 + x52 + x82 + x92);subject to restriccion12 : x82 = 0.3*(x32 + x52 + x82 + x92);subject to restriccion13 : x92 <= 0.15*(x32 + x52 + x82 + x92);#Etiqueta Negrasubject to restriccion14 : x33 = 0;subject to restriccion15: x53 >= 0.3*(x33 + x53 + x83 + x93);subject to restriccion16 : x83 <= 0.1*(x33 + x53 + x83 + x93);subject to restriccion17 : x93 <= 0.25*(x33 + x53 + x83 + x93);