using cplex_miqp from MATPOWER with MATLAB

2 views (last 30 days)
Hello, I have a MATLAB code that calls this function,
[v, fval, exitflag, output] = cplexmiqp(H, f, G, h, [], [], [], [], [], [], [], ctype );
Would anybody tell me if this is possibly the function being called, from MATPOWER miqps_cplex and what does ctype mean? to this one
function [x, f, eflag, output, lambda] = miqps_cplex(H, c, A, l, u, xmin, xmax, x0, vtype, opt)
from here: https://matpower.org/docs/ref/matpower6.0/miqps_cplex.html

Answers (1)

Saarthak Gupta
Saarthak Gupta on 15 Dec 2023
Hi Giovanni,
I understand that you wish to grasp the correspondence between the functions “cplexmiqp” and “miqps_cplex”, and the purpose of the "ctype" parameter.
“cplexmiqp” and “miqps_cplex” are mixed integer quadratic program solvers belonging to the IBM ILOG CPLEX library and the MATPOWER library respectively. The "miqps_cplex" function acts as a wrapper that conforms to MATPOWER's standard format and is designed to utilize either CPLEXQP or CPLEXLP for problem-solving.
The call to “cplexmiqp” in your program corresponds to the following function signature:
cplexmiqp(H,f,Aineq,bineq,Aeq,beq,sostype,sosind,soswt,lb,ub,ctype)
And the call to “miqps_cplex” corresponds to the following function signature:
miqps_cplex(H, c, A, l, u, xmin, xmax, x0, vtype, opt)
Despite the differences in their signatures, both functions aim to fulfil the same role, adhering to the standards set by their respective libraries.
According to the documentation, the "ctype" parameter in "cplexmiqp" (referred to as "vtype" in "miqps_cplex") indicates whether x(j) should be binary, general integer, continuous, semi-continuous or semi-integer.
Please refer to the following documentations for further reference:
Hope this helps!
Best Regards,
Saarthak

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!