Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2013-06-09T03:30:19Z by lydiazhao
CedricVB
CedricVB
4 Posts
ACCEPTED ANSWER

Pinned topic Value of cumulFunction in objective

‏2013-05-17T15:49:23Z |

Hello,

I've got a truck doing deliveries en pickups along the road. (Both are possible at the same time.) I've also got a cumulFunction called "load[k]" that describes the load of a truck as it makes deliveries.

I would like to minimize the standard deviation of the load in my objective.

dexpr int objLoad = standardDeviation(all (k in Camions, i in cities) cumulFunctionValue(load[k],i));

However, cumulFunctionValue is only available in postprocessing AFAIK. How can I better express this?

Furthermore:

It seems not possible to use heightAtStart/End either, because they somehow return 0 at all times...?

 

cumulFunction unloadStep[k in Camions] = sum(i in cities) stepAtStart(visit[k][i], 0, k.capacity);
cumulFunction loadStep[k in Camions] = sum(i in cities) stepAtEnd(visit[k][i], 0, k.capacity);
cumulFunction load[k in Camions] = loadStep[k] - unloadStep[k];

 

In the result view, I see NOTHING besides stepwise{ 0 -> 0; 0 } for both the unloadSteps and loadSteps. Although the combined value shows the correct result. Weird!

 

Kinds regards,

Cedric

Updated on 2013-05-17T15:50:01Z at 2013-05-17T15:50:01Z by CedricVB
  • PhilippeLaborie
    PhilippeLaborie
    18 Posts
    ACCEPTED ANSWER

    Re: Value of cumulFunction in objective

    ‏2013-05-21T12:45:09Z  in response to CedricVB

    Hello,

    First, concerning the visualization problem (flat loadStep and unloadStep functions), I was not able to reproduce with a small model (I'm using the last fix pack 12.5.0.1). Could you send a version of your model (simplified if possible) that shows the problem?

    A remark on the model, for a pickup/delivery pair, instead of modeling the contribution to the cumul function as 2 contributions +stepAtEnd, -stepAtStart, you could create an additional interval variable that covers the pickup and the delivery and contribute with a pulse to the cumul function. This will I think propagate a bit stronger in the engine because the start and end point of the contribution will be correlated.

    Now, for modeling your objective function that aims at balancing the truck loads. There is no way to directly get the value of a cumul function at the start/end of your visit interval variables. You can get the load of a truck at a visit by using some additional variables that are increased/decreased depending on the visits in the sequence. I attach a small example just to illustrate this idea (the example only works on a single truck). 

    Philippe

     

     

    Attachments

    • lydiazhao
      lydiazhao
      4 Posts
      ACCEPTED ANSWER

      Re: Value of cumulFunction in objective

      ‏2013-06-09T03:30:19Z  in response to PhilippeLaborie

      Hi,Philippe,

      Your model is very interesting.Could you please tell me the context of the original problem?

      regards,

      Lydia