I am trying to optimize a transportation problem in R using lpSolve::lp.transport
. My code is as follows:
library(lpSolve)
cost <- matrix(rep(100, 34968), nrow = 372)
row.signs <- rep("<=", 372)
row.RHS <- c(t(vehicleGVWR2[,2]))
col.signs <- rep(">=", 94)
col.RHS <- c(t(branchGVWR[, 2]))
lptrans <- lp.transport(cost, "min", row.signs, row.RHS, col.signs, col.RHS)
The cost matrix is "100" at every value because the cost of assignment is considered to be negligible/the same for each combination.
The cost matrix is 372x94. Is this too many variables for the function to handle? Or will the code eventually complete running?