Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Defining upper and lower on the time horizon

    Posted 11/15/22 01:42 AM
    Dear support team,

    I am working on a special form of the bin-packing model where there is a planning horizon for the problem. Let's say, T denotes the scheduling length, I and J referred to the items and bins respectively. Also, the following notations are defined.
    𝑡_lo(𝑖): Availability time;
    𝑡_up(𝑖): Latest delivery time, with Tau(i) = [𝑡_lo(i), 𝑡_up(i)];
    gamma(𝑗) = [gamma_lo(𝑗) , gamma_up(𝑗) ]: Availability time window for bins;
    alfa(j): Travel time;
    Tau(i,j): be the item-to-bin assignment interval-> 
    Tau(i,j) = [𝑡_lo(i), 𝑡_up(i)-alfa(j)] intersect gamma(j);


    Now, there is a binary decision variable x(i,j,t) that equals one if, item (i in I) is being assigned to the bin (j in J) at time plan (t in Tau(i,j)), otherwise zero. 
    Also, one of the model's corresponding constraints is:
    (sum(j in J) sum(t in Tau(i,j)) x(i,j,t)) + (sum(t in Tau(i)) u(i,t)) = 1 ; forall(i in I)​


    I have tried to write the sets and constraints as follows:
    {string} items = {"item_1", "item_2", "item_3", "item_4"};
    {string} bins  = {"bin_1", "bin_2", "bin_3"};
    {int} horizon  = {1, 2, 3, 4, 5, 6, 7};
    
    setof(int) a_time[horizon] = [{1}, {1}, {1}, {1}, {1}, {1}, {1}];
    setof(int) l_time[horizon] = [{7}, {7}, {7}, {7}, {1}, {1}, {1}];
    
    setof(int) a_gamma[horizon] = [{1},{1}, {1}, {1}, {1}, {1}, {1}];
    setof(int) l_gamma[horizon] = [{7},{7}, {7}, {7}, {7}, {7}, {7}];
    
    dvar boolean x[items][bins][horizon];
    
    forall(i in items)
    c2: sum(j in bins, t,tt in horizon: t in a_time[tt] && t in l_time[tt]) 
    x[i][j][t] + sum(t,tt in horizon: t in a_gamma[tt] && t in l_gamma[tt]) u[i][t] == 1;​

    But, It seems to make the problem hard and the result is far from what we expected. 
    I was wondering if, how can we define these kinds of sets and whose bounds? (specifically, based on the items and bins).

    Regards

    ------------------------------
    Abbas Omidi
    ------------------------------

    #DecisionOptimization


  • 2.  RE: Defining upper and lower on the time horizon

    Posted 11/15/22 05:38 AM
    Dear Abbas,

    So I understand your packing problem has bins with availability constraints.
    I have a few questions:
    - what is u[i][t] for?
    - I would suggest using constraint programming ("using CP" in your .mod) and scheduling interval variables to model this problem? You wouldn't then have one variable per (item,bin,time point) triple but one interval variable per item + bins connected with alternative constraints.
    I hope this helps,

    Cheers,

    ------------------------------
    Renaud Dumeur
    ------------------------------



  • 3.  RE: Defining upper and lower on the time horizon

    Posted 11/15/22 08:43 AM
    Dear Renaud,

    Thanks for your reply. Actually, we work on the mixed integer linear programming model that can be solved by CPLEX in an efficient manner.

    So I understand your packing problem has bins with availability constraints.

    You are right. This is a main part of the model. 

    what is u[i][t] for?

    There are already two other decision variables in the model. The binary variables u(i,t) and y(j,t). The first is to assign the items into the intermediate bins. It is activated based on its corresponding costs in the objective function. The second is also defined to select the appropriate bins at specific periods. In this stage what we are looking for is to define the mentioned sets and using them in the shown constraint. I would really appreciate you could help us to define that.

    Best regards



    ------------------------------
    Abbas Omidi
    ------------------------------