IBM Data and AI

Welcome to the IBM Data and AI Ideas Portal for Clients!

We welcome and appreciate your feedback on IBM Data and AI Products to help make them even better than they are today!
Before you submit an idea, please perform a search first as a similar idea may have already been reported in the portal. If a related idea is not yet listed, please create a new idea and include with it a description which includes expected behavior as well as why having this feature would improve the service and how it would address your use case.
IBM Employees:
  • Our team welcomes any feedback and suggestions you have for improving our offerings / products! This forum allows us to connect your offering / product improvement ideas with IBM product and engineering teams.

  • If you have not registered on this portal please click on the following link and register. To complete registration you will need to open the email you will receive from Aha to confirm your identity.

Additional Information:
  • The shorter URL for this site is:

  • To view our roadmaps:

  • Reminder: This is not the place to submit defects or support needs, please use normal support channel for these cases

  • Please do not use the Ideas Portal for reporting bugs - we ask that you report bugs or issues with the product by contacting IBM support.

CPLEX: Make adding mulitple objectives consistent with adding one objective

In the Java API for CPLEX (presumably similar in other APIs), it is possible to create an objective and add it to a model in one function call, using overloads of IloCplexModeler.addMinimize() and .addMaximize() that take an IloNumExpr argument. Doing the same with multiple objectives requires chaining function calls (e.g. staticLex() -> minimize() -> addMinimize()). This could (should?) be simplified.

  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Sep 1 2020
  • Under review
Who would benefit from this IDEA? Anyone programming multiobjective models in CPLEX using a relevant API.
How should it work?

Add overloads of addMinimize() and addMaximize() that accept IloCplexMultiCriterionExpr in lieu of IloNumExpr.

Idea Priority Low
Priority Justification There is currently a straightforward, if mildly tedious, workaround, once you realize the "obvious" way (addMinimize(staticLex(...))) does not work.
Customer Name Paul Rubin
  • Attach files
  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    1 Oct 06:46am

    There is a very similar issue with the Python API (docplex).

    I have a model with some "hard" constraints, and 0 or more "soft" constraints. The problem is that I don't have a good interface in docplex for setting those constraints.

    In the case of 2 or more constraints, I use maximize_static_lex (the first constraint is more important then the second, which is more important than the third, and so on...). But if I try to use it with just 1 constraint, I get this error:

    Error: Multi objective must have at least 2 criteria.

    My request is to extend it so that if I call maximize_static_lex() with a list of length 1 it will behave like maximize(). Additionally, if the list is empty it will not do anything. If this is too difficult, then at least it should give a better error message, right when calling maximize_static_lex() and not on solve().

    Simple example:

    mdl = CpoModel()

    x = mdl.integer_var(min=0, max=9, name="x")

    y = mdl.integer_var(min=0, max=9, name="y")

    mdl.add(x + y < 15)

    mdl.add(x <= y)

    mdl.add(mdl.maximize_static_lex([x != y]))

    msol = mdl.solve(TimeLimit=10)‚Äč

NOTICE TO EU RESIDENTS: per EU Data Protection Policy, if you wish to remove your personal information from the IBM ideas portal, please login to the ideas portal using your previously registered information then change your email to "anonymous@euprivacy.out" and first name to "anonymous" and last name to "anonymous". This will ensure that IBM will not send any emails to you about all idea submissions