Decision Optimization

 View Only

How to get access to the coefficient matrix in a QCQP model that already been built in the C++ API?

  • 1.  How to get access to the coefficient matrix in a QCQP model that already been built in the C++ API?

    Posted Wed January 05, 2022 01:45 PM
    Hi Everyone,

    I am solving a Quadratic Programming Problem with Quadratic Constraints (QCQP) with CPLEX using C++ API. Currently, I am struggling with getting access to the coefficient matrix in a model that has already been built. The objective function of the model is quadratic, and the constraints include Second-order cone programming (SOCP) constraints, Quadratic constraints, and linear constraints.
    And I have the following ideas:
    1) Use IloModel::Iterator to traverse the variables, constraints, and objectives in the model.
    2) Use IloExtractable to judge their types.
    I wonder if this idea is correct, and Can anyone provide a piece of C + + code for reference?

    Thanks in advance!

    ------------------------------
    Musheng Li
    ------------------------------

    #DecisionOptimization