I am working on the scaling of a MIP using C++. I use Gurobi within CLion. The Gurobi model I use now in Clion require me to enter everything manually (model.addVar, model.addConstr...). However, in a large integer program with more than 1000 constraints, it is not feasible to define each constraint. So I need to make CLion read the Gurobi file(.lp) and solve without using things like model.addVar, model.addConstr...
How to make CLion read the .lp file and make Gurobi solve that file within Clion?
So far I have tried to GRBModel in Clion in the following form below but it gives an error and cannot solve the model.
GRBEnv env = GRBEnv();
GRBModel model = GRBModel(env,"coins.lp");
I have used coins.lp to test the model via Command line using
$gurobi_cl coins.lp and Gurobi is able to solve it without an issue there.