Decision Optimization

 View Only
  • 1.  How to append two decision intervals?

    Posted Sat June 01, 2024 03:37 PM

    Hi,

    I have two decision intervals "wp1_pieces & wp2_pieces"and I would like to combine them into a new decision variable "total_pieces". Is that possible?.

    Here is how the two decision intervals look like


     dvar interval wp1_pieces[a in allActivities][b in St][1..maxPieces] optional size 100;
     dvar interval wp2_pieces[a in allActivities][b in St][1..maxPieces] optional size 200;

    After the dvar interval total_pieces is made by combining the two intervals, I would like to minimise the makespan based on that interval:

    dexpr float makespan = max(a in allActivities,b in St,j in 1..maxPieces) endOf(total_pieces[a][b][j]);

    Thanks,
    Mohamed



    ------------------------------
    Mohamed Awad
    ------------------------------


  • 2.  RE: How to append two decision intervals?

    IBM Champion
    Posted Sat June 01, 2024 04:13 PM

    Are the first two intervals allowed to overlap, and do you know in advance which starts first and which ends first?



    ------------------------------
    Paul Rubin
    Professor Emeritus
    Michigan State University
    ------------------------------



  • 3.  RE: How to append two decision intervals?

    Posted Sat June 01, 2024 09:01 PM

    The two intervals can overlap but there is no information on which interval starts or ends before the other



    ------------------------------
    Mohamed Awad
    ------------------------------



  • 4.  RE: How to append two decision intervals?

    IBM Champion
    Posted 30 days ago

    You can add the constraints startBeforeStart(total_pieces, wp1_pieces), startBeforeStart(total_pieces, wp2_pieces), endBeforeEnd(wp1_pieces, total_pieces) and endBeforeEnd(wp2_pieces, total_pieces). That ensures that the total_pieces interval covers both of the other intervals. It does not ensure that the fit is tight (no slack in the total_pieces interval), but if you are minimizing makespan then the solver will not overestimate the end time of total_pieces (it might conceivably underestimate the start time).



    ------------------------------
    Paul Rubin
    Professor Emeritus
    Michigan State University
    ------------------------------



  • 5.  RE: How to append two decision intervals?

    Posted 15 days ago

    you can use the span constraint.



    ------------------------------
    Olivier Lhomme
    ------------------------------