Job/service order

Hi,

I am newbie to JSprit, and I have a question, how can I enforce one job/activity to be the first job in my route?

For example, I have 5 stops (A, B, C, D, E). I want to make sure that the route starts with stop “D” first.

I know that I have to use HardActivityConstraints, but I am not sure how to implement it, any help will be appreciated? Thanks!

You need to implement this. If you want your route to start with D then do the following:
1.) if newAct is D then prevAct needs to be Start, if not return NOT_FULFILLED
2.) if newAct is not D then if prevAct is Start AND nextAct is D return NOT_FULFILLED otherwise FULFILLED

Nice, thank you so much!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.