문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top