In the previous post “Linear Programming with R” we examined the approach to solve general linear programming problems with “Rglpk” and “lpSolve” packages. Today, let’s explore “lpSolve” package in depth with two specific problems of linear programming: transportation and assignment.
1. Transportation problem
Usage:
lp.transport(cost.mat, direction="min", row.signs, row.rhs, col.signs,
col.rhs, presolve=0, compute.sens=0, integers = 1:(nc*nr))