The Model with gMOIP
\[ \begin{array}{lllll} \mbox{max} & 7.75x + 10 y & & & \\ \mbox{s.t.} & -3x + 5 y & \leq & 3 \\ & 2x + 9 y & \leq & 27 \\ & 2x + 10 y & \leq & 90 \\ \end{array} \]
library(gMOIP)
A = matrix(c(-3, 2, 2, 4, 9, 10), ncol = 2, byrow = TRUE)
b = c(3, 27, 90)
obj = c(7.75, 10) # coefficients cProblem using Gurobi in same model
\[ \begin{array}{lllll} \mbox{obj} & 7.75x + 10 y & & & \\ \mbox{s.t.} & -3x + 5 y & \leq & 3 \\ & 2x + 9 y & \leq & 27 \\ & 2x + 10 y & \leq & 90 \\ \end{array} \]
model <- list()
model$A <- matrix(c(-3, 2, 2, 4, 9, 10), ncol = 2, byrow = TRUE)
model$rhs <- c(3, 27, 90)
model$sense <- c("<=", "<=", "<=")
model$varnames <- c("x", "y")
obj = c(7.75, 10)
model$modelsense <- "max"
result <- gurobi(model)Gurobi Optimizer version 9.0.0 build v9.0.0rc2 (win64)
Optimize a model with 3 rows, 2 columns and 6 nonzeros
Model fingerprint: 0xbddada8b
Coefficient statistics:
Matrix range [2e+00, 1e+01]
Objective range [0e+00, 0e+00]
Bounds range [0e+00, 0e+00]
RHS range [3e+00, 9e+01]
Presolve removed 3 rows and 2 columns
Presolve time: 0.00s
Presolve: All rows and columns removed
Iteration Objective Primal Inf. Dual Inf. Time
0 -0.0000000e+00 0.000000e+00 0.000000e+00 0s
Solved in 0 iterations and 0.00 seconds
Optimal objective -0.000000000e+00
[1] 0
[1] 0 0
NULL