library(lpSolve) #precisa instalar o pacote caso não tenha
coef.objetivo = c(25,20,8.5)
R1 = c(300, 100, 0)
R2 = c(50, 400, 0)
R3 = c(150, 50, 200)
R4 = c(5000, 2000, 0)
R5 = c(50, 20, 0)
R6 = c(1, 1, 1)
restricoes = rbind(R1,R2,R3,R4,R5, R6)
b = c(250, 50, 10, 500, 10, 1)
sinal = c(">=",">=",">=",">=",">=", "=")
solucao = lpSolve::lp(direction = "min",objective.in = coef.objetivo,const.mat = restricoes, const.dir = sinal, const.rhs = b, all.int = F)
solucaoSuccess: the objective function is 22.38043
[1] 0.82608696 0.02173913 0.15217391