2
$\begingroup$

I am trying to use cplexAPI to solve quadratic programs or quadratically constrained linear program.

While it seems to be pretty straightforward to use cplexAPI to solve linear programs (with the vignette at https://cran.r-project.org/web/packages/cplexAPI/vignettes/cplexAPI.pdf), it seems that using cplexAPI to solve quadratic programs or linear programs with a quadratic constraint is much more difficult. I tried to look over the package documentation, but I have no clue on how to do so.

Therefore, may I know how to use cplexAPI to solve quadratic programs or linear programs, or if there is any code samples for these two tasks?

In addition, the package Rcplex seems to be pretty similar, but its last update is already more than 5 years ago. So it would be really nice to know how the above two tasks can be done using cplexAPI in R. Thanks!

$\endgroup$
1
$\begingroup$

This document available on link https://cran.r-project.org/web/packages/Rcplex/Rcplex.pdf for RCplex might be helpful for you. Page 7 & 8 has an example of QCP.

$\endgroup$
3
  • $\begingroup$ I know this can be done in Rcplex, but I would like to learn about how they can be done in cplexAPI because Rcplex has not been updated for more than 5 years. Thanks! $\endgroup$
    – wayne
    Sep 14 '21 at 18:27
  • $\begingroup$ same question at stackoverflow.com/questions/69172344/… $\endgroup$ Sep 15 '21 at 13:05
  • $\begingroup$ Hmmm yes because another user kindly suggested me to post in OR StackExchange. $\endgroup$
    – wayne
    Sep 15 '21 at 15:39
1
$\begingroup$

with cplexAPI you may use addQConstrCPLEX to add quadratic constraints

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.