Given a model, how to printout
- all added constraints
- its objective function?
in C#?
Says
GRBVar newVar=model.AddVar(0.0, 1.0, 0.0, GRB.BINARY, "newvar");
model.AddConstr(newVar<=1,"newConstraint");
model.SetObjective(newVar*2,GRB.MAXIMIZE);
//Printout all constraint in the model(suppose to be newVar<=1)
//Printout model objective function (suppose to be newVar*2)
How do I achieve what is in the comments? Thanks.