How to split networks using Network ID?
Moderator: Optera
-
- Manual Inserter
- Posts: 3
- Joined: Tue May 02, 2017 4:11 pm
- Contact:
How to split networks using Network ID?
Can you please explain me how to use Network ID to separate networks?
Last edited by Optera on Sun Jan 21, 2018 11:54 am, edited 1 time in total.
Reason: split into properly named topic
Reason: split into properly named topic
Re: How to split networks using Network ID?
Encoded Network ID is a binary coded signal.
In other words LTN reads each bit of the integer value feed into the input as a on/off switch for that network. Factorio uses 32bit integer directly resulting in 32 possible networks.
Lets assume 4 networks:
A = b0001 = 1
B = b0010 = 2
C = b0100 = 4
D = b1000 = 8
Setting Encoded Network ID = 2 on a stop will make LTN only use other stops where the 2nd bit is set to service this stop.
Not setting Encoded Network ID defaults to -1 or all 1 in binary meaning it's part of every possible network.
Example:
Depot is not set = b1111
ProviderA is set to b0001 = 1
ProviderB is set to b0010 = 2
Requester is set to b0001 = 1
In this configuration only Provider A will ever be used.
Stops can be set to be part of multiple networks. Simply add the network IDs together.
Examples:
a stop being part of A and C would be b0101 = 5 = 1 + 4
a stop being part in all but C would be b1011 = 11 = 1 + 2 + 8
In other words LTN reads each bit of the integer value feed into the input as a on/off switch for that network. Factorio uses 32bit integer directly resulting in 32 possible networks.
Lets assume 4 networks:
A = b0001 = 1
B = b0010 = 2
C = b0100 = 4
D = b1000 = 8
Setting Encoded Network ID = 2 on a stop will make LTN only use other stops where the 2nd bit is set to service this stop.
Not setting Encoded Network ID defaults to -1 or all 1 in binary meaning it's part of every possible network.
Example:
Depot is not set = b1111
ProviderA is set to b0001 = 1
ProviderB is set to b0010 = 2
Requester is set to b0001 = 1
In this configuration only Provider A will ever be used.
Stops can be set to be part of multiple networks. Simply add the network IDs together.
Examples:
a stop being part of A and C would be b0101 = 5 = 1 + 4
a stop being part in all but C would be b1011 = 11 = 1 + 2 + 8
My Mods: mods.factorio.com
-
- Manual Inserter
- Posts: 3
- Joined: Tue May 02, 2017 4:11 pm
- Contact:
Re: How to split networks using Network ID?
Nice.
I remember a time where Optera explicitly denied the network seperation.
I'm happy that you have fun to try new stuff in this mod.
Could be the loco refill station the next thing here? Who knows?
I remember a time where Optera explicitly denied the network seperation.
I'm happy that you have fun to try new stuff in this mod.
Could be the loco refill station the next thing here? Who knows?
Re: How to split networks using Network ID?
I implemented it as solution to the Provider-Requester distance discussion. viewtopic.php?f=214&t=55691steinio wrote:Nice.
I remember a time where Optera explicitly denied the network seperation.
I'm happy that you have fun to try new stuff in this mod.
Could be the loco refill station the next thing here? Who knows?
Having players assign subnetworks costs practically no performance and has the same effect as mapping the entire network.
Refill stations are already included. They are called depot.
My Mods: mods.factorio.com
Re: How to split networks using Network ID?
I want to use network ID to make 1 big network (Main) and some small networks (for smelters).
Is i need to set in all Main network stations (850psc) network it? For example 1. And for other networks - 2,3,4...etc.
Or just enought to set ID on the side networks?
Is i need to set in all Main network stations (850psc) network it? For example 1. And for other networks - 2,3,4...etc.
Or just enought to set ID on the side networks?
Re: How to split networks using Network ID?
If you don't set a network ID then they are in all networks.zggz wrote:I want to use network ID to make 1 big network (Main) and some small networks (for smelters).
Is i need to set in all Main network stations (850psc) network it? For example 1. And for other networks - 2,3,4...etc.
Or just enought to set ID on the side networks?
If your goal is only to prevent trains from one smelter to go to a different smelter then only setting the smelter will work. But not if you want to prevent trains from the main network to go to the smelter.
Note: networks are 1, 2, 4, 8, 16, 32, 64, ... It's a bitfield and 3 means the station is in network 1 and 2.
Re: How to split networks using Network ID?
Sounds bad. Thank you.
Re: How to split networks using Network ID?
LTN works by creating schedules that go to the provider station, the requester station, and then back to the depot.
The provider and requester stations have unique names and so the train can have only one possible destination. Every depot, however, has the same name so the train can choose any one, typically the closest.
I understand how the "network ID" influences LTN to chose what stations to visit, but how can it determine to what depot it goes when finished? As I understand it, LTN doesn't affect the train once its en-route and there's no way to indicate which depot at which to finish.
So while I can see how LTN determines where a train can go based on the network ID of the depot at which it starts, how can it guarantee that the train ends at a depot with a compatible ID?
-- Brian
The provider and requester stations have unique names and so the train can have only one possible destination. Every depot, however, has the same name so the train can choose any one, typically the closest.
I understand how the "network ID" influences LTN to chose what stations to visit, but how can it determine to what depot it goes when finished? As I understand it, LTN doesn't affect the train once its en-route and there's no way to indicate which depot at which to finish.
So while I can see how LTN determines where a train can go based on the network ID of the depot at which it starts, how can it guarantee that the train ends at a depot with a compatible ID?
-- Brian
Re: How to split networks using Network ID?
Give depots in different networks different names.
My Mods: mods.factorio.com
Re: How to split networks using Network ID?
Ah, didn't realize that was allowed. Makes sense, thanks!
Re: How to split networks using Network ID?
technicly you can give each depot a different name, have a dedicated depot for each train.
All thats gonna do is that you cant copy&paste initial schedules, they´ll still look into LTN the same way and distribute trains.
I´d even advise you to think about that (a few different names, not the above) when adding more depot blocks to you system.
Lets say you build a depot for 20 trains, you run out of space and make another, abit further away. Still in the same network.
Now your trains go wild, and 30/40 trains end up next to depot #1, fulfill their orders and wanna park (and get a new schedule), they´ll go to the next one if both blocks have the same station names. Viola, 10 trains on your main tracks
What i do is, that i build a depot, fill it with trains, make a schedule "go to depot X" and fire them up at the same time.
I never add trains when i need more, i add more depots
I never touch that depot´s trains again. Even if 10/20 are away, i know that one is "full", so i build another one.
Re: How to split networks using Network ID?
I tend to give each depot stop a different name and then add N trains to it according with the space before the stop. I tried using the name name for all stops in a depot complex but then occasionally 5 trains would route to the first stop and only one to the second stop while each stop only has space for 3 trains. So 2 trains would wait at the entrance and block all other stops and passing trains. They might reroute to the other stop after a minute or 5 because they can get closer to that one but it isn't instantaneous. Using unique names avoids that problem.GrumpyJoe wrote: ↑Fri Feb 01, 2019 5:51 pmtechnicly you can give each depot a different name, have a dedicated depot for each train.
All thats gonna do is that you cant copy&paste initial schedules, they´ll still look into LTN the same way and distribute trains.
I´d even advise you to think about that (a few different names, not the above) when adding more depot blocks to you system.
Lets say you build a depot for 20 trains, you run out of space and make another, abit further away. Still in the same network.
Now your trains go wild, and 30/40 trains end up next to depot #1, fulfill their orders and wanna park (and get a new schedule), they´ll go to the next one if both blocks have the same station names. Viola, 10 trains on your main tracks
What i do is, that i build a depot, fill it with trains, make a schedule "go to depot X" and fire them up at the same time.
I never add trains when i need more, i add more depots
I never touch that depot´s trains again. Even if 10/20 are away, i know that one is "full", so i build another one.
The drawback is that trains always return to the same depot/stop. So the train goes from the depot to the iron smelter, to the circuit factory and then all the way back to the depot next to the iron smelter. Then the same train goes all way out to the circuit factory to pick up the produced circuit boards.
Would be nice if LTN could manage depots too and route trains to nearest depots or one near a likely next pickup place.
Re: How to split networks using Network ID?
What I like to do is attach dedicated depots to high-volume providers. Using network IDs, you can allow only the provider to draw trains from the depot, so the trains can't be "stolen" for other deliveries. If the depot is close to the provider, LTN will automatically assign trains from that depot first. If the dedicated depot runs out of trains, more trains can come in from shared depots.
-
- Inserter
- Posts: 33
- Joined: Sun Dec 17, 2017 8:33 pm
- Contact:
Re: How to split networks using Network ID?
What do i have to set if i want to decouple a small network from my main network?
Re: How to split networks using Network ID?
Short answer: the network ID.julius1701 wrote: ↑Wed Jan 15, 2020 2:33 pm What do i have to set if i want to decouple a small network from my main network?
For example give every stop in your main network ID 1 and the small network ID 2 and they become disjunct.
-
- Inserter
- Posts: 33
- Joined: Sun Dec 17, 2017 8:33 pm
- Contact:
Re: How to split networks using Network ID?
thanks i already got it working
Re: How to split networks using Network ID?
I feel dumb asking this but I don't see where to set the station's Network ID.
All I see are Circuit network and logistics network selectors, and neither have a Network ID setting.
All I see are Circuit network and logistics network selectors, and neither have a Network ID setting.