coopcycle-web icon indicating copy to clipboard operation
coopcycle-web copied to clipboard

In order to deal with tours As a dsiaptcher I want the "optimize assignments" feature to work with tours

Open Atala opened this issue 1 year ago • 7 comments

For now when you optimize a route with a tour in it, it will mess the tour (reorder all the tasks)

Atala avatar Feb 16 '24 08:02 Atala

@Paul-Eraman-CoopCycle what is the priority on this?

atm this is broken with tours, as if you have tours it wont crash but you ll have strange behavior in the dispatch + dispatcher and rider in the app wont see the same tasks order.

I have looked to vroom (our routes optimizer) and asked phil and it seems it doesn't have a feature like "here are the tasks subgroups (tours)" for optimizing tasks.

We could do the following : Task 1 Task 2 Task 3 Tour 1 Task 3 Task 5 Tour 2

we could create "fake tours" to give to the optimizer subproblems to resolve:

  • [ task1, task2, task3]
  • tour 1
  • [task4, task5]
  • tour 2

so it will be able to optimize in between "tours". but it wont be able to reorder "tours" between themselves.

I still need to think about this problem, and the behavior we want.

Atala avatar Mar 27 '24 15:03 Atala

i think the only thing this should do is not be bale to change the order of the tasks within a tour. i dont see why it couldnt move the tours themselves based on the time rnages and geographic location of the first and last task in the tour

does that make sense? basically treat a tour like the first and last tasks cant be unlinked kind of?

Paul-Eraman-CoopCycle avatar Mar 28 '24 16:03 Paul-Eraman-CoopCycle

as far as i know; this is unable to treat the tour like a "block of tasks" that can't be reordered and moved around all together when you giv ethe optimizer a problem to solve

however we could maybe says that a tour is a "big fake task" with a beginning and an end as a regular order (1 pickup and 1 dropoff) and that will move the tour around

Atala avatar Mar 28 '24 16:03 Atala

What you said sounds like what im thinking of

BUT when we started we imagined that each tour would be a full route where the messenger leaves the shop and goes back to the shop, which means to do this well we actaully need to have the ability to define a start and end point. I think this should be a start and end point for the route itself, and could be automatically defined as the offices of the cooperative,but modifiable.

so we need some way to choose to leave undefined, use predermined address, or make a specific address for the beginning and end of a tour

is that related to this...? seems like it

Paul-Eraman-CoopCycle avatar Mar 28 '24 16:03 Paul-Eraman-CoopCycle

yes

actually phil has that in his script it creates a "fake warehouse" = pickup task that is inserted at the beginning

also what is very easy to do is to optimize just the tour, not the whole route (add a ligthning bolt on the tour the same as on tasklists)

Atala avatar Mar 28 '24 18:03 Atala

we do need to have an option to optimize the tour in the tour column, and if we can do that soon thatd be pretty good actually

but we also need to be able ot have unoptimized tours assigned to a messenger and it optimize everything else

Paul-Eraman-CoopCycle avatar Mar 28 '24 18:03 Paul-Eraman-CoopCycle

doesnt not work, tested on rayon9 instance

Atala avatar Apr 18 '24 09:04 Atala