Request feature: nearest depot calculation by road.

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
zggz
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Thu Dec 07, 2017 6:40 pm

Request feature: nearest depot calculation by road.

Post by zggz » Sun Nov 04, 2018 11:09 am

Now station choose free train on nearest depot on map. To calculate it mod uses distance on map between station and depot. Now we need to set personal depot for every production. Can we make calculation depend on road length? In this case we can do 1 depot for couple production without any problems.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 1675
Joined: Sat Jun 11, 2016 6:41 am

Re: Request feature: nearest depot calculation by road.

Post by Optera » Sun Nov 04, 2018 11:14 am

I assume by road length you mean path cost from Factorio's train pathfinder.

Short answer:
No

Long answer:
The API doesn't expose anything about pathfinder and reprogramming it in LUA would have terrible performance.
Once the pathfinder is exposed through the API I might switch over to using that instead of linear distance.
My Mods:

zggz
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Thu Dec 07, 2017 6:40 pm

Re: Request feature: nearest depot calculation by road.

Post by zggz » Thu Nov 08, 2018 10:26 pm

Ok. I will wait for.

zggz
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Thu Dec 07, 2017 6:40 pm

Re: Request feature: nearest depot calculation by road.

Post by zggz » Mon Nov 12, 2018 4:17 pm

Another idea: in depot we set something like network id and the same at stations that this serves. In this case trains come to station only from 1 depot. Can you do this?

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 1675
Joined: Sat Jun 11, 2016 6:41 am

Re: Request feature: nearest depot calculation by road.

Post by Optera » Mon Nov 12, 2018 4:21 pm

zggz wrote:
Mon Nov 12, 2018 4:17 pm
Another idea: in depot we set something like network id and the same at stations that this serves. In this case trains come to station only from 1 depot. Can you do this?
That's how network id works if you leave requesters at ANY.
My Mods:

zggz
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Thu Dec 07, 2017 6:40 pm

Re: Request feature: nearest depot calculation by road.

Post by zggz » Mon Nov 12, 2018 7:05 pm

But in this case i need to set all requesters with the same id.

Post Reply

Return to “Logistic Train Network”