Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Pass previous activity to VehicleRoutingActivityCosts.getActivityDuration #525

Open
bludginozzie opened this issue Jul 22, 2021 · 1 comment

Comments

@bludginozzie
Copy link

We use this method to implement the time it takes to pickup or deliver the freight. In real life this is the time it takes to park the vehicle and enter the premises to perform the pickup or delivery. However in some circumstances the pickup or delivery is at the same location as the previous one so this time is reduced in this case.

Essentially we want to implement something like this:

public double getActivityDuration(
  TourActivity prevAct,
  TourActivity currentAct,
  double arrivalTime,
  Driver driver,
  Vehicle vehicle
) {
        if (prevAct.getLocation().equals(currentAct.getLocation())) {
            return 0d;
        }
        // Rest of method

From my investigation there is no other way I can see to implement this.

This would be greatly appreciated

@waldobeest
Copy link

I have created a PR for this exact purpose: #527

The challenge I am facing, is that it seems that some other vehicle constraints are being disregarded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants