Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How to transform iterative equations in easier formula

    Posted 08/22/14 02:20 PM

    Originally posted by: 2EH8_Bruno_Maffei


    Hi, I´m really new in opl cplex and are struggling in simplifying the following lines of code:

     int NofX = ...;                  // NofX = 9;
     range X = 1..NofX;
     

    dvar float+ Qt[X];

     subject to {

      
      Qt[9] == (13 -Qt[8]-Qt[7]-Qt[6]-Qt[5]-Qt[4]-Qt[3]-Qt[2]-Qt[1]);
      Qt[8] == (12 -Qt[7]-Qt[6]-Qt[5]-Qt[4]-Qt[3]-Qt[2]-Qt[1]) || Qt[8] == 0; 
      Qt[7] == (11 -Qt[6]-Qt[5]-Qt[4]-Qt[3]-Qt[2]-Qt[1]) || Qt[7] == 0;
      Qt[6] == (8  -Qt[5]-Qt[4]-Qt[3]-Qt[2]-Qt[1])   || Qt[6] == 0;
      Qt[5] == (8  -Qt[4]-Qt[3]-Qt[2]-Qt[1])         || Qt[5] == 0;
      Qt[4] == (6  -Qt[3]-Qt[2]-Qt[1])               || Qt[4] == 0;
      Qt[3] == (5  -Qt[2]-Qt[1])                     || Qt[3] == 0;
      Qt[2] == (3  -Qt[1])                           || Qt[2] == 0;
      
      Qt[8] == (10 -Qt[7]-Qt[5]-Qt[4]-Qt[2]-Qt[1])   || Qt[8] == 0;
      Qt[7] == (6  -Qt[4]-Qt[1])                     || Qt[7] == 0; 
      Qt[5] == (6  -Qt[4]-Qt[2]-Qt[1])               || Qt[5] == 0;            
      Qt[4] == (3  -Qt[1])                           || Qt[4] == 0;
      

    .... }

    I`m looking for a simpler way to write these lines of code (I´m talking about the Qt[x] equations) because I would like to use more than 200 x in X and besides the amount of work it would exceed the number of constrains allowed by the trial version I´m using.

    I would really appreciate any help..

    Thanks!!


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: How to transform iterative equations in easier formula

    Posted 08/25/14 06:44 AM

    Hi,

    you seem to be an academic so why do not you use the academic version that is free ?

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: How to transform iterative equations in easier formula

    Posted 08/25/14 06:56 AM

    Originally posted by: 2EH8_Bruno_Maffei


    Hi,
     
    Unfortunately I´m just a student and I´m not in a PhD program. It´s my understanding that I cannot get this opportunity :-/

    #DecisionOptimization
    #OPLusingCPLEXOptimizer