obj<-c(250,250,250,250,250,250,250,100,100,100,100,150,150,150,150,150) A<-matrix(ncol=16,nrow=12) A[1,]<-c(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) A[2,]<-c(0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0) A[3,]<-c(0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0) A[4,]<-c(0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0) A[5,]<-c(0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0) A[6,]<-c(0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0) A[7,]<-c(0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0) A[8,]<-c(0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0) A[9,]<-c(0,0,0,0,1,0,0,0,1,0,0,0,0,1,0,0) A[10,]<-c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1) A[11,]<-c(0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,0) A[12,]<-c(0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1) print(A) dir<- c("=","<=","=","<=","=","<=","=","<=","=","<=","=","=") rhs<-c(5,5,6,6,7,7,8,8,7,7,9,10) library(lpSolve) EJER2.8<-lp("min", obj,A,dir,rhs) print(EJER2.8) SOL<-EJER2.8$solution print(SOL)