Page 1 of 1
[Discussion] use Provider-Requester distance
Posted: Tue Dec 26, 2017 7:47 am
by Optera
Since it keeps popping up, I'll merge all posts about using provider-requester distance to pick a provider into this one taking notes about each pro and con point.
Generally any calculation done reduces performance so it has to be worth the performance put into it. This topic is to collect pro and cons, I won't make it a poll, if you want to see this as feature give me good arguments.
I'll start by reasons why I think distance is of situational use at best.
- Calculating distances impacts performance.
Vast networks with hundred or more stops where travel time matters most would also see the biggest performance hit.
- Only beeline distances can be feasibly calculated in lua.
The quality of those results varies wildly depending on the rail network.
- Trains would tend to produce more traffic around a single provider instead of spreading through the entire network.
Providers would either have to have "limit trains" set a lot more conservative or have large stackers to cope with sudden traffic spikes.
- Shorter deliveries makes trains available sooner.
However once the closet provider runs out of material all trains will have to make longer trips.
Re: [Discussion] use Provider-Requester distance
Posted: Tue Dec 26, 2017 3:48 pm
by zggz
What is beeline distance?
In theory when we will build huge bases we need to make it in triangle. On one side of it we will have ore collectors with smelters near. At across angle we will set labs
Now I’m have about 250 stations with difference names +150 depots and 140 trains. Sometimes I see traffic congestions despite I’m using 6 line roads.
It's just 2.5k/m factory.
The biggest problem is distribution of iron and copper plates. In 10k/m factory we need 1,05 plates/m (steel separately). We must have 2 mega factories included. First - green circuit and second - red circuit. This 2 bases will take about 20-30% of our factory surface. Both of them need plates. Red will take 300k plates and green 550k other bases will take about 200k plates.
With this workload we can't use 1 big smelter no one road can work with it. And one big requester we also can't use because this 2 blocks have huge surface.
We need a lot of smelters and minimum 2 requesters (I mean 2 blocks with a lot of requester stations).
Then when we use LTN for distribution we will get huge congestion between factories, if they not near all map will stop. (I got this 2 times).
Performance have zero importance when factory stopped because of congestion.
On providers I’m using easy settings that allow load only full trains, with limit trains. It’s works really good with any workload. (tested on 500k/m iron plates)
P.S. Sorry for my english.
Re: [Discussion] use Provider-Requester distance
Posted: Tue Jan 02, 2018 4:52 pm
by Lemlin
The simple solution is to build our bases and railways smarter.
Dividing the base into dedicated outposts is a well known strategy, but we should also divide our rail network. A ore train in a far western ore outpost shouldn´t be able to travel to our smelter in the far east, it should only find the western smelter.
Meanwhile, the oil train nest to the same western outpost should be able to travel to an refinery setup in the central of the map/base.
I´m assuming that LTN don´t send train to stations they can´t path to. If that is wrong, please fix that
Re: [Discussion] use Provider-Requester distance
Posted: Tue Jan 02, 2018 5:20 pm
by Optera
Slimey wrote:I´m assuming that LTN don´t send train to stations they can´t path to. If that is wrong, please fix that
Sadly the API provides no way to check for valid paths.
The only way to do it with the current api I can think of is to send train away and check if state becomes defines.train_state.no_path.
In that case the train would have to be sent back to the depot. The result would have to be stored flagging this depot-provider-requester combination as impossible.
This leads to following questions:
What if a train can find a path depot > provider and depot > requester, but not provider > requester?
When would the flagging be cleared? Each time a piece of track or signal is built?
Re: [Discussion] use Provider-Requester distance
Posted: Tue Jan 02, 2018 8:54 pm
by Lemlin
Interesting issue.
Would it be possible to solve this by adding a train line signal, or similar (maybe use depot number)?
If depot gets a signal "Line 1", Provider signal "Line 1" and Requester "Line 1", then the trains connected to teh Depot would serve only those stations.
LTN would then assume that the trains can travel to these stations, and match only "Line 1" requester with "Line 1" providers and the trains at the depot signalled "Line 1".
Re: [Discussion] use Provider-Requester distance
Posted: Wed Jan 03, 2018 3:31 pm
by Optera
Yes, this is perhaps the first valid reason I hear for adding LTN network ids.
I'll take it into consideration.
This discussion is about adding provider-requester distance however.
Re: [Discussion] use Provider-Requester distance
Posted: Wed Jan 17, 2018 4:23 am
by thelordodin
I've posted an implementation idea for distance calculation here:
viewtopic.php?f=214&t=56706#p335474