Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Playbook or Guidance of CPLEX Python Code for MILP

    Posted 07/07/22 09:59 PM
    Dear All,
    Good day to you.

    Right now, I would like to create a python code for Mixed Integer Linear Programming by using the CPLEX library. Here are the set of mathematical constraints and the objective.
    I would like to ask you:
    1. Is there any playbook or guidance on how to prepare the equations coding format prior to loading into CPLEX library (mdl.objective, mdl.add_constraints, etc)? 
    2. Is there any playbook which contains the information about the error and how to fix it when we use the CPLEX library?
    3. Regarding these mathematical equations, my initial plan is to convert them into matrix format. Let me know what you think.
    Thank you in advance.

    image.png

    #DecisionOptimization


  • 2.  RE: Playbook or Guidance of CPLEX Python Code for MILP

    Posted 07/08/22 04:17 AM
    Hi Nicholas,
    For docplex documentation and reference manual (both for Cplex and CPO), I would recommend this URL: https://rawgit.com/IBMDecisionOptimization/docplex-doc/master/docs/index.html

    I'm not sure about your experience about optimization problem modelling.
    My advice would be to start with simple data structures rather than handling matrices. It is much easier to understand what is wrong in case of issues.
    Afterward, it is always possible to reformulate with matrices.

    Translating mathematical expressions into docplex statements is usually not so difficult.
    Once the decision variables are clearly identified (which is not totally clear for me from the model you included in your message), it should not be too difficult.

    I hope this helps.
    Kind regards,
    Hugues

    ------------------------------
    Hugues Juille
    ------------------------------



  • 3.  RE: Playbook or Guidance of CPLEX Python Code for MILP

    Posted 07/12/22 05:29 AM
    Edited by System Admin 01/20/23 04:44 PM
    Thank you, Hugues!

    Yours sincerely,
    Nicholas