ClSimplexSolverExtensions.AddConstraint (ones which do not receive variables as parameters) generating new variables each time they called.
I'm not sure is it intended behavior or not.
Example:
var solver = new ClSimplexSolver();
solver.AutoSolve = false;
var _L = new ClVariable("L", 0);
var _R = new ClVariable("R", 500);
var _W = new ClVariable("W");
solver.AddStay(_L);
solver.AddStay(_R);
//solver.AddConstraint(
// _L, _R, _W,
// (L, R, W) => L + W == R
//);
solver.AddConstraint(
(L, R, W) => L + W == R
);
solver.Solve();
Console.WriteLine(_W);
ClSimplexSolverExtensions.AddConstraint (ones which do not receive variables as parameters) generating new variables each time they called. I'm not sure is it intended behavior or not.
Example:
Output:
[W:0]
Expected output:
[W:500]
Description of the solver:
so, there is a W variable, but not the one I created. Also stays somehow survived.