I am new to linear optimization and currently trying to use the SimplexSolver.class
from org.apache.commons.math3.optim.linear
.
So I looked up some examples on how to use it, to understand it and also to recall what the Simplex Algorithm exactly processes and how it works.
But unfortunately, I encountered some problems. For all the examples I was able to find, the class is used in that way:
PointValuePair s = new SimplexSolver().optimize(function, constraints, GoalType.MINIMIZE, false);
But the parameters in the example don't fit with the current expectation of the function optimize
. Checking out the documentation was not very helpful for me, because it just says that I need one parameter of type OptimizationData
. Because OptimizationData
is just an interface, I don't really know which type to use.
Does anyone have an example of how to use the optimize
function properly?