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

MainRun is oneWay trip only -> add option for return leg #54

Closed
kt86 opened this issue Nov 7, 2022 · 2 comments · Fixed by #56
Closed

MainRun is oneWay trip only -> add option for return leg #54

kt86 opened this issue Nov 7, 2022 · 2 comments · Fixed by #56
Labels
enhancement New feature or request

Comments

@kt86
Copy link
Contributor

kt86 commented Nov 7, 2022

In the MainRunCarrierScheduler, the tour is constructed manually.

Currently, it is only a one Way trip from the previous Hub (Depot) to the next one.
This is okay for long distance, but probably wrong for urban contexts.

See also the comment in the code, where the last leg is created (manually)

tourBuilder.addLeg(new Leg());
tourBuilder.scheduleEnd(Id.create(resource.getEndLinkId(), Link.class));
//TODO: Option einfügen, dass es auch noch eine Fahrt zurück zum Depot gibt?
// Würde das optional machen, weil es ja nach Kontext Sinn ergeben kann (urban) aber nicht muss (langstrecke)
// Bei der Langstrecke kann man annehmen, dass das Fahrzeug ab dem Ziel einen neuen Auftrag nach irgendwo erhalten kann.
// Urban wird es eher ans Depot zurück kehren.

@kt86 kt86 added the enhancement New feature or request label Nov 7, 2022
@kt86 kt86 linked a pull request Nov 10, 2022 that will close this issue
@kt86 kt86 closed this as completed in #56 Nov 10, 2022
@kt86 kt86 reopened this Nov 11, 2022
@kt86
Copy link
Contributor Author

kt86 commented Nov 11, 2022

The implemented approach does not work to 100% as it should.

  • switch works
  • Vehicle returns to the start location - if this option is set -> link enter/leave events are there :)

BUT:

  • Logging of unloading (and handling in the hub) are now too late :(
    Reason: This is executed by an FreightTourEnds event. Unfortunately this is thrown when the vehicle has returned to its origin and not, when leaving after unloading all goods.

Solution tried: Adding another sequence of Start / Leg / End to the tour. But this does not work, because each tour must have exactly one start and one end activity. And this here is violating that rule.

@kt86
Copy link
Contributor Author

kt86 commented Dec 5, 2022

The Events are looking good. Seems, that the logging has a problem -> should be done with removing the shipmentLog #50

(But try to take the idea of logging the "handling" for the missing "handle"-events -> #48 )

@kt86 kt86 closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant