Search code examples
mathematical-optimizationlinear-programmingcplexconvex-optimizationampl

feasiblity problem in CPLEX


Is there an api to solve the feasibility problem (whether a feasible point exists) for a set of convex restraints in CPLEX.


Solution

  • Yes, just don't enter an objective function. cplex will give you any solution it can find or prove that there isn't a solution.

    var x;
    var y;
    minimize 1;
    
    subject to con1:
      x + y <= 6;
      x + y >= 7;