How to know whether a model is feasible
문제
I am using C# api. Given a gurobi model
GRBModel model = new GRBModel(env);
after populating constraint, giving objective function, and doing
model.Optimize();
is there a way to determine whether the model is feasible?
해결책
You need to check the optimization status code after solving the model. In most cases, you simply need to test that the status is OPTIMAL
. For an example, see mip2_cs.cs
in the examples\c#
subdirectory.
제휴하지 않습니다 StackOverflow