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

DRT with ortools #11429

Open
7 of 14 tasks
ritzerp opened this issue Aug 25, 2022 · 12 comments
Open
7 of 14 tasks

DRT with ortools #11429

ritzerp opened this issue Aug 25, 2022 · 12 comments
Assignees

Comments

@ritzerp
Copy link
Contributor

ritzerp commented Aug 25, 2022

Ticket for tracking the progress of the tool drtOrtools.py.

Features

General support

  • add support for Python 2
  • fix different test results on Linux

Code quality

  • improve debbuging information
  • add unit tests
@namdre
Copy link
Contributor

namdre commented Aug 25, 2022

find out why traci.person.getTaxiReservations(0) is needed

Retrieving a reservation once, changes it's state from NEW (flag = 1) to RETRIEVED (flag = 2).
This controls whether a subsequent call to getTaxiReservations(2) will return them.

If you replace these calls with getTaxiReservations(3) (which returns NEW and RETRIEVED), then the prior call is no longer needed.

namdre added a commit that referenced this issue Sep 1, 2022
@namdre
Copy link
Contributor

namdre commented Sep 1, 2022

My description above described the intention of the code but there was still a bug: #11501

@rummel123 rummel123 self-assigned this Sep 9, 2022
@rummel123
Copy link
Contributor

find out why traci.person.getTaxiReservations(0) is needed

Retrieving a reservation once, changes it's state from NEW (flag = 1) to RETRIEVED (flag = 2). This controls whether a subsequent call to getTaxiReservations(2) will return them.

If you replace these calls with getTaxiReservations(3) (which returns NEW and RETRIEVED), then the prior call is no longer needed.

Can you add this (and maybe other missing reservationStates) to the documentation?
https://sumo.dlr.de/docs/Simulation/Taxi.html#gettaxireservations

@rummel123
Copy link
Contributor

see test for the previous commit here:
dfc6843

@rummel123
Copy link
Contributor

The disjunction effects the result, if there is the possibility of getting no solution. This happens only if there are more restrictions (as time windows or direct route factor). So there is still no test possible.

rummel123 added a commit that referenced this issue Sep 21, 2022
rummel123 added a commit that referenced this issue Sep 23, 2022
rummel123 added a commit that referenced this issue Oct 21, 2022
rummel123 added a commit that referenced this issue Oct 21, 2022
@rummel123
Copy link
Contributor

commit for drf see: 864d058

@rummel123
Copy link
Contributor

Changing cost type to "time" should reduce the needed time. Using this in the test cases, the time seems to increase (see test drtOR-Tools_twoTaxis). Could be a problem of the solver...

rummel123 added a commit that referenced this issue Sep 1, 2023
@rummel123
Copy link
Contributor

rummel123 commented Feb 28, 2024

Prebooking can be used now with params in ride:

<param key="earliestPickupTime" value="..."/>
<param key="reservationTime" value="..."/>

The reservationTime defines the time the reservation is created. The earliestPickupTime means the expected arrival time of the person. reservationTime can be smaller than the depart of the person.

The ride needs the from attribute. The route file must be loaded as additional file.

If taxi and customer meet before earliestPickupTime, they are going to depart earlier.
If taxi and customer don't meet (because the customer comes too late) the taxi waits for 3mins after earliestPickupTime and then reject the reservation.

Greedy and greedyShard are using earliestPickupTime to sort the reservations (not the reservationTime).

TODOs:

  • Waiting time if the customer comes too late is hard coded to 3mins, needs an option to customize
  • Check merged reservations due to common start or end positions (in MSDipatch::updateReservationFromPos)
  • Check group reservations with different arrival times of the customers (especially if some customers miss the taxi and others do not)
  • Add tests for many and combined reservations
  • Add documentation
  • from attribute should be avoided

@namdre
Copy link
Contributor

namdre commented Feb 28, 2024

  • what about documentation?
  • is the ride from needed even if the ride is not the first part of the plan? This need should be avoided

@rummel123
Copy link
Contributor

Yes, documentation is still open.
from is needed, because the from edge is not always clear, especially in connection with accesses.
I updated the todos.

@namdre
Copy link
Contributor

namdre commented Feb 28, 2024

I see the problem of missing from in combination with access (#14435)

@rummel123
Copy link
Contributor

Thanks for the advice. I add this to the TODOs. I need to check merged reservations anyway.

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

No branches or pull requests

4 participants