Decision Optimization

 View Only
  • 1.  computation time & solution dependent on data order

    Posted Sat June 29, 2024 08:33 AM

    Hello, 

    I have a model used to schedule several jobs that I declare in my .mod file as

    int rJ[J] = ...;

    where

    range J      = 1..4;

    and I then define values in my .dat file as

    rJ = [1, 2, 3, 4, ]; 

    I use rJ to in my model also to create sets and for constraints.

    I noticed that if I change the order of the values in  rJ I get the same objective value but the solution changes and so does the computational time sometimes up to 50%.

    Is this to be expected?? If so, is there any way that could help me determine which initial combination will give me the result with the minimum amount of time?

    Thanks you

    Sam



    ------------------------------
    Samuele Viaro
    ------------------------------


  • 2.  RE: computation time & solution dependent on data order

    Posted Mon July 01, 2024 03:58 AM

    Hi,

    you should test with several random seeds, either with the tool or through scripting https://github.com/AlexFleischerParis/howtowithopl/blob/master/randomseedvariability.mod

    What you describe sounds normal.

    regards



    ------------------------------
    [Alex] [Fleischer]
    [Data and AI Technical Sales]
    [IBM]
    ------------------------------



  • 3.  RE: computation time & solution dependent on data order

    Posted Mon July 01, 2024 04:05 AM

    Thank you Alex!!

    I guess there is no way to predict which combination gives me the solution in the least amount of time...correct?



    ------------------------------
    Samuele Viaro
    ------------------------------