# Ejercicio 2.4 de la guia #Maximizar z= 1000.A + 1500.B + 1800.C sujeto a: # B1 + B2 = B # Restricciones de capacidad # 5.A + 6.B1 <= 80 # 4.C + 4.B2 <= 80 #Restricicones de materia prima # 1,6.A + 1,2.C <= 20 # 1,8.B1 + 1.8.B2 <= 56 # B1 + B2 >=10 # (A,B1,B2,C) e R > o library(linprog) Z1= c(1000,1500,1500,1800) restric= c(5,0,1.6,0,0,6,0,0,1.8,1,0,4,0,1.8,1,0,4,1.2,0,0) M= matrix(restric,ncol=4) print(M) b1=c(80,80,20,56,10) inec= c("<=","<=","<=","<=",">=") solucion.op= solveLP(Z1,b1,M,maximum = T, inec) summary(solucion.op)