Maximum Trip Duration constraint

Hi Stefan,

Thanks for your comments. I understand and agree that we need to avoid looping through activities.

For this particular constraint (max route duration constraint), I think we can achieve that. I realize that actually nextAct.getEndTime() can be used to obtain the “old” end time of nextAct, and we will need to cater for the case (nextAct instanceOf End). It can also be calculated from prevAct.getEndTime(), and this time we need to cater for the case prevAct is the corresponding PickupShipment.

For the other constraint (shipment max duration constraint), I am not sure. Do you think your proposed approach can work for that?

Best regards,
He