Encoded Network ID, how does it work?

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

eFieX
Burner Inserter
Burner Inserter
Posts: 12
Joined: Mon Aug 28, 2017 8:08 am
Contact:

Encoded Network ID, how does it work?

Post by eFieX »

HI

I am building not connected train networks.
I every depot / provider / requester of a network did get the same Encoded Network ID

for some reason a request from id 3 generates a schedule in a depot with id 2.
Is there something i am missing ? i thought only trains which have a depot with the same id should get the job.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Encoded Network ID not working properly ?

Post by Optera »

It's called encoded ID because the displayed decimal values are treated as binary like encoded train composition.
Decimal 3 is 0011 in binary meaning networks 1 and 2, so using network 2 is working as intended.
Rensiur
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Sat May 17, 2014 2:41 pm
Contact:

Re: Encoded Network ID not working properly ?

Post by Rensiur »

So, if I want to use seperated networks their numbers may never be a combination of each other ?
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1622
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Encoded Network ID not working properly ?

Post by jodokus31 »

F.e. the numbers 1- 15 represent 4 different networks and the combination of those:

1 = 00000001 (network 1)
2 = 00000010 (network 2)
3 = 00000011 (network 1 & 2)
4 = 00000100 (network 3)
5 = 00000101 (network 1 & 3)
6 = 00000110 (network 2 & 3)
7 = 00000111 (network 1 & 2 & 3)
8 = 00001000 (network 4)
9 = 00001001 (network 1 & 4)
10= 00001010 (network 2 & 4)
11= 00001011 (network 1 & 2 & 4)
12= 00001100 (network 3 & 4)
13= 00001101 (network 1 & 3 & 4)
14= 00001110 (network 2 & 3 & 4)
15= 00001111 (network 1 & 2 & 3 & 4)
16= 00010000 (network 5)
etc.
Bloody_Mikey
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue May 22, 2018 2:16 pm
Contact:

network ID How?

Post by Bloody_Mikey »

Hi how do i get different network ID for the stations so i can have differen networks
Sorry tried to search for it but found nothing That helped me understand it.
Image
alienwombat
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sun Dec 10, 2017 9:03 pm
Contact:

Re: network ID How?

Post by alienwombat »

This post shows some examples, how combinations of the up to 32 networks are encoded:
viewtopic.php?f=214&t=60334#p363405
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: network ID How?

Post by Optera »

merged into existing topic
Bloody_Mikey
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue May 22, 2018 2:16 pm
Contact:

Re: Encoded Network ID, how does it work?

Post by Bloody_Mikey »

F.e. the numbers 1- 15 represent 4 different networks and the combination of those:

1 = 00000001 (network 1)
2 = 00000010 (network 2)
3 = 00000011 (network 1 & 2)
4 = 00000100 (network 3)
5 = 00000101 (network 1 & 3)
6 = 00000110 (network 2 & 3)
7 = 00000111 (network 1 & 2 & 3)
8 = 00001000 (network 4)
9 = 00001001 (network 1 & 4)
10= 00001010 (network 2 & 4)
11= 00001011 (network 1 & 2 & 4)
12= 00001100 (network 3 & 4)
13= 00001101 (network 1 & 3 & 4)
14= 00001110 (network 2 & 3 & 4)
15= 00001111 (network 1 & 2 & 3 & 4)
16= 00010000 (network 5)
etc.
All the 0 is for what? beacuse they do not stay
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Encoded Network ID, how does it work?

Post by mrvn »

Bloody_Mikey wrote:
F.e. the numbers 1- 15 represent 4 different networks and the combination of those:

1 = 00000001 (network 1)
2 = 00000010 (network 2)
3 = 00000011 (network 1 & 2)
4 = 00000100 (network 3)
5 = 00000101 (network 1 & 3)
6 = 00000110 (network 2 & 3)
7 = 00000111 (network 1 & 2 & 3)
8 = 00001000 (network 4)
9 = 00001001 (network 1 & 4)
10= 00001010 (network 2 & 4)
11= 00001011 (network 1 & 2 & 4)
12= 00001100 (network 3 & 4)
13= 00001101 (network 1 & 3 & 4)
14= 00001110 (network 2 & 3 & 4)
15= 00001111 (network 1 & 2 & 3 & 4)
16= 00010000 (network 5)
etc.
All the 0 is for what? beacuse they do not stay
Signals can not be zero, they are simply not included then. And no network ID means every network.
Bloody_Mikey
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue May 22, 2018 2:16 pm
Contact:

Re: Encoded Network ID, how does it work?

Post by Bloody_Mikey »

But can anyone tell me with PIC then how i do separated networks?
nuhll
Filter Inserter
Filter Inserter
Posts: 946
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: Encoded Network ID, how does it work?

Post by nuhll »

I guess u put 1 in the network 1
and 2 in the network 2.

In network 3 you put 4
wesoly0209
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Apr 14, 2018 10:23 am
Contact:

Re: Encoded Network ID, how does it work?

Post by wesoly0209 »

hi
how to useEncoded Network ID, depot, provider and requester have the number eg 25 and the train does not travel with the depot 25 anyway
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Encoded Network ID, how does it work?

Post by mrvn »

wesoly0209 wrote:hi
how to useEncoded Network ID, depot, provider and requester have the number eg 25 and the train does not travel with the depot 25 anyway
You start by reading all of this post.
mbr26
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed Jun 27, 2018 8:39 am
Contact:

Re: Encoded Network ID, how does it work?

Post by mbr26 »

Hi Guys, just to help all of you out who have problems with the binary Number System:
You want to have seperate networks (let's call them A, B, C .....) and you want a train from network A only got to Stations and Depots inside network A, right?
So since the network ID is encoded in binary numbers just like the position of wagons you have to give all stations in your networks the following IDs:
A --> 1
B --> 2
C --> 4
D --> 8
E --> 16
F --> 32
and so on, continuing with all numbers which are a power of 2 ( 64, 128, 256 .....)

I can explain how to use IDs to make stations available from 2 or more networks, but i think this will only provide confusion at this point. Feel free to ask
if you'd like deeper explanation on it.

I hope this helps, i would appreciate an answer ;)
And sorry for my bad english, i am not a native english speaker
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Encoded Network ID, how does it work?

Post by steinio »

mbr26 wrote:Hi Guys, just to help all of you out who have problems with the binary Number System:
You want to have seperate networks (let's call them A, B, C .....) and you want a train from network A only got to Stations and Depots inside network A, right?
So since the network ID is encoded in binary numbers just like the position of wagons you have to give all stations in your networks the following IDs:
A --> 1
B --> 2
C --> 4
D --> 8
E --> 16
F --> 32
and so on, continuing with all numbers which are a power of 2 ( 64, 128, 256 .....)

I can explain how to use IDs to make stations available from 2 or more networks, but i think this will only provide confusion at this point. Feel free to ask
if you'd like deeper explanation on it.

I hope this helps, i would appreciate an answer ;)
And sorry for my bad english, i am not a native english speaker
A combination of networks is only the sum of them.
D+F = 8 + 32 = 40
Image

Transport Belt Repair Man

View unread Posts
wesoly0209
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Apr 14, 2018 10:23 am
Contact:

Re: Encoded Network ID, how does it work?

Post by wesoly0209 »

hi
maybe some movie on youtube how to set several network?
I have DEPO # 1 (network 1), DEPO # 10 (network 2), DEPO # 11 (network 3), DEPO # 100 (network 4), reqester like Depo 1,10,11,100 (in binary system) in decimal this will be (1,2,3,4), but the train does not go from (depo 100) to (reqester 100) depo # 1, depo # 10 network is always net, not how network Depo # 100 should be reqester # 100 thanks
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Encoded Network ID, how does it work?

Post by mrvn »

wesoly0209 wrote:hi
maybe some movie on youtube how to set several network?
I have DEPO # 1 (network 1), DEPO # 10 (network 2), DEPO # 11 (network 3), DEPO # 100 (network 4), reqester like Depo 1,10,11,100 (in binary system) in decimal this will be (1,2,3,4), but the train does not go from (depo 100) to (reqester 100) depo # 1, depo # 10 network is always net, not how network Depo # 100 should be reqester # 100 thanks
DEPO#11 is not network 3, thats 1+2. And DEPO#100 is network 3.

After that the rest doesn't make any sense. What happens? What do you think should happen? Where is the save game where it happends wrong?
wesoly0209
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Apr 14, 2018 10:23 am
Contact:

Re: Encoded Network ID, how does it work?

Post by wesoly0209 »

mrvn wrote:
wesoly0209 wrote:hi
maybe some movie on youtube how to set several network?
I have DEPO # 1 (network 1), DEPO # 10 (network 2), DEPO # 11 (network 3), DEPO # 100 (network 4), reqester like Depo 1,10,11,100 (in binary system) in decimal this will be (1,2,3,4), but the train does not go from (depo 100) to (reqester 100) depo # 1, depo # 10 network is always net, not how network Depo # 100 should be reqester # 100 thanks
DEPO#11 is not network 3, thats 1+2. And DEPO#100 is network 3.

After that the rest doesn't make any sense. What happens? What do you think should happen? Where is the save game where it happends wrong?

so network4 is depo # 1000, network 5 depo # 10000 .....
User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: Encoded Network ID, how does it work?

Post by disentius »

yup.
User avatar
Omnifarious
Filter Inserter
Filter Inserter
Posts: 276
Joined: Wed Jul 26, 2017 3:24 pm
Contact:

Re: Encoded Network ID, how does it work?

Post by Omnifarious »

The simple answer to this question is this:

If you want separate networks, make your network id one of the numbers in this list:

1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536
131072
262144
524288
1048576
2097152
4194304
8388608
16777216
33554432
67108864
134217728
268435456
536870912
1073741824

The other numbers are for doing fancy things that allow a station to be part of multiple networks.

If you want a station to be a member of more than one network, just add the ids of all the networks you want it to be a part of together.

This is based on a numbering system called 'binary' that a lot of programmers know well because it's the number system that computers use internally.

But, you don't have to know about any of that unless you want to. Just follow the rules I gave and you'll be good.
Post Reply

Return to “Logistic Train Network”