Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

How to remove quadratic constraints from a specified Cplex problem object?

  • 1.  How to remove quadratic constraints from a specified Cplex problem object?

    Posted 12/19/19 09:08 AM

    Originally posted by: cenxiaoli


    Hello,

    I add a  quadratic constraint set to a specified Cplex problem object of type QCQP by command addQCs.  I know  cplex.Model.A and delRows can disply and remove the linear constraints, respectively.   Is there any command to extract or display the quadratic constraints?  In addition,   how  I  can remove  some  quadratic constraints from the model? 

     

    Thanks


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How to remove quadratic constraints from a specified Cplex problem object?

    Posted 12/24/19 06:02 PM

    Originally posted by: EdKlotz


    First, please identify which of CPLEX's numerous APIs you are using when asking a question like this. 

    You appear to be using the CPLEX class object in the MATLAB API.  It does not have a corresponding routine to remove quadratic constraints.   I suspect this was because the design of the Cplex class in the MATLAB API wasn't well suited to supporting a separate set of indices for deleting quadratic constraints in addition to the ones used for deleting rows in the delRows routine you mentioned.

     

    What are you trying to do that makes you want to delete quadratic constraints.   One possible approach would be to maintain a separate copy of the model with only the linear constraints, then add the quadratic constraints that you don't want to remove to it.


    #CPLEXOptimizers
    #DecisionOptimization