问题描述
我在 GLOP 中使用默认线性求解器(我认为它是双单纯形)并得到 ABnorMAL
结果。
我想改用普通单纯形(如本文所述 - https://github.com/google/or-tools/issues/1868),但我不知道如何更改此设置。如何更改求解器? (顺便使用 C#)
解决方法
您需要更改求解器的参数。
,Laurent 给出了上面的正确步骤。这是创建这些参数并传递给求解器的实用代码(如果有人感兴趣):
var Params = new Google.OrTools.LinearSolver.MPSolverParameters();
Params.SetIntegerParam(MPSolverParameters.IntegerParam.LP_ALGORITHM,(int) MPSolverParameters.LpAlgorithmValues.PRIMAL);
Solver.ResultStatus solved = solver.Solve(Params);