Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Regular reports on Factorio development.
User avatar
DanGio
Filter Inserter
Filter Inserter
Posts: 398
Joined: Sat May 10, 2014 6:22 pm
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by DanGio »

The campaign I was dreaming of was an alternative Factorio experience via narration, scripts and polished sceneries. Something that could ease players who like those things into the game, and also that would showcase the mod/script potential of Factorio, to inspire creators.

So I'm not mad at the campaign scrap decision, as we already knew there was no story from a recent FFF.

In that case, mini-tutorials will be enough.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2976
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by boskid »

"The nodes are related to segments with extra information about travel direction. Edges are related to segment connections (transitions)"
Miteusz wrote: ↑Sat Jan 25, 2020 5:48 pm I see. So, if I understand correctly, most of these cases arise from fact that train can be "in the middle" of some edge of graph on which pathfinder operates, instead of being in one of nodes of this graph.
It is completly opposite. Since one node is related to segment that covers multiple rails, position inside node (as weird as it sounds) was used incorrectly. Train stops are always (lets ignore temporary train stops) at segments exit so train has to travel whole distance. If segment's length is not added into penalty, we are virtually at the beginning of segment but goal condition would assume we are at the end of segment and path was returned without last segment's distance considered.
ThunderFD
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Nov 15, 2019 4:54 pm
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by ThunderFD »

KoblerMan wrote: ↑Sat Jan 25, 2020 5:45 pm
GottZ wrote: ↑Fri Jan 24, 2020 3:57 pm scenario:
you have 5 iron ore mines with chests and loaders attached.

0 ore in the chests: train station outputs a request value of 0 cause it is unreasonable to send a train to a empty station

1 - amout of circuit calculated train cargo: train station outputs a request value of 1

n train cargo + 1 ore available: n+1 output signal until the number exceeds the maximum number of trains the station can keep off the main rail (waiting station with signals) (comparator ftw)

if you use signals / toggle train stations, you will send out all available trains that have this station set as next target.

to counter that, you'd have to create individualized train depot stations with separate logic to only let trains move when a circuit logic signal is present.
problem:
two trains leave.. great.
but they arrive at the same station even though two separately positioned stations are available.


additionally it would be awesome if circuit logic could tell a train to skip the next N stations with one tick so it would be possible to use multiple cargo trains for different items and balance them through circuit logic.
even better: make it so configured stations can be targeted with a circuit logic expression that was send by the current train station.
Guess what? You can do EVERYTHING HERE with circuit network logic.

You can configure any given station to turn off under specific conditions, including (but not limited to) being occupied already by a train; not having enough resources in chests to justify allowing a train in; or knowing based on remaining resources to mine (such as none left) that the remainder of resources in the chest is the only amount that the station can provide, then allowing a train in to pick up the last of the resources and permanently disable the station afterward. I know this because I've done it all before. Why add logic like this into the trains when you can create it yourself?

Side note: if any of you are particularly interested in doing this, my hint to you is that most logic is actually handled at the resource pickup area. Also, remember that trains themselves can hold logic. A friend of mine actually theorycrafted wireless transmission of data using logic and the train network, and I watched it work. It was like magic to me.
what if you have 5 trains waiting at iron plate stations full with iron plates to deliver - now one iron plate unloading station goes active again and boom! multiple trains on their way - there's no easy solution to limiting how many trains go to a station if multiple are waiting for a station with that name to unlock
... you could do a super complicated thing with global circuit wires and blocking off the trains with signals, but then you probably can't dispatch to different stations at the same time as the trains would path to the same station, without going super crazy... or am I missing something very obvious?
I'd love a limiter of how many trains can be on their way to a station at the same time
pleegwat
Filter Inserter
Filter Inserter
Posts: 278
Joined: Fri May 19, 2017 7:31 pm
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by pleegwat »

boskid wrote: ↑Sat Jan 25, 2020 6:05 pm "The nodes are related to segments with extra information about travel direction. Edges are related to segment connections (transitions)"
Miteusz wrote: ↑Sat Jan 25, 2020 5:48 pm I see. So, if I understand correctly, most of these cases arise from fact that train can be "in the middle" of some edge of graph on which pathfinder operates, instead of being in one of nodes of this graph.
It is completly opposite. Since one node is related to segment that covers multiple rails, position inside node (as weird as it sounds) was used incorrectly. Train stops are always (lets ignore temporary train stops) at segments exit so train has to travel whole distance. If segment's length is not added into penalty, we are virtually at the beginning of segment but goal condition would assume we are at the end of segment and path was returned without last segment's distance considered.
Huh? Doesn't it make more sense to see the segments as edges and the transitions between them (signals/stops) as nodes?
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2976
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by boskid »

pleegwat wrote: ↑Sat Jan 25, 2020 8:43 pm Huh? Doesn't it make more sense to see the segments as edges and the transitions between them (signals/stops) as nodes?
No, segments (+direction) are nodes. Train is not traveling to a specific transition between segments, it is traveling to a specific segment(node). Where would it travel to if segment would be dead end (and so no transition)? or where should it travel to when doing temporary train stop in middle of segment (map in locomotive gui). Keep in mind you may have junction with up to 3 segments in and 3 segments out, this gives 9 transitions(edges) (each input to each output)
User avatar
Locane
Fast Inserter
Fast Inserter
Posts: 124
Joined: Fri Jan 04, 2019 8:46 am
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by Locane »

luc wrote: ↑Fri Jan 24, 2020 9:45 pm
Klonan wrote: ↑Fri Jan 24, 2020 5:40 pm From what I understand it was a perfectly amicable decision, he was happy and relieved, optimistic about new projects for him to work on, and that mostly he feels bad about leaving us at the last minute, but that he decided it was the best for everyone
Wow, okay, that paints an entirely different picture than the post. Not even sure there is a possible interpretation from the FFF that matches your comment. The FFF basically says:

- We delayed .18 twice already
- After reviewing the work done so far, we had to throw most of it out
- Then we kicked the developer off of that project and just started over with another one
- After replacing him and throwing away his code, he quit his job (implying this was all against his will)

And after he was kicked out for doing a bad job you also wanted to tell the world about it, or so it sounds like.

So when you then write that he was happy and felt bad about suddenly having to leave, imagine my confusion :P

I agreed with what Raphaello wrote about this not being cool, but I see that it was meant very differently. Isn't it also a thing in Czech to sugarcoat past relations just a little to sound thankful for all the work someone has done over the years? (Unless, of course, that is really not the case or if they actively sabotaged things or whatever, but that's not something I expect to apply here.) Or is that just a difference between German and Czech cultures?
I 100% thought this same thing, I'm relieved to know that it wasn't the case!
dee-
Filter Inserter
Filter Inserter
Posts: 416
Joined: Mon Jan 19, 2015 9:21 am
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by dee- »

eterevsky wrote: ↑Fri Jan 24, 2020 10:16 pm
ThorsDragon wrote: ↑Fri Jan 24, 2020 9:16 pm
eterevsky wrote: ↑Fri Jan 24, 2020 8:45 pm Now that 0.18 is out (in beta), I wonder what will happen to Industrial Revolution mod? It's no longer compatible with the latest version of Factorio, and the author apparently doesn't want to support it or release it for other potential maintainers. It's really sad, since IR is the highest-quality Factorio mod that I've seen so far.

I wonder if Wube considered buying out the mod from from Deadlock989 and releasing it in some form? I'd be prepared to buy it as a DLC or somethings.
I agree - IR is a VERY well done mod. Kudos to the mod author, unfortunate to hear he's done with it? if I'm understanding you correctly.
Yes: viewtopic.php?p=472490#p472490. Also the license under which he released the mod doesn't allow publishing derivative work.
The used license is pretty shit.

If the author does not continue development you can only dump the mod and simply forget about it:
Nobody is allowed to make it compatible with newer versions of Factorio and give that derivate to others to enjoy (ND).

You are stuck with the broken version and can just remember how cool it was while it teases you.

Or everyone who uses the mod has to implement the changes all by themselves as distribution of the modified material (= updates) is prohobited.
FasterJump
Fast Inserter
Fast Inserter
Posts: 235
Joined: Sat Jul 09, 2016 11:43 am
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by FasterJump »

Could we have a clarification on the fluids mechanics in a further FFF? A lot of things were announced if previous FFF, and it seems that almost everything is cancelled. What is going to happens to fluids now that Dominik, the author of FFF#260 - New fluid system has left the team?

About the Campaigns: A bit sad that both the new and the old campaigns are discarded. But I think that it's the right decision, I never felt the freedom/tech expansion of Factorio in those restricted play areas.

But there is still a problem with engaging new players into the game, and motivating them to get more, always more. I suggest to emphasize the filling of progression and rewards. If they are motivated enough, they will progress fast and learn the basics by themselves, in freeplay. Having an expanded set of achievements or quests (produce 100 iron plates, then produce 50 copper plates, with a reward for each quests) could help with it. There would be a displayed progress bar that pushes the player to fill it again and again, faster and faster. Those quests would be active by default, and could reward the player with items/ammo/skins/game modes/bonus productivity/trophies to place and display in the base/Unique limited legendary modules/potions of HP or strength/free stack of 50 concrete/Experience points with capped level=10/
Last edited by FasterJump on Sun Jan 26, 2020 8:46 pm, edited 1 time in total.
Freddie Chopin
Inserter
Inserter
Posts: 30
Joined: Fri Jan 24, 2020 4:32 pm
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by Freddie Chopin »

ThunderFD wrote: ↑Sat Jan 25, 2020 8:07 pm
KoblerMan wrote: ↑Sat Jan 25, 2020 5:45 pm
GottZ wrote: ↑Fri Jan 24, 2020 3:57 pm scenario:
you have 5 iron ore mines with chests and loaders attached.

0 ore in the chests: train station outputs a request value of 0 cause it is unreasonable to send a train to a empty station

1 - amout of circuit calculated train cargo: train station outputs a request value of 1

n train cargo + 1 ore available: n+1 output signal until the number exceeds the maximum number of trains the station can keep off the main rail (waiting station with signals) (comparator ftw)

if you use signals / toggle train stations, you will send out all available trains that have this station set as next target.

to counter that, you'd have to create individualized train depot stations with separate logic to only let trains move when a circuit logic signal is present.
problem:
two trains leave.. great.
but they arrive at the same station even though two separately positioned stations are available.


additionally it would be awesome if circuit logic could tell a train to skip the next N stations with one tick so it would be possible to use multiple cargo trains for different items and balance them through circuit logic.
even better: make it so configured stations can be targeted with a circuit logic expression that was send by the current train station.
Guess what? You can do EVERYTHING HERE with circuit network logic.

You can configure any given station to turn off under specific conditions, including (but not limited to) being occupied already by a train; not having enough resources in chests to justify allowing a train in; or knowing based on remaining resources to mine (such as none left) that the remainder of resources in the chest is the only amount that the station can provide, then allowing a train in to pick up the last of the resources and permanently disable the station afterward. I know this because I've done it all before. Why add logic like this into the trains when you can create it yourself?

Side note: if any of you are particularly interested in doing this, my hint to you is that most logic is actually handled at the resource pickup area. Also, remember that trains themselves can hold logic. A friend of mine actually theorycrafted wireless transmission of data using logic and the train network, and I watched it work. It was like magic to me.
what if you have 5 trains waiting at iron plate stations full with iron plates to deliver - now one iron plate unloading station goes active again and boom! multiple trains on their way - there's no easy solution to limiting how many trains go to a station if multiple are waiting for a station with that name to unlock
... you could do a super complicated thing with global circuit wires and blocking off the trains with signals, but then you probably can't dispatch to different stations at the same time as the trains would path to the same station, without going super crazy... or am I missing something very obvious?
I'd love a limiter of how many trains can be on their way to a station at the same time
True. I'm a factorio-novice, but I really don't believe that you can do such a thing in a manageable and scalable way. If you have 5 trains waiting to pick up iron ore and 2 of the pickups get activate in a same moment, then - sure - it's easy to dispatch just 2 trains, blocking the other 3, but both trains you dispatch will both go to the same pickup station initially - the closer one. Additionally I guess the goal of factorio is not to implement Touring-complete train router with 10000 combinators and 41431 wires... The fact that "you can" do that (which I actually doubt...) doesn't mean that "you should". For example I guess it is possible to launch a rocket by handcrafting nearly everything (except for things you cannot handcraft), including thousands of required science packs, but I don't think anyone would consider that fun or a challenge.
Molay
Fast Inserter
Fast Inserter
Posts: 202
Joined: Thu May 01, 2014 8:01 am
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by Molay »

+1 for adding a "max trains at this station: X" field. Would make life so much easier.
eterevsky
Burner Inserter
Burner Inserter
Posts: 13
Joined: Tue Mar 05, 2019 7:46 am
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by eterevsky »

dee- wrote: ↑Sat Jan 25, 2020 10:45 pm
eterevsky wrote: ↑Fri Jan 24, 2020 10:16 pm Yes: viewtopic.php?p=472490#p472490. Also the license under which he released the mod doesn't allow publishing derivative work.
You are stuck with the broken version and can just remember how cool it was while it teases you.

Or everyone who uses the mod has to implement the changes all by themselves as distribution of the modified material (= updates) is prohobited.
I suppose it might be legal to distribute a patch that upgrades the mod to a newer version together with instructions on how to apply it. But I doubt many people will do it.

I'm just happy that I played through this mod once before it got deprecated.
Miteusz
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Jan 25, 2020 3:17 pm
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by Miteusz »

boskid wrote: ↑Sat Jan 25, 2020 6:05 pm "The nodes are related to segments with extra information about travel direction. Edges are related to segment connections (transitions)"
Miteusz wrote: ↑Sat Jan 25, 2020 5:48 pm I see. So, if I understand correctly, most of these cases arise from fact that train can be "in the middle" of some edge of graph on which pathfinder operates, instead of being in one of nodes of this graph.
It is completly opposite. Since one node is related to segment that covers multiple rails, position inside node (as weird as it sounds) was used incorrectly. Train stops are always (lets ignore temporary train stops) at segments exit so train has to travel whole distance. If segment's length is not added into penalty, we are virtually at the beginning of segment but goal condition would assume we are at the end of segment and path was returned without last segment's distance considered.
Did you think about splitting node where train is to few nodes temporarily, such that one of these nodes corresponds to exact position where train is? And running Dijkstra algorithm from this node.
mmmPI
Smart Inserter
Smart Inserter
Posts: 3619
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by mmmPI »

About the team :
It feels good to read that boskid has same attention to trains that he had with pipes :).

It felt a bit sad to read a member leave the team after a decision that was related to the project he was working on. It is said that trial and errors are steps to success and from the phrasing it seems Dominik was part of this process. Wishes of best luck.


About the campaign :

trial and errors, at this point i still don't understand if the aim is for new players to be guided through the different mechanism the game has incorporated over time, or to give veterans player a refreshing experience, or both, or something else, i was surprised to read that no story would be in the campaign, i didn't know it was possible to do that, i like the ability to write my own everytime so this is fine.

With all that said, the multiple small scenarios seems to possibly address both public, versus the task of proposing an expanding campaign that has the same level of quality as the freepaly. The idea of crowdsourcing, is another form of modding to me, which is a strengh of Factorio, the system that is used for mods may find some applications for scenarios?

"Belt-madness" i think has 3 or 4 levels and is very fun to play, while quite short, easy and focused on belts, i would enjoy playing a "pipe-madness" , "train-madness", "biters-madness", "bot-madness" or some puzzle with combinators. I am pretty sure this could be used to teach one mechanism at a time, player would have access to some technologies that are hard to reach for a beginner in the freeplay, giving a glance at what research is for.

Also it wouldn't be linear, so one can jump into a simili-tutorial, for example on trains, when the researched is done in freeplay, but biters don't allow for safe experiment. Then later on same for robots if you don't know what to do with only red and yellow chest, you try the "bot-madness" thing, first levels are easy and tells you about the pieces locked behind research in freeplay. Latest level could be hard and require precise placement of limited number of chest that requires extensive understanding of the factorio rules that may stabilize after V1 ?

Curious to see what's coming :)



About trains :
Molay wrote: ↑Sun Jan 26, 2020 10:06 am +1 for adding a "max trains at this station: X" field. Would make life so much easier.
How should the game decide which train is allowed to go and which train is blocked ?

Let's say i have 100 trains of iron and i don't want them to all go at the same station, i just add some magic, and all the 100 trains will know how to behave and only 20/100 are allowed to move in my 20 iron station. The game automatically knows which 80 trains should be blocked ?

Now let say i have those 20 trains, those that are allowed to move, but suddenly 1 station closes. So the train should go join the 80 parked trains ? The game shall decide to stop one of the trains ? Even though there are station with the correct name opened, should this 1 too many trains freeze on spot ? Saying "max number of train allowed to move to X station already reached ?

I think i understand what is being asked, i just can't picture how it would function in practice.

I feel this is another logic for train management that maybe you can replicate using mods that alter the vanilla game, like Logistic train networks, or Train Supply Manager ( and those i don't know about sorry) depending on how precise your idea on how train should behave is.

The more you ask the game to do as "logic" the less customization and adaptation is in your hand concerning the train network. Even though the mentionned idea is appealing i fear it will ties hands of players if some developpement is spent to make this part of the game, everyone will have to do with this. I feel the actual train logic is robust, it does not allow everything easily, but what the game requires to launch rocket is achievable through many different methods. (Feel free to argue i wouldn't mind being convinced, my impression was it's not that simple and may have drawbacks .)
Molay
Fast Inserter
Fast Inserter
Posts: 202
Joined: Thu May 01, 2014 8:01 am
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by Molay »

I think you're overthinking it.

Each station would get a new field #maxNumberOfTrains and #TrainsCurrentlyIncoming

The player sets maxNumberOfTrains it to some amount. Say 1. TrainsCurrentlyIncoming is a hidden field used by the game to track how many trains are incoming to this station.

If there are for some reason 20 trains waiting to depart, the first train (procedural processing, there's always a first train) to make this station his destination. This will increase the TrainsCurrentlyIncoming field by 1. Now maxNumberOfTrains is equal to TrainsCurrentlyIncoming, so the other trains won't even attempt to leave.

If the train has departed the station, or changed it's destination for any reason, TrainsCurrentlyIncoming gets decremented by 1. Now any of those 19 trains (first to check) will claim that spot and depart.

There should be no reason why a train would be stranded in the wild (at least no new reason, outside currently existing reasons). They only depart as needed. You can set a higher amount of allowed trains if you want to create a buffer area for them.

As to your idea of "only X of those 100 trains are allowed to go to that station", well, I don't exactly know what you mean. If the station has a certain name, and the train has that station name in it's schedule, it should be a viable destination. If it's not, your schedule is wrong and should be changed. If you want to do some crazy magic, you can of course still recreate everything with dozens or hundreds of combinators, arcane mathemagics and blocking of rail signals and disabling of stations.

For most uses, a maximum amount of trains will be doing exactly what LTN is doing now. Have a number of stations with the same name requesting the same input. A number of stations with the same name offering the same output. The only thing this would not do is make trains "universals". You'd always need to have X trains dedicated to, say, the iron plate delivery. But that's certainly not a bad thing all things considered.

It feels like an incredibly easy feature for the player to handle. You just click on a station, and in the GUI you have a slider (with textbox perhaps for typing number?) to enter the number of trains that are allowed to come here at any one time.

It would be incredibly powerful, and to me be the last missing QOL change to make vanilla an equal experience to modded. As of now, trains are quite unwieldy as you expand, and using the same station name has unnecessary complications and limitions. Currently you can end up with stranded trains if you do it poorly. A maximum limit of trains per station would be foolproof and not require any complicated setup.

Edit: Also, maxNumberOfTrains should be able to be set via signal. Instead of closing/opening stations, just adjust the number of trains allowed. 0 would default to a closed station.

Think of it as now we have 2 states: Closed station and open station. Closed takes nothing. Open takes everything.
With the change we'd have 3 states: 0 for closed stations, 1-x for maximum number of trains allowed, infinite (no limit/current behavior/takes everything).

Edit: To clarify, this change would not change train pathing behavior or anything like that. It would merely alter the destination decision process, by prohibiting going to a station that already has the maximum number of trains inbound. It's just a change in this process.
User avatar
Tesse11ation
Fast Inserter
Fast Inserter
Posts: 186
Joined: Sat Mar 05, 2016 12:59 am
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by Tesse11ation »

ThunderFD wrote: ↑Sat Jan 25, 2020 8:07 pm
KoblerMan wrote: ↑Sat Jan 25, 2020 5:45 pm
GottZ wrote: ↑Fri Jan 24, 2020 3:57 pm scenario:
you have 5 iron ore mines with chests and loaders attached.

0 ore in the chests: train station outputs a request value of 0 cause it is unreasonable to send a train to a empty station

1 - amout of circuit calculated train cargo: train station outputs a request value of 1

n train cargo + 1 ore available: n+1 output signal until the number exceeds the maximum number of trains the station can keep off the main rail (waiting station with signals) (comparator ftw)

if you use signals / toggle train stations, you will send out all available trains that have this station set as next target.

to counter that, you'd have to create individualized train depot stations with separate logic to only let trains move when a circuit logic signal is present.
problem:
two trains leave.. great.
but they arrive at the same station even though two separately positioned stations are available.


additionally it would be awesome if circuit logic could tell a train to skip the next N stations with one tick so it would be possible to use multiple cargo trains for different items and balance them through circuit logic.
even better: make it so configured stations can be targeted with a circuit logic expression that was send by the current train station.
Guess what? You can do EVERYTHING HERE with circuit network logic.

You can configure any given station to turn off under specific conditions, including (but not limited to) being occupied already by a train; not having enough resources in chests to justify allowing a train in; or knowing based on remaining resources to mine (such as none left) that the remainder of resources in the chest is the only amount that the station can provide, then allowing a train in to pick up the last of the resources and permanently disable the station afterward. I know this because I've done it all before. Why add logic like this into the trains when you can create it yourself?

Side note: if any of you are particularly interested in doing this, my hint to you is that most logic is actually handled at the resource pickup area. Also, remember that trains themselves can hold logic. A friend of mine actually theorycrafted wireless transmission of data using logic and the train network, and I watched it work. It was like magic to me.
what if you have 5 trains waiting at iron plate stations full with iron plates to deliver - now one iron plate unloading station goes active again and boom! multiple trains on their way - there's no easy solution to limiting how many trains go to a station if multiple are waiting for a station with that name to unlock
... you could do a super complicated thing with global circuit wires and blocking off the trains with signals, but then you probably can't dispatch to different stations at the same time as the trains would path to the same station, without going super crazy... or am I missing something very obvious?
I'd love a limiter of how many trains can be on their way to a station at the same time
I've run into the same problem before, and it's very difficult to do on a global train network. But, it can actually be done wirelessly. What you do is have a stacker in front of something that keeps a count of trains that leave, and compares them to the number all the possible stations that train could go. It has a counter that decrements for trains leaving and increments for arriving. A station that opens sends a pulse out that requests a train once, and it is received by your trains in holding. If the number of trains currently out for pickup is greater than or equal to the amount of currently open stations, you do not allow more trains through. In doing this, you can limit how many trains can arrive at each station.

My friend theorycrafted this and employed it after experimenting with wireless trains. Because it's wireless, there is a lot more overhead and you can see latency on networks where pickup outposts are further away. It's actually for that reason that we decided to scrap the idea and just went for a global circuit network instead. If you think you could figure out how to reproduce the wireless idea and make it more efficient though, by all means give it a shot. :D
ImageImage
System Specs
OS: Windows 10 Professional 64 Bit
CPU: AMD Ryzen 5 3600X (@~3.8 gHz)
GPU: Nvidia RTX 2080
RAM: 32GB DDR4 (2400)
DRIVES: 2x 1TB NVMe SSD, 1x 6TB HDD
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2976
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by boskid »

Molay wrote: ↑Sun Jan 26, 2020 10:06 am +1 for adding a "max trains at this station: X" field. Would make life so much easier.
I am not going to discuss this topic under FFF since it has nothing to do with FFF-331. Today i did some evaluation of this concept and it looks pretty much garbage, a lot of input and output stackers were required to make standard N to 1 (ore to smelters) work decently. If you are brave enough to face with problems of this concept, create new topic and i will throw at you some cases that are ugly to solve and makes this mechanic useless.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2976
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by boskid »

Miteusz wrote: ↑Sun Jan 26, 2020 1:43 pm Did you think about splitting node where train is to few nodes temporarily, such that one of these nodes corresponds to exact position where train is? And running Dijkstra algorithm from this node.
But why? Creating temporary starting node only to allow part of starting segmen distance participate in total penalty is just pointless. Since starting nodes are always inserted to priority queue before main pathfinder loop, i can simply set its initial cost from start to part of starting segment's length in front of train and from this point pathfinder would work exactly the same. Too much hassle and extra testing for zero gain.
cwalter5
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Jul 25, 2016 8:38 am
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by cwalter5 »

Locane wrote: ↑Sat Jan 25, 2020 9:54 pm
luc wrote: ↑Fri Jan 24, 2020 9:45 pm
Klonan wrote: ↑Fri Jan 24, 2020 5:40 pm From what I understand it was a perfectly amicable decision, he was happy and relieved, optimistic about new projects for him to work on, and that mostly he feels bad about leaving us at the last minute, but that he decided it was the best for everyone
Wow, okay, that paints an entirely different picture than the post. Not even sure there is a possible interpretation from the FFF that matches your comment. The FFF basically says:

- We delayed .18 twice already
- After reviewing the work done so far, we had to throw most of it out
- Then we kicked the developer off of that project and just started over with another one
- After replacing him and throwing away his code, he quit his job (implying this was all against his will)

And after he was kicked out for doing a bad job you also wanted to tell the world about it, or so it sounds like.

So when you then write that he was happy and felt bad about suddenly having to leave, imagine my confusion :P

I agreed with what Raphaello wrote about this not being cool, but I see that it was meant very differently. Isn't it also a thing in Czech to sugarcoat past relations just a little to sound thankful for all the work someone has done over the years? (Unless, of course, that is really not the case or if they actively sabotaged things or whatever, but that's not something I expect to apply here.) Or is that just a difference between German and Czech cultures?
I 100% thought this same thing, I'm relieved to know that it wasn't the case!
Whatever the case I would urge the Factorio team to be more careful how staff departures are dealt with in the future. You run the risk of running afoul of employment laws, especially if you are airing such grievances publicly.

I’d urge you to consider how you’d feel if you were searching for a new job and found out your potential employer had read a similar posting about you.
Hiladdar
Fast Inserter
Fast Inserter
Posts: 214
Joined: Mon May 14, 2018 6:47 pm
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by Hiladdar »

Regarding trains since several are talking about them in this thrad. I use several techniques:

1. For items that have to be transported to multiple locations, I'll set up a depot, where those items are stored. The the various locations send a train the the correct depot, when they need more of an item.

2. Each location, that needs items transported to it, will have have a rail yard servicing that location co-located, with 1-4 trains for each item needed to service it. Circuit network from that location, controls, from that outpost controls when the trains are released from the rail yard to drop of their inventory and reload from the depot. If the location is a depot, then there can be up to 25 trains servicing it. This is a fairly simple to implement, and does not involve stringing circuit wires all over the map, potentially getting signals crossed.

With mods, under Factorio version 0.17.79 I was able to get a base to sustain 25+ rockets launched per minute with science production and consumption of over 25k. My issue on that base was and is the size of the map (341m), and FPS dropping into the 20's when the base runs full production after 1-2+ hours. While the base is idle mode, 1-2 rockets are launched per minute, FPS is 59-60. It takes just over an hour to ramp the base up to full production and another hour to idle mode. That in itself is very impressive, mostly from Webe, on optimization of the core executable, to accommodate a base of this size.

Back to train improvements specifically in application of the Dijkstra algorithm, with how the paths and weights of the each path will be calculated is something that I am very excited about.

Hiladdar
mmmPI
Smart Inserter
Smart Inserter
Posts: 3619
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Friday Facts #331 - 0.18.0 release & Train pathfinder changes

Post by mmmPI »

Molay wrote: ↑Sun Jan 26, 2020 3:11 pm I think you're overthinking it.
Most likely true that's sort of my pleasure with factorio :)
Molay wrote: ↑Sun Jan 26, 2020 3:11 pm There should be no reason why a train would be stranded in the wild (at least no new reason, outside currently existing reasons). They only depart as needed. You can set a higher amount of allowed trains if you want to create a buffer area for them.

As to your idea of "only X of those 100 trains are allowed to go to that station", well, I don't exactly know what you mean. If the station has a certain name, and the train has that station name in it's schedule, it should be a viable destination. If it's not, your schedule is wrong and should be changed. If you want to do some crazy magic, you can of course still recreate everything with dozens or hundreds of combinators, arcane mathemagics and blocking of rail signals and disabling of stations.
I was thinking about a situation like this : 3 station called "Iron unload" are opened, each of them accepting 2 trains, so 6 trains are moving; full of iron 2 of them towards each station.

Now 1 train is unloaded and makes 1 station closes because it is full, thus leaving 2 stations opened accepting 2 trains each. Out of the 6 initial trains, 4 are fine going to the station they were going, 1 one them is going back to reload, but there is this 1 last train, that was supposed to reach the station that is now closed.

This last train would be stuck in a weird spot, trying to reach station with the correct name on schedule would be made impossible due to the new rule of "X max number of train allowed" on the 2 remaining "iron unload". but there would be 2 station with correct name opened and the trains would have receive authorisation for transport at one time. I think this is one "new" case of train stranded in the wild.

This can already happens if a station is closed when a train is going to it, the train will freeze on spot when station close[If no other station are opened/in reach on schedule], this behavior could be made more frequent as a consequence of player's mistake with new rules. Or i missed a thing ?

I thought it could force player not using the feature to think about it to prevent interferences with other method of routing trains but the 3 states described seems to solve that part.

From earlier play with LTN,it seems sort of advanced feature, it requires a depot, and some sort of knowledge on "how the finished thing look like when working", it allow behavior that none of my attempt at mathemagics was successful enough to reproduce. To my mind it feels similar to "taxi logic" vs "bus lane logic". The taxi-logic would be when trains don't have "lane" assigned, they can go anywhere from their depot depending on demand, such depot i feel would be required when you describe sliding a gui and trains join/leave a lane. ( i assumed from a depot). Such depot could handle the trains that have no more destination due to the new rule proposed. ( the place where the 80 trains are parked in the previous post).

I wouldn't mind seeing that in the vanilla game, but i feel it represent too complex of a mechanism for it to happen.
Post Reply

Return to β€œNews”