MATPOWER / most

MOST – MATPOWER Optimal Scheduling Tool, for steady-state power systems scheduling problems.
https://matpower.org/
Other
31 stars 11 forks source link

EXITFLAG from price computation stage = -105 #43

Closed StefanoUnipd closed 2 months ago

StefanoUnipd commented 4 months ago

Using MOST, I noticed that this error often appears. I tried to look into similar issues that had been opened on this platform by others, but without success. How can I try to fix this error?

CPLEX Version 12.10.0.0 -- default MILP solver . . .

Error using miqps_cplex
miqps_cplex: EXITFLAG from price computation stage = -105

Error in miqps_master (line 207)
            miqps_cplex(H, c, A, l, u, xmin, xmax, x0, vtype, opt);

Error in opt_model/solve (line 230)
                miqps_master(HH, CC, A, l, u, xmin, xmax, x0, vtype, opt);
rdzman commented 4 months ago

For unit commitment problems, MOST first solves the mixed-integer problem to get the status of the binary commitment variables. However, the MILP and MIQP solvers, such as CPLEX, do not return shadow prices for mixed-integer problems. So, to compute the prices, the integer variables are fixed and the LP or QP problem is re-solved. We call this the "price computation stage". The error you are seeing is because CPLEX did not return a normal success flag. A return value of -105 from qps_cplex indicates that CPLEX returned a status code of 5. According to this page it appears that means ...

"Optimal solution is available, but with infeasibilities after unscaling."

I'm not sure of the cause, but it seems like a CPLEX issue.

If you don't need to compute prices, the easy solution is to simply disable the price computation stage by setting the most.skip_prices to 1.

If you do need the prices, the only things I can suggest are to try a different solver, like Gurobi, or to play around with CPLEX input options (e.g. scaling options) to see if you can find a way to avoid the issue.

StefanoUnipd commented 3 months ago

Thank you so much for the suggestion, in cplex_options.m I found something that was right for me that is: mpopt = mpoption(mpopt,'cplex.opts.barrier.convergetol',1e-4); %default: 1e-8. Among the alternatives I tried, this was the best because it affected the "f objective" the least.