Reputation: 21
I ran into this problem when I tried to use cplexmiqp
in matlab
to solve a unit commitment problem.
I have a lot of constraints but I carefully checked all the constraints, they should be fine. I don't know where this error came from and I tried to display the row 1408 but I don't know how to do that.
Has anyone encountered the same problem before? And does anybody know how to solve it?
Upvotes: 2
Views: 4132
Reputation: 22506
The usual way to display the model using cplex.writeModel() API.
cplex.writeModel('<your_miqp_proble_filename>.lp');
However, if you are using the Optimization Toolbox (to invoke CPLEX from inside MATLAB) there appears to be another option you could try: ExportModel
(Note: I haven't used this option.)
The parameter ExportModel (or exportmodel) takes a file name as an argument. The default is the empty string (""). For example, opt = cplexoptimset('exportmodel', 'myModel.lp');can be used to set the name of the exported model.
You can open an LP
file that contains your problem, look at the constraints and see if they are all as you intended them.
I'd also suggest that you iteratively make your problem smaller (fewer rows/columns.) If the problem continues to recur, you can diagnose it much quicker. If it doesn't, then the problem was in one of the things you dropped recently.
Hope that helps you move forward.
Upvotes: 2