#Source-Sink-Push-Pull
1 messages ยท Page 3 of 1
Yeah, I should've just been more careful about adding entries next to other relevant entries.
I'll buckle down and just fix it.... maybe.
Or I could just let it be jumbled.
out of curiosity, do you normally use the copy button or the add buttons?
I only ever use the copy buttons so things just start in roughly the right spot
I find an existing entry with the same stack size, and copy it

I should find an existing entry with both the same stack size and a similar item category, like finding "lead plate" when adding "iron plate"
But, instead I copy "meat" , and my iron plate entry ends up right below meat.
yeah and everyone knows meat should be with tin
Its small peanuts in the grand scheme of things.
Very very rare that I'm looking to parse through my list of all items/fluids and change anything about a specific entry.
ok spent most of the day trying to make the network history tab not horribly laggy when it's trying to show 1000+ jobs
and I'm pretty sure that just aint gonna happen, the game just doesn't handle rendering tables that big
might have to just paginate it somehow
I really want the user to be able to check "when was the last delivery for this item" even if that delivery was a few hours ago
Another "train history/summary" mod i use has some buttons for only showing deliveries in the last [time frame], with a set list of time frames to pick from.
Like, 15 minutes, 30 minutes, 1 hour, 3 hours.
problem is, with ogadei's world I'm using for testing, there are 1000+ deliveries in just 30 minutes
The mod I'm mentioning also has a summary tab, where it shows totals of items/fluids loaded/unloaded.
Finding exactly when the last load/upload of any given item was... would be rough.
maybe once I get filtering done I can just have the default view limited to the 100 most recent jobs or something
then if the user really wants to see all of them, they have to go out of their way to do so
so it'll only be laggy if the user actually wants to see really old jobs
Makes sense.
Do I need to have as many depos as I have trains?
Or can I have more trains than there are depos
it won't explode if you have more trains, but they will get stuck at your requesters
depots do need to have a train limit of 1 if that is what you meant
I meant the first thing, since source stations will always take a train if I understand the settings correctly? So I'll just have trains waiting at supply stations, no real harm if I don't have a depo station for each single train
what you're describing are "bufferless" stations, which do work like you've described
You could end up with a deadlock, where a train that just finished dropping off an item has no depot to go to, and it's in the way of a train coming to drop off that item at the same stop. So both trains are just stuck.
Its likely that eventually a depot spot will open, and break the deadlock. But if that doesn't happen, your whole train network could just get deadlocked forever.
that's not what source means though
but if you toggle the little bufferless button in the top right of your provider stations, then yes, you should be able to get away with not having a depot for trains that will end up waiting at those stations instead
Oh so bufferless provider stations will always take a train even though there are no requesters that need that item at the moment?
exactly
True, didn't think of this
Buffer-less providers just treat the train wagon itself as the buffer.
yeah but they also act as effectively "constant" users of trains, so you don't need as many depots
How likely my described deadlock problem is to occur is dependent on how extreme your discrepancy between depots and trains is.
You can likely get away with 10 depots for 11 trains for quite some time before any endless deadlock occurs.
But 10 depots for 20 trains? Or 50? It's gonna happen far sooner.
Using bufferless stations as pseudo-depots is an interesting approach.
In a train station like this though, if an empty requester train has nowhere to go, it will just sit there if there are no avaliable supply stations or depos
Which should work fine
I will probably end up in a deadlock at some point
unless ALL of your providers are bufferless, you will need some depots though
I do have depos, currently only going to use trains as means of long distance transport, so no plans of using buffered stations for now
I personally find even an unlikely true-deadlock to be unacceptable. Adding on a few more depots just to be safe would have to be incredibly expensive/difficult before I would consider allowing a potential deadlock.
all bufferless sounds neat and should work
So the true calc is that you want [depot + bufferless-provider > train count]
Very interesting. I hadn't considered using bufferless in that way
depot + (bufferless provider * train limit) >= train count
Ohhhh, trueeeeee
I went with this route because I'm using loaders so buffering at stations doesn't really provide anything meaningfull for ores
the main reason not to use bufferless stations is when you want to do multi providers
but if you are working with high throughput, long distance travel (like ores), that's not really relevent
Multi-providers are so satisfying.
Yeah I can see them being very useful
Jagoly and I are both playing pyanodons.
So even ore, sometimes just mining stuff results in byproducts that make multi-providers very very useful.
And if you're doing any pre-processing to the ore to make it a bit more condensed for trains, that also generally kicks off some stone or gravel byproduct that needs to be dealt with.
The idea that a given site ever produces exclusively 1 type of item is basically non-existent in pY.
all of my ore still gets caravaned lmao
into an outpost where the station will eventually be

I never set up caravans.....
Don't tell everyone over on the pY discord, they'll make fun of me.
wait till this thread finds out I'm yet to actually place any trains in my real world

I am new to the mod. I have a train ready to dispatch, a station requesting and a station providing, but nothing is being delivered. What am I missing?
It's hard to know without more info, would you be able to share screenshots of the station guis?
I think you might have an extra zero in delivery size
your stations don't have/need enough items
16k would indeed be a lot of delivery
I am trying to migrate my existing LTN setup to use SSPP, but I want to do it incrementally. Currently the game crashes when both SSPP and LTN are installed.
That's rough ๐
Hmm, there's no reason it should crash, but I haven't tested with LTN before
I'll have a look when I get a chance
Something about registering the station
Could you share a screenshot of the crash? A save would be even better
It crashes on launch so no save needed
Oh huh
Looks like LTN is doing something weird
I should be able to work around it though

i intend for this station to provide biomass from my biomass power plant when it's needed elsewhere,
while also sinking spare biomass from other places when those places produce it as byproduct, putting the spare biomass back into the general stream to be burnt in the power plant.
but the source-stock is making the station think that the sink is clogged.
trying to think of how to make it work, without just adding a separate station
I haven't put a lot of thought into two way stations like that, but does setting dynamic modes work?
that might be the ticket
So that the station doesn't try to provide and request at the same time
even if i dont make them dynamic, just having the explicit declaration of operation modes might work
well.....
hmmm
Yeah dynamic mode also functions as a simple on/off switch
i can signal [ 2 on 1๏ธโฃ ] to the Request_I/O, telling the station to medium-sink biomass, but that wont prevent the General_I/O from "seeing" the stock on the left side chest at the station
You combine the mode with a decider
You want the storage to be shared anyway I would think
i separated the chests so that the inserters circled in blue dont just endlessly hand off items to the inserters circled in red
i suppose i could have the blue set to only enable if below X, and the reds only enable if above X
that'd work
It kind of seems like logically you have just made two stations here

the General_I/O is seeing 2.1k biomass.
which means it's primed for being a Source.
Ngl I've had about 4 hours sleep in the last 48 hours so I'm not gonna be much help rn
yea, no worries, i'll figure it out (or reasonably convince myself that it's unsolveable)
Its possible there's just some oversight in the way the polling logic works that just makes this not work, two way items just aren't something I've tested yet
But it might work
i dont think there's a way to "blind" the source portion of the station to the contents of the station, such that the sink portion will see it can accept a shipment,
without that blinding causing the station to also think it cant act as a source
so, separate stations it it ๐
not bad

If the I/O combinators could have their inputs delineated between red and green wire, that would have allowed 1 station.
My sink side reporting to the general_I/O on the red wire, the source side reporting on the green wire.
Probly more of a niche use case than is worth bothering with.
@drowsy palm hotfix for LTN compatibility
I'll do a up a proper release soon but it'd be awesome if you can confirm that there's not any other obvious issues once you actually load into your save
it should be doable without needing to do that, you just need a bit of external combinator logic
also funnily enough early prototypes of the mod did actually make use of different input on different wire colours
but I scrapped it because it would have been really confusing for new users (and just plain inconvenient sometimes)
the main issue with any two way design is that with the way SSPP works, normally it would be quite possible for a station to actually be demanding both a provide and request delivery at the same time
so you need to have some logic to just hard disable providing/requesting at some cutoff point
think of say a station where the target (storage needed as calculated by the mod) is multiple deliveries worth
the station might have just over 1 delivery currently in stock, which would then be provided
but it would also be requesting a delivery because it wants to stockpile more than that

I wonder what happens if a station tries to deliver to itself actually ๐
I think it should "work"
Hmmmm..... I did have my 2 entries (1 sink, 1 source) set to basically the same configuration. Only difference being the operating mode.
So it's "target" amount would be the same.
But if the sink side wants to maintain a number greater than the source side.... hmmmmmm.....
even if the numbers are the same
they just need to be at least 2 deliveries worth
1 delivery of biomass is 2k. (1 wagon trains, stack size of 100)
So the source side was waiting to see more than [2,000] before being open for pickup.
And the sink side was looking for..... some number, before closing itself to receiving further deliveries.
Maybe my confusion is just in not know what that number is. The system handles it all for me
(also to be clear I'm only saying it should be technically possible to have a two way station, not that it's a good idea or worth the trouble vs just having two stations, especially if you don't want to share storage anyway)
I was only splitting the storage so I could have a large crane for each direction, as opposed to having merely a small crane for each direction.
Which, is likely unnecessary. Not like the throughput needs of this station are going to actually demand large cranes for both.
I should parse through the code to try and recreate the calcs for thresholds past which a request will actually demand service.
So I can get a better understanding there.
On my (mental) TODO list is a detailed tooltip for the "storage needed" value that will show you the whole formula with numbers
That is precisely what I'm looking for atm.
Parsing through the code for it, while certainly more of a hassle, is still something I think is a good exercise for me.
(Not even just for factorio things, but I'm trying to get better at reading code)
I'm pretty sure I have linked the relevent bits to you before
https://forums.factorio.com/viewtopic.php?t=128457 have to decide if I want to just live with the history tab being laggy with the hope that the devs fix this issue, or if I want to redesign the whole thing
Sometimes, it's convenient to add a very large number of rows to a table (1000+) but only show a small set of them, by keeping most of them set to visible =โฆ
Its just lag, right?
Like, ofc if you take it to extremes, it can get unstable and maybe crash.
But for the most part, it's just a matter of "i go to the history tab, and my computer is gonna have to chug through some stuff to bring it all up"?
yeah pretty much
I bit awkward, but understandable.
it's one of those things where I wish the game was open source, because if I could just add one or two lines of c++ I could fix the issue entirely lol
I manually installed the mod into the mods folder but it does not show up in the mods manager
odd, did you just paste it over the top of the existing file with the same name?
if you uninstalled the original first, then it might not be detected
you'll want to install the mod normally from the mod browser, close the game, replace the file, then open the game again
I have tried this and after replacing it does not show up in game
Still not showing up ๐ฅฒ
it happens
please tell me that one worked
I did have a quick look over LTN and I don't think it and SSPP should interfere with each other, since they use different train stops and methods of registering trains
wooooo
also
\o/
What happens if you try and press the "reorder" up/down buttons while it's searched?
they move the "virtual" row up one space
basically it moves the row as if all rows were visible
so its a bit weird in that if there are lot of hidden rows in between, you can click the button and seemingly nothing will happen
but that seems less bad than having the item unexpectedly jump up like 20 places

plus if you have related items with similar names group together, it might still be useful to move them relative to each other, which is why I didn't just disable moving altogether when things are filtered
like before when I searched for science, you can reorder them relative to each other
Is there a way to set delivery size depending on the train that comes in? Since I have some tier 2 and tier 3 wagons (from bobs mods) which have different inventory sizes
Or is there a way for a requster train stop to accept multiple classes?
You could set up an entry under "items/fluids" for each train layout and delivery size,
Then set up 2 entries in the station, one for each declared "item" (even tho it's the same item)
Entries for provide and request at the station level have their train class declared per-entry
You can't have duplicate entries for items like that
For now the answer to the question is just no, when you upgrade your wagons you will need to just switch the item over completely. Remember that larger delivery sizes aren't always needed for every item so you can still keep using your old wagons for those
And that's because a station can only have 1 provide entry for a given item?
Its for a whole bunch of reasons
I did make a start on adding support for multiple virtual item entries of the same type but ran into a bunch of problems, so that work is on pause for now
Could they put 2 stations in series with each other?
One is set to provide the item to "train class A" and the other is set to provide to "train class B"
Like what I did when I hit the limit of 10 entries?
Just having two different virtual items at all is the main problem
People would likely expect them to care about each other wrt demand and priority and whatnot
But they just wouldn't be able to, they'd act like completely independent resources
To clarify; the network as a whole won't allow multiple declarations of the same item type?
No that's exactly what it would be
Basically there'd be "iron plates a" and "iron plates b"
I think people tend to greatly overvalue how useful the feature would be
I can see it being useful for situations where a production chain demands a wide variety of items, but low amounts of any given item.
You might have massive 2-8 trains carrying an item for sites that demand massive throughput of Item-A
But then have a different site that only needs a little of Item-A, and they don't wanna have to have the site be designed with massive 2-8 stations, when a 1-1 station would suffice.
Yeah but massive 2-8 trains are just straight up bad
People only still use them because they think they're cool
With elevated rails basically solving congestion smaller trains are just better
Maybe.
I'm not totally convinced that small trains are always the best solution. But that's not really a debate relevant to the mod specifically.
And I've also said before that I think that for the rare specific cases where train throughput is the issue, dedicaated vanilla train routes are the way to go
Like if you have a massive throughput route that also needs massive stations on both ends, just use a vanilla train for that
For the general many to many case where reliable distribution matters more, homogeneous deliveries just makes things a lot simpler
I wouldn't even want to taint my 1-1 rail network with a 2-8 train since it would absolutely destroy effeciency by making the signalling many times worse
Would a single 2-8 train make traffic worse than 8x 1-1 trains?
I don't know which of those would be worse for traffic... hmmm.
Yes because now your network needs to be signalled for 10 car trains
So your intersections are either 5 times the size, or really bad
Maybe I'm just blissfully unaware of how bad my current intersections are, cos i don't think I'd hit any major problems if I tried to send large trains through them.
The thing is that literally the only reason to use big trains is congestion
Better stations and intersections improve congestion more than bigger trains do

I believe this gets into "buffered intersections" vs "non-buffered intersections", which I've never bothered even learning what the distinction is there.
They also barely matter if you use small trains ๐
Buffered intersections also are a lot less useful with elevated rails
How do I assign a class to a station? I need multiple classess transporting the same item
the mod does not currently allow that, sorry
Some of my trains are reversible, and I have others that are directional for longer distances
But I can't have a non reversible train pull in to a reversible only station
generally the ethos of the mod is to avoid ever having to micro manage routes/stations like that
are the cases where you want to do long distance transport specifically ores by any chance?
Fluids such as Petrol and Lubricant
I had set up a buffer for the long distance trains to unload into the reversable "shuttle" trains
basically, if a route doesn't actually need the advanced distribution features of the mod (priority, byproduct handling, etc) then it's intended to just use a vanilla route for that
This is only needed because my friend decided it was a good idea to set up oil refining 500m away from the main base
and I didnt want to wait for a train to travel there and back
but I guess more storage can fix that problem #firstworldissues
is there no way to just connect it to the main rail system and use your normal bidirectional trains?
I can but the bidirectional trains are not as fast which is why I wanted two different train classes
well yeah, options are either connect it to the main system and just add an extra buffer tank or two to account for the longer travel time, or use a dedicated vanilla route
fwiw, I do plan to eventually add some kind of support for multiple networks per surface for cases where you have separate bulk transport and factory distribution systems
but for now, vanilla routes work well enough for the bulk transport case
also if you do opt to just connect it to the main system and use the normal trains, consider making the providers bufferless
that way they can avoid the time that it takes to send a train from a depot to the provider which might save you enough time not to need to bother with different kinds of trains
that would work, if I wasnt loading and unloading multiple items at the same station ๐
ah, I see
generally I would think that if throughput at a station gets so high that you are worrying about giving it special trains, then you probably also want to not have those stations do multiple items
(also what mod is this btw? I don't recognise the machines on the right)
I thought I already fixed that???
ยฏ_(ใ)_/ยฏ
apparently I forgot to backport part of that bugfix when I did the last release, my bad
oh well, it is already fixed for the next version anyway
My current view (still learning):
I find that designing on a grid and having a train limit of two helps a lot with the congestion. I use a grid system where each train can swap routes while it is moving across the map to avoid busy intersections (they seem to do this a lot, if I sit in the engine and watch). But a grid would be unwieldy with large trains, so all mine are 1:1.
I also prefer to smelt at the resource (except coal), because you can get twice as many plates on each train than you can fit ore. In the early game, I don't have enough furnaces to do that, so I stack the ore to make it quicker to load and unload at each station and there aren't many trains either, so it's not a problem in practice.
I haven't tried more than 100 trains, yet, but 100 trains feels like quite a lot to me.
to be fair, I do think deadlock stacking is doing a lot of heavy lifting in your base
I do agree with all of your points though
OK. I haven't looked at that, yet. I'm experimenting with how much each grid zone should produce at the moment
i.e. more zones spread around with slower assemblers, or really stack the modules and pack the assemblers into fewer zones.
UPS doesn't seem to be a problem for me
Do you mean stacking on the belts?
I mean shipping deadlock stacks of items on trains instead of unstacked items
That saves a lot of train trips
I don't think that it saves train trips. The stack size is scaled down, so you transport the same amount of ore. But the loading and unloading happens a lot quicker.
oh huh
I think I was getting mixed up with some of your other items which do have custom stack sizes
ok
Not in my version of the game. Perhaps Py changes it?
yeah normally ore only stacks to 50, including in vanilla
OK. I've probably loaded a mod that increases it
Is there a reason the full train route is not programmed into the train?
It would be convinent to see the train's next destination while it is still loading, as well as any timeouts
I know you can see it in the mod gui but sometimes I just want to click on the train
It would also be useful to be able to send the train to the next destination early if needed
Because the train doesn't have a next destination yet
It will decide the best requester once it's done at the provider, and that isn't always the one that initially asked for a dispatch
Also, just toggling the train to manual and then back to auto will effectively get it to go to a requester early
Something that I would find useful is to highlight any depot stations that don't have a train limit of 1, if that's not too difficult?
Why is there an arbitrary hard limit of 10 items that can be requested per stop? Can this please be added as a option in mod settings, or just removed completely?
It's there because of game limitations. There was no good way to store enough data for all of the settings that items might have, and the current system potentially hits a character limit on the combinator description used to store the settings. I'm going to try and move to a different system (hoping that some recent base game updates make that possible) once I finish up the current batch of work, but there's a lot of work to do because the alternate way is still pretty inconvenient and will need a LOT of bug testing.
I think I should be able to make a simple one-line console command to do that in any game, with or without the mod
but it might also be useful to be able to show a list of stations for classes (on the right) that could be filtered based on various things
@peak sluice /c for _, surface in pairs(game.surfaces) do for _, stop in pairs(surface.find_entities_filtered({name = "train-stop"})) do if stop.backer_name == "depot" and stop.trains_limit ~= 1 then game.print(stop) end end end
change the backer_name == "depot" bit to whatever the name of your depots is
Thank you!
Searching for groups of stations might be a fun thing to have. It's not urgent for me, though
Sorry for delay. It works
If a station requests multiple items, will a single train do multiple items or will there be separate trains for each item?
Multiple trains
Which is intentional, don't worry about grouping related items together at stations
If you find yourself wanting to do "sushi trains" (multiple items on a single train), there are ways to do that with vanilla train stops, but it does (in practice) require having trains dedicated to those sushi-train routes
And you can always implement vanilla train stuff alongside SSPP stuff, which is nice.
Only real time I've ever reached for sushi-trains is for perimeter walls, having them built/supplied with all the belts, inserters, turets, and ammo that they might need. Cos that's a large variety of items, all needed in relatively small amounts.
Was just wondering, I have some stuff that has quite a few ingredients and not enough space for a station per iten
As long as your import list doesn't exceed 10 entries, you should be fine.
(And even if you've got a few over 10, it can be made to work with some serial-station magic)
Is there any "known reason" why the Provide I/O doesn't like satellites? It doesn't seem to want to set the output signal when the train arrives to pick them up.
I tried browsing through this channel and google, but does anyone know of a tutorial video on how to get this to work?
I found it hard to get started, too. There are settings that I still don't understand, but I eventually got a game working well without it, as long I followed a few basic rules. I think it's worth the effort, if you are persistent.
How far have you got, so far?
I think I figured the basics, now I just can't figure out how to set the trains up to start working with the system
That's too generic, I'm afraid. I can't see your screen, so I have no idea what stage you're at. ๐
Can you give me some specifc details? Have you created at least one request station ("pull") and a provide station ("source")? What are you trying to ship; have you set up the delivery sizes and train class? The ideal would be for you to post a link to your game, if you don't fancy a long slow conversation ๐
Yes I created a provide thats got enough cargo for its suprlus and as far as I can tell the provide station is setup and i did an opposite request station for that item. I have my depot setup with the class setup to define the depot. I have a train at the depot. I just dont know how to make the train start accepting jobs
Not sure how I would post a link to the game, do you mean the save? or streaming it in discord. not entirely sure
I tend to put a save onto Google Drive and share it that way. Are you familiar with that?
yeah I can do that one sec
I don't have the space age expansion, btw. I've only got the vanilla game
hmmm not sure how I would send it to you then. I am not at space age anything just started a fresh game but it does have space age required
i think
Thanks, let's try it anyway. Can you make the link public?
sorry forgot that step. should be done now
I can't open it with the vanilla game ๐ฆ
Can you open this one of mine: https://drive.google.com/file/d/19Kn0HbdAU_picuH3ru4KHRvibvCM3cSW/view?usp=drive_link
?
loading it up
as far as I can tell I have the stations setup the same. differences I can see is I have loaders from a warehouse instead of a bunch of inserters. otherwise it looks the same. I just dont see how you make the trains start doing their thing linked into the network. Right now my train is setup to go to depot stop but I am sure thats wrong. I just cant figure out what it needs to do
OK. The key problems that I had are:
-
The station's Mode thing is not orthogonal. You need to match request I/O "pull" with a provide I/O "source" and not with "push" (which in my mind feels the more natural pairing). If you don't get that right, then nothing happens.
-
Don't have too high a throughput, except with fluids. I tend to use numbers less than 100, or it sits there for too long waiting for an unreasonable amount of resource to build up. At the start of a new game, I use "11" for all of the throughputs, and only adjust them as the base starts to grow big.
-
Don't have too low a throughput. Make the deficit be bigger than the delivery size (I either use 20% more or 220% more at the start of the game)
-
Make sure that you haven't accidentally disabled the station. It's one of the small buttons in the top-right corner; they should all be black; not yellow.
-
I don't understand in detail the effect of the Latency and Delivery time settings. I've asked and been a bit confused by the answer (story of my life, I have a strange way of looking at the world!). I tend to set delivery time to 120 and latency to 30 at the start and sometimes 60, if I want it to flood the request station, e.g. stone tablets when making green circuits.
Do any of those things help?
i guess the question is more what do I tell the train to do? do i just send it to the depot then it takes off? do I have to set some circuit condition?
Ah, that may be the problem. Did you configure the individual train with its class?
You don't need to do any more than tell it that it's an SSPP train.
i guess thats the part I am missing. how do I configure it to a class?
In my map, click on one of the trains in the depot to bring up the schdule/fuel display. Then look in the bottom right. That's where you tell it to be a member of the SSPP class:
ok i didnt notice that before but every time I select the icon for the class it shows up for a tiny bit then disappears again without actually setting it
The train needs to be in manual mode for you to change it
perfect i think I got it sorted
Great
thanks so much
Once you have configured one train for a class, you can use the "recycle" icon button to do all the others with a single click. Saves a lot of typing.
You're welcome
gonna have to play with the throughput numbers but Its largely working
3 shouldn't be an issue, the delivery size acts as a minimum even if you use a really low throughput value
Also huge thanks for helping out, I'm helping my friend who's just moved here from interstate so I'm pretty busy at the moment
New release is up! Its not particularly exciting given how long its been since the last proper release, but basic searching within the network GUI is now possible.

Depos shouldn't have more than one train, right?
Yep
There was discussion here about depots with a train limits other than 1, but its a bit over my head. Maybe it'll make sense to you.
That discussion was just about finding depots with limits other than one so that they can be set to one
Thanks, I have another question, a bit stumped about this one
Why is it giving me an error for an invalid value for the second crude oil on the bottom?
Liquid as a class exists
I'm guessing you can't have multiple classes per uniqe item?
What I am doing is building a new base with trains that are not double headed and I don't want the old base to stop working since I need the materials for the new one
Unless there is support for like multiple networks per surface?
Multi network per surface is planned, but not supported yet, sorry
I haven't decided yet but the next thing I'll be working on is either that or getting around the 10 item limit
Probably multi network because I think that should be simpler
Now that you're finished with that update to the code, can we go back to a discussion about the calculations behind the throughput etc?
For example, in this screenshot, the storage is 150k, but it says that it only needs 133,300. So I think that's OK, correct?
The storage is full at the moment, so there is actually 150k of oil in the tanks. So why does it say that the surplus is 100k?
I find it all a bit confusing - essentially, all that I tend to do is to put some random numbers so that deficit > delivery and the actual storage >= the storage needed. I have no idea where these numbers come from. If I double the throughput, the deficit might double, or it might go up by only 10%.
It all seems a bit random to me.
The surplus is literally just a read of the input signal
So you must not have all of your tanks plugged in
I feel like what the numbers are isn't that complicated. You put your throughput value in, it tells you how much storage the system needs for it to be possible to maintain that throughput reliably
If you put in a number too low, the station might clog up (for providers) or run dry (for requesters)
If you don't care about buffering a heap of extra items, then you can just make up numbers until the storage needed value is equal to the total storage, but you don't need to do that
OK. It may be that I don't have all of thetanks plugged in. I'll check that.
However,m the reason why I'm asking is that I can't find values that work for things that I don't want in their thousands. For example, when building this thing:
I don't want it to be trying to store 15,000 high-level items. But I don't know of a number that is smaller than 1 ๐
So, how does it calculate these values?
0.5 would be one every 2 seconds
OK. I didn't realise that fractions are OK
Yeah, that's pretty common for more expensive items in overhauls
What I really want is to have an option to say "hold this many items". I don't want to be trying to mainipulate your calculation of that value. Would it be hard to give me a "manual" option like that?
Like this, it feels like I'm driving a car without a steering wheel and throttle, but only telling it the maximum speed and average direction I want to travel in. ๐
Its still going to be 1000 at minimum though, but that's just because of the stack size
Thats pretty much how the mod is meant to work
Its not 100 little cars, its a public transit system
Having a minimum of the stack size is unfortunate.
That's never an issue unless you are using mods to have silly stack sizes ๐
I can't work around those
I mean I could but it's never relevant without those mods
When it pulls items, it's often got a few "extra" ones, though. I thought that's what you connect the output of the Request I/O to the inserters?
OK, that's a shame
Not sure what you mean, there shouldn't be extra ones
The point of granularity is that it prevents overshooting the target
I see trains that don't have whole numbers of stacks
Basically the code just rounds most targets up to a multiple of stack size, that's only a target though, trains may load slightly less depending on granularity
That is better than risking items getting stuck in inserters and later loaded into the wrong train
But the stack size rounding isn't actually important
It could be removed but it should never be relevent, and it avoids a lot of weird edge cases
The granularity is working fine - I don't see it leaving excess in inserters. But I would like to be able to have a way to ensure a "target stock" in each receiving station. Trying to fine-tune the "throughput" on a 400 MB layout is pretty much impossible. It's much better to make it try to hold a fixed stock in the warehouse.
I mean I would hard disagree there, but that is easy to do anyway, it only takes a few seconds to play with the throughput value until the target is your desired amount
OK, thanks. I'll use fractions ๐
I don't want to clutter the gui with a way to do that
Plus you really don't need to "fine tune" throughput
Just look at how many belts you have coming out of the station if you don't want to use rate calculator, yafc, factory planner, etc
I do need to fine tune it because it likes to send 1,000 to one station and starve the others. The "random target" rather than "round robin" target system that SSPP uses needs lots of trains to be sent to average out the distribution. Which is a problem when "lots of trains" is impossible when the items are so expensive.
I really feel like a lot of your issues are coming from the massive stack sizes
Maybe true. But I feel that the algorithm is wrong even with small stack sizes.
That's just going to happen if you can only make a deliveries worth of items every 20 minutes or so
No, it's 5,000. Sorry
It's a silly stack size, I agree. But I like having big stacks for other things
Maybe I ought to write my own stack size modifier ๐
I agree
Though I think the deficit should still be no more than 10000
But, for very large bases when things spread all over, the "delivery time" is pretty impossible to set at a class level
So it may be slightly off
Should be clamping at 2 slots, but maybe it doesn't handle delivery size < stack size properly
How about having this as a workaround to the difference between how the mod works and what I would like to have:
Instead of connecting SSPP directly to the storage, I'd connect it to some combinators that clamp the "deficit" to the delivery size. I'd then have a delivery size set to something small, like 5, and have a train limit of 2 on the stations. Then, at most, it'll try to send 10 items to each factory stream in the base.
I'm not following
I think it would probably be better to just add an option to not clamp to stack sizes, yeah?
That might work. Because i don't know the calculations, I can't be sure
The issue does seem to be that you just want to send very small amounts
In this case, I'm trying to get it to spread the slow supply across several receivers
You will need more advanced inserter logic to load amounts that small
Since 20 inserters activating at once will load (20*hand size) items instantly
I'd like something that's more resilient in the face of short supply. Using random destinations is one of the problems. Trying to send full stacks is another. Thinking that the minimum throughput is 1 was a problem (that's down to not knowing that I can use fractions).
There may be more issues, I'm not sure. The key thing, for me, is how SSPP reacts in the face of (possibly extreme) shortages of supply of some resource. It works beautifully when there are plenty of suppliers but hits a problem as soon as something gets rare. It seems that it then feeds only one stream reliably, and all the others collapse.
When I can I'll add an option to remove the rounding to stack sizes
OK
I suspect that that with smaller delivery sizes will make the problem go away entirely
OK, let's try that.
In the Network GUI, would it be possible to add the total number of all of the stations that are capable of providing each type of resource to the stations column?
I'm trying to work out why the iron plates are not being transported:
when there are more than 20 trains sitting in depots. A save of the game is here:
https://drive.google.com/file/d/1XK2h_HanxYGfMCKQJWXw7NssKeMMbYeA/view?usp=sharing
The left hand window seems to think that there are no stations "pulling" (0+0), but the right-hand-side says that there are stations with a deficit. So I wonder if I'm misunderstanding what it's showing me?
What is delivery size
All of those requesters seem to have deficits <= 10000
Demand shows the number of deliveries that want to be started
If pull demand is zero, it means that none of the pull stations have a big enough deficit to trigger a delivery
Ignore this, 3 slots is correct
One for the delivery, one for a buffer from push stations, one for a buffer from source stations
I was tired I guess
There isn't a bug in the delivery logic; the "problem" is that the suppliers are disabled, but it's not obvious from the Network GUI display. So it appears as though those stations can deliver stuff when they can't
And my report wasn't as clear as it should have been. Sorry about that
I'm not sure if there is an issue here other than the tooltip for demand not being more detailed
Do you remember we had a chat in the forums about having a way to make disabled stations more obvious?
I think the Network GUI display would / might be a way to do it. I use it a lot; it's great
I think we talked about adding a stations tab
It would also take me about 5 minutes to make a one line command to list them though
Another tab feels like quite a lot of work for this, though
listing them doesn't help you find them
It'd be filterable
I mean for when the base gets big and messy.
Well they'd be clickable, like the current minimaps are
Ah, good point
As long as I can work out which of the several hundred stations is the one that's disabled, that might work
Adding more filters for the existing item stations minimaps view could also help
But having an extra count in the station column here would make it jump out at me:
yes
Maybe something as simple as graying out disabled stations in the minimaps view
You'd still only be able to check disabled stations for one item at a time though, without a dedicated stations tab
That works for me, as long as it's still clickable when it's grayed.
Which is why I wondered about having that third count
Honestly I don't know if that'd be useful enough to warrant a whole column, I don't want the tab to turn into a giant spreadsheet
OK
Like there are a lot of other things that can cause a station to not function, other than just being disabled
I agree. So your idea of having a filter for disabled stations seems like the best solution. Especially if the filter is only clickable when there is at least one disabled station for that item.
Then it will be obvious to me when I've forgotten something that I did ages ago.
@peak sluice command to list all disabled stations: /c for _, surface in pairs(game.surfaces) do for _, stop in pairs(surface.find_entities_filtered({name = "sspp-stop"})) do if bit32.btest(stop.get_or_create_control_behavior().logistic_condition.constant or 0, 2) then game.print(stop) end end end
don't know how long it will be till I get around to working on a stations tab
Thank you
custom networks coming soon
this'll let you have a separate base on the same surface with different class/item settings, or to do something like having a secondary high-volume network using the same rails as your main network but different trains and stations
O_O this'll be useful for separating fluids of the same type, but different temps
(Please ignore the message that I just deleted; the workaround does not help.)
If you didn't read it before I just deleted it, I'm talking about what happens when the delivery size is less than the stack size. I've now got a map that sends empty trains even when the delivery size equals the stack size:
https://drive.google.com/file/d/1y-MuCaMS-kWRof2q2lYeNllVYBKdsCre/view?usp=sharing
SSPP is sending empty trains, even when there are plenty of things to send, and the delivery size is, at least, the stack size (I've also tried stack size + 1).
thanks, I'll have a look
oh man the base has GROWN
looks like a disease slowly speading across the land
right so it looks like the issue is the same one as before, granularity is higher than stack size
basically you are saying that the smallest possible number of items that the station is capable of loading is 262
but delivery size is 100, so the mod is making sure that it doesn't load extra items, which is causing it to try and load zero items
so it is TECHNICALLY working as intended, even if it is a bit silly
really it should just warn you when granularity > delivery size rather than pointlessly sending trains
if you want this station to work properly, remove two of the cranes and set granularity to 100 (or 1, cranes move entire stacks anyway so they won't over-load)
I'm seeing how far I can get to on the research. ๐
Sorry, that's me not checking everything. ๐ฆ
If you could add a status message that explains the "decision" that it's making, that might be useful. I was just a bit confused when it seemed to be happy to send empty trains.
This save crashes:
https://drive.google.com/file/d/1eRuVr2UkFZMCWXcw2HQgt4Cb2ZpAr_-P/view?usp=sharing
Not much has changed from the version above, except that it has been running all night (without a problem). The thing that has triggered the crash seems to be that I unlocked all of the slots in the warehouse at the station, that had otherwise been preventing the train from emptying completely.
It might have been sitting there for a long time (days) until I unblocked it.
Load the game and wait about ten seconds and it will crash
I've just realised that it's a steam train and I swapped all of the others to be SE Space Trains. So that's probably the cause of the crash - it can't find its train class any more.
right, I could have sworn I fixed that though...
maybe I only fixed it for newly deleted classes and that one got messed up before the fix
but that was weeks ago
That's entirely possible.. I'm going through the base and trying to rationalise it!
yeah I have definitely fixed that, when you delete a class, every single train in that class has it's job cancelled and gets switched to manual
IIRC you had a similar problem to this one earlier, I fixed the issue but I couldn't easily fix trains from classes that had already been deleted prior to the fix
I remember that, too. I think it doesn't matter, as no-one else will hit the problem, going forward
the fix of just switching the train to manual before it crashes seems to still work
OK. I just deleted the train. That works, too.
ah cool, all good then
So I am having a weird issue with SSPP where trains that are sitting in a pick up station are randomly being set to manual and clogging up the network
This happens if you change something that relates to its current "task", e.g. edit the target station or change the delivery size of the class it's using (even temporarily).
Does that sound like something you're doing?
No I have not been changing the station at all, I wont even be on the same planet and suddently I stop receive shipments of items and I look back and the train is set to manual
trains get set to manual as a response to many different unexpected occurances. editing stations, changing schedules, or loading with unexpected cargo/fluids
as to prevent random items/fluids getting sent all over the place and creating further mess to clean up
Check the status message in the bottom right
of the train gui
it will tell you why the train was disabled
you should also get an alert with the same message when it happens
if it's happening in a pickup station, most likely you are loading the wrong item
make sure you are setting the filters on your inserters/loaders/etc correctly
multiple networks per surface is up!
ok time for an easy feature, the ability to turn off rounding amounts up to stack size
yay
thoughts on this layout for threshold information?
the first number is the count the station needs before it can send items to pull stations, and the second number is the count needed to send items to sink stations
you could already work these numbers out yourself if you knew the formulas, but this should hopefully de-mystify things a bit
I'll think about it for a few days. I still don't like the throughput thing. I work on the number of slots, because that's where they are all going. There are too many bottlenecks to be able to work with throughput as a useful factor in the way that I build my bases,
For me, working on throughput is a bit like trying to drive my car by calculating the amount of fuel it's burning per second. I tend to do a binary-search for values that sort-of get a number of slots that I want.
But maybe the way that I play the game is a bit weird?
if you are already playing fast and loose with numbers, and you don't care about buffering waaaay more items than you need to, then you won't benefit from specifying things in throughput
but I was already doing all of that maths for every one of my stations by hand without the mod, so that makes things much easier for the way I play
(and I still maintain that just specifying "30" for two red belts is pretty easy if you aren't planning out things exactly)
I want to ensure that each factory has the right proportion of items and never runs dry. So, if it use 2xThingA + 3xThingB + 1xThingC to make 7xResult, then I divide the incoming storage by some multiple of 6 and assign them in that proportion to the "slots" allocation.
There doesn't seem to be a shortage of supply, in this game. The shortages that I hit are in the production rates.
and in the transport (which is where SSPP really helps)
I think that is (IMO) somewhat unusual, but certainly a valid way to do things. I guess that I just find that I really wouldn't want to micromanage undersupply to that degree, and that "share of resources = consumption rate / total consumption rate" is pretty good heuristic for what each station gets
at most, I would want to maybe nudge one station up a bit temporarily (add a bunch of latency) while I fix supply
and would never leave things like that long term
a requestor, with rounding to stack size disabled vs enabled
I found that it was very hard to optimise the system like that. The machines all kept stalling unless I massively oversupplied things, at which point the warehouses kept overflowing. And, as I couldn't control how it chooses which station to supply next, I swapped to using the throughput and latency only as a means of trying to adjust the "slots", as that seemed to make SSPP supply "things" in a more deterministic way.
It's been a part of the "fun", though; trying to make SSPP do what I want, when it clearly doesn't want to ๐
I think that a wiki should be the next thing you do; showing the calculations and explaining how it chooses what to do, and when.
In the meantime, I'm going to see if I can get it to keep 1,000 trains busy 100% of the time, and see how much reserch that generates per minute. 100 trains easily creates about 10,000 research / minute.
fwiw you can pretty much sidestep the system entirely if that's really what you want to do
just set delivery time = stack size and set latency to zero
now throughput is just the slots value -1
(you can also set delivery time to 1, and then throughput will be items instead of slots)
the issue is that when you are setting slots directly you aren't actually distributing things better, all you are doing is making much larger buffers
which will just hide the issue of low supply temporarily
OK. I'll try that.
I understand that I'm not using SSPP properly by adjusting the slots, but I found that it worked more reliably that way, because larger buffers isn't actually a problem when there is, in effect, an infinite supply.
the stalling was a killer problem for me
one other point is that buffers also matter a lot more at stations that request or provide many item types, and you aren't using mods to increase stack sizes
very often my stations need every single slot available in the storage
just to meet the throughput requirements
I rarely have that as a problem. I'm not coping with lots of complex recipes
and it is actually storage space that is the station bottleneck
yeah, just trying to add more info on why the system works the way it does ๐
There are many ways to play. SSPP is coping very well with my base, and I think I'm pushing it quite hard, now
going back to this, what values should be shown for request thresholds?
in the screenshots it's showing the actual thresholds (station needs less than or equal to x items)
but it might be confusing since it's shown right next to the deficit
@storm adder any thoughts?
I don't have a view, at the moment. I think it is a bit confusing to have all of those numbers that appear to say different things about the same decision, which is why I said please give me a few days ๐
I'll have to catch up with the conversation
Alrighty, let's take a look.
- You're pushing stone and sourcing silver.
- The station chest needs to have 63 slots of storage available to hold the stone expected before a pickup. And 5 slots for silver. Makes sense, good for knowing how much storage to make.
- Currently you have.... 858 stone in the chest? I think? Or is that "surplus" meaning its 858 items above the delivery size of 1k, for 1858? Thats not very clear what's going on.
- thresholds are.... honestly its news to me that push entries have one threshold for when to send to pulls vs when to send to sinks. If that function was made more apparent, then the thresholds would make sense. The previous point about what exactly "surplus" means is relevant to this as well.
I generally really like being able to declare throughputs.
I find it pairs really nicely with the way i use calculators to determine how many buildings to make, and the input and output rates thereof.
This is mostly true of pull entries.
For all the rest of them, I just put in whatever. Idk if thats causing issues without me realizing it. Being able to specify a buffer target directly for these situations would be great.
"Deficit" implies "im short on items"
It implies a derived value; not a measure of current inventory, but rather of current inventory relative to a target amount.
Thus making "thresholds", a bit ambiguous;
- is it a threshold relevant to current inventory?
- or is it a threshold relevant to the deficit?
Surplus is indeed just the storage signal, unmodified. Logically, the station wants to provide all of those items to the network, even if there aren't enough for a delivery yet.
The different thresholds are there because without them, your push stations are going to always end up sending all of their items to your sink stations, unless your entire network has constant undersupply issues. Pull stations would always be satisfied, so items would always get pushed to sinks. Having them split means that most of your push items will end up at pull stations, which means sources won't have to produce as many items.
Yeah that's pretty much true. Throughput is also useful for push stations for the same reason though. I've said before, but for source stations, throughput and latency do literally nothing except reccomend a storage value. It doesn't have any effect on when deliveries will be made (only the number of items in storage matters for that).
Yeah that's exactly what deficit is. It's the maximum target (equivilant to storage needed), minus the current number of items. This is the number of items that the station would like to get from the network (even if it's not enough for a delivery yet).
And that's exactly why thresholds is ambiguous. I think it makes more sense to be "the number of items the station needs to drop to before a delivery is made"
but I suppose maaaybe it'd also be fine to specify as a deficit as well? that would probably be what people would assume, given that it's right next to the current deficit
I just want to make sure that however these values get shown, they reduce user confusion instead of add to it ๐
how about this layout?
since the lower threshold is always just delivery size, it doesn't really need to be shown
and now request stations can be changed to show both the threshold and current value as deficits
so it should be pretty obvious that, if the deficit (as shown) is lower than the threshold (as shown), then the station won't pull
next version is pretty much done, just waiting on some translation updates
@peak sluice if you wanted to beta test the less-than-stack-size deliveries

A lot of my concerns about word meaning can be addressed via tooltips, which it looks like are present

I prefer that. I might use "N/A" instead of "never", but maybe that's culture-specific?
I agree. If it explains that it is "never" because it does not apply to sink stations (or whatever the mode is), then that will be fine
Unfortunately, that one crashes. A save of my game is here:
https://drive.google.com/file/d/1HkA4NiHOQwlQ9dYVmKQ8sk1gqDovnzo4/view?usp=sharing
If you load it and wait about 5 seconds, you should get this error report:
oh, that's unexpected, I'll take a look
yeah I did consider that, but exactly as you thought I figured never would be easier to translate
ah, I see, yeah the mod has a dirty secret, I don't bother migrating open GUIs between versions
Ah! lol. It's always the edge conditions that kill you ๐
if you save while a gui is open (which is only possible with autosaves or using the special debug pause key combinations), then there is no guarentee things won't get weird
but you can just close the gui before it crashes and everything is fine
OK, thanks
the GUIs are so big and complicated that trying to migrate them would be an absolute nightmare
I should probably add some code to force close them after a version update though
Agreed. Don't bother doing that. I just seem to be good at finding ways to break stuff
that would work and also be reasonable
Could you add a setting for the fuel level at which the train tries to refuel/recharge?
I just had one train run out of fuel while it was on the way to the recharge station. It happened overnight, so I'm not sure of the cause, but I wonder if it's because I'm adding trains in batches? The batching might make them all run to the recharge point at roughly the same time, causing a long queue.
My layout can cope with long queues, but they seem to be running out of charge, while they're shuffling to the front. Perhaps they use a lot of charge to start & stop? I don't know how realistic the fuel consumption model is for SE Space trains.
It could just be because the way the mod decides on a threshold for when to refuel doesn't do a good job with non-standard trains
local maximum_delivery_time = 150.0 -- TODO: calculate properly
local energy_per_second = 5000000.0 / 3.0 -- TODO: calculate properly
-- TODO: could be less, this assumes constant burning
local energy_threshold = energy_per_second * maximum_delivery_time
for _, locos in pairs(train.locomotives) do
for _, loco in pairs(locos) do
---@cast loco LuaEntity
local burner = assert(loco.burner, "TODO: electric trains")
local energy = burner.remaining_burning_fuel
for _, item_with_count in pairs(burner.inventory.get_contents()) do
energy = energy + prototypes.item[item_with_count.name].fuel_value * item_with_count.count
end
if energy < energy_threshold then
list_create_or_append(network.fuel_haulers, class_name, hauler_id)
send_train_to_named_stop(train, e_train_colors.fuel, class.fueler_name)
assign_job_index(network, hauler, { type = "FUEL", hauler = hauler_id, start_tick = game.tick })
on_job_created(network_name)
hauler.status = { message = { "sspp-alert.getting-fuel" } }
on_status_changed(hauler_id)
return
end
end
end
there are a lot of TODOs, but the idea is that we should be able to work out pretty accurately how much fuel a train should need to be able to finish any job
those numbers work well with vanilla trains, but for modded trains the ratios are going to be different and I just haven't done the maths to handle them properly yet
I think this is slightly different. It seems that they get to the recharge area, but there's a queue of 20-30 in front of them and the shuffling start-stop burns through the remaining fuel. In the 70-odd that were queued up this morning, about 10 of them ran out while they were in the queue, which blocked everything.
I think it's still the same issue, the "constant burning" bit means that even if the trains are constantly start-stopping (least effecient fuel use) they should still have enough
but I suspect that those trains just consume more energy per second than vanilla trains
OK
so they get a lot closer to running out than they should
Looking at it, there is no steady state burn while stationary. There is a big hit when it accelerates
yeah stationary trains consume no fuel, and they consume less when coasting
This one is not going to make it to the front ๐
poor little bugger
right lets see if I can work out how to calculate the maximum energy consumption of a locomotive
IIRC I got the current constant number from the wiki
The batteries do claim that they are 50 MJ in my game.
yeah, but locomotives also have an energy consumption value, and then then their burners also have an effeciency value
and there are some other values
and that red line is about the amount it uses in one "restart"
I need a much bigger buffer of charged batteries in case this happens again, though. It's taken two hours to charge them all up again!
hahaha, did they all just happen to go flat at around the same time?
I think what happened is that the queue got blocked by one that went completely flat, and then all of the others couldn't reach the station. So, overnight, that amounts to about 150 trains
ah, yeah
Next time, I'm going to try to avoid a single feeder station. The problem is that batteries require a much more complex chain than coal.
right so the energy consumption of space trains is nearly 7 times that of vanilla trains
so it makes sense that they could have run out of fuel
They're much quicker; which is why I like them
fixed for the next version!
was a lot simpler than I thought it would be, should have done it sooner
new version is up
thanks
I'm trying to work out what the "Item inactivity" setting does.
My trains are typically waiting for about 10-15 seconds after they have loaded / unloaded, but that is too long, when it only takes about 3-5 seconds to load/unload the cargo.
I've tried changing the value, but it doesn't seem to make a difference.
I think it's because it doesn't decide where to send it until after the cargo has been loaded / unloaded.
Would it be possible to change it, so that the "go to depot" / "go to destination" is programmed while it is loading/unloading?
(There are over 1,000 stations, now. So we're getting into the extremes, and I understand if you don't care!)
I do have plans to do some benchmarking and up the number of trains that get updated at once
There is the "stations per tick" setting, make sure that is as high as it goes (and I did mean to increase the cap on it, but I forgot)
But currently no way to increase the update rate for active jobs
But yeah I need to do some profiling and optimisation so I can increase the update rate
I could technically have the trains head back to the depot immediately, but opted not to to try and spread the train pathfinding cost out
That may have been premature optimisation though
Plus the update rate needs to be faster for other reasons anyway
10-15 seconds seems crazy though
If stations per tick is set to 8, cycles should take 2-3 seconds at most, even with 1000+ stations
I don't remember what the current setting cap is but it's at least 8
I think that 15 seconds is roughly right, as I only have 2 stations per tick at the moment. I tried increasing it, but my UPS crashed to less than 40.
I'm working on cleaning obvious waste from the base before I try to analyse it any more but, while doing that, I was wondering if SSPP could improve things by "remembering" which stations will definitely need attention "soon" and poll the others less often. Something like that, anyway?
Polling stations is only needed to read signals and work out what deliveries need to be made, and you kind of need to do that always
There are likely a good number of optimisations that can be done once I set up some benchmarks though
So I do expect to be able to reduce the UPS hit significantly
OK. I need to finish cleaning this up, so I have something reasonably stable to analyse, or we'll be chasing shadows.
At the moment (FFR), the "delays" come from empty trains preventing the next one from arriving at the station, when there are multiple mats being delivered. So I'm thinking that we might try to make these trains "jump to the front" of the polling queue, perhaps by putting in a "go here when the cargo hits zero" condition.
the "here" is complex, though. Because it may be occupied by the time the cargo empties ๐
Trains are already updated in order of state like that
Making the whole thing run faster is just as important though
Any stage (dispatch, provide to request) can cause problems
Ah, OK. I hadn't checked that
The request done delay is just the most noticeable
Because you can see the train
But a train having a dispatch delay is just as bad
Hence why the issue is the update rate as a whole, not just the last step of a job
OK
After your cleanup, do send me a save. Would make for a pretty good benchmark.
Will do
I'm at 251 trains, 1010 stations (about 800 are SSPP, the others are depots).
To be clear the only reason the train doesn't have a "go to depot" entry added is because that's when the train checks if it should refuel
I could do that at the moment I get the event for conditions being met, but moved it to its own frame to prevent lag spikes
Would it be hard to log some kind of warning when the combinators are not receiving count signals for the thing that the provide/receive is trying to transfer?
Perhaps throttled to display it only every minute or so and have a separate command to list them?
Not really, no signal isn't an error state
It just means no items
It could be a command though
For requesters it especially wouldn't make sense, since it's common for a requester to run out of items
I have lots of stations set up with entries for items that aren't actually produced yet
Is there some kind of warning if there are requests that need to be done but no trains are available?
You can look at the network class page and check the available train count
No special warning but it really isn't needed
The problem that I have encountered a few times is that a continuous stream of items are requested, because I've failed to connect the general I/O to the storage. The storage is then swamped with whatever is in plentiful supply.
I can see that "no signal" is not an error state in the general case. But I think it might be worth knowing when SSPP thinks that it's just delivered huge amounts of something, but the general I/O is still gleefully claiming it's completely empty, and always has been for the whole time that the train was there?
Does the general I/O know if it's connected to anything at all?
I think that is very much a more trouble than it's worth type issue, I think in general it should be fairly obvious when a station isn't getting any signal at all
We definitely wouldn't want to try and track if the signal is going up an expected amount, that'd make polling more expensive (which would make the delay problem harder to fix)
And we could check if the io is c connected to anything at all, but it might still not be connected to the right thing
I could do up another one line command to print any that aren't plugged in though
OK
A command-line option in the wiki would be useful for me.
This "problem" has happened three or four times, now. I think it's because I'm editing layouts quite often, as I change my mind about the layouts.
something has gone horribly wrong with my mod. it keeps clearing the class name and resetting the network name as well for any train that picks up a delivery
now i have a bunch of trains full of materials that cant go to any station
and i just got a crash as well
Oh darn, that's not good, can you send a save?
yes
@sturdy halo any update? I'd like to get the issue fixed ASAP but I do need to sleep ๐
i messaged u
oh my bad, thanks
I suspect this may be a compatibility issue with https://mods.factorio.com/mod/OverloadedTrains
That mod effectively destroys and recreates trains whenever they finish at a station, which would cause SSPP to forget about them
understood thank u!
I'll try and see if I can add compatibility with it, but until I get a chance to do that I think just disabling that mod should fix the issue
i was considering removing it anyway as it had other issues
It's a cool concept, sadly the game doesn't have a good way to let mods modify train speed like that
theres like. two different versions of this mod
this is technically the more up to date version of this mod, but the other mod author didnt make the updates this guy did bc he cited mod compatibility issues
but i was looking at all that yesterday and forgot about it
I will have a look at compatibility when I get a chance. SSPP does work with other mods that need to destroy and recreate train parts, I'll just have to examine exactly how this one works to see what I need to do to work around it.

dont be in a rush the mod doesnt exactly work correctly anyway. it doesnt seem to actually cause any significant speed difference in trains running on automatic, which is why i downloaded it
Just one other thing I noticed with your mod list, I noticed you have Automatic Train Painter installed. SSPP also paints trains (with different rules), so you will probably want to turn off that SSPP mod setting, or disable automatic train painter.
oh word, thank u
Here (822.zip) is a save that, although it's not balanced yet, it is a bit "cleaner". I think that the imbalance might even be an advantage when benchmarking, as the spiking from resource-starvation is quite noticeable and gives you some slack to try to reduce. In this version. the debug window shows SSPP varying between 0.0800 and 1.500 per update when I run it with v0.4.8.
(I have a houseful of people this week, so probably won't be around for a few days..)
excellent, this will be extremely useful
some initial benchmark numbers
โ Key โ Total โ Average โ Maximum โ Count โ
โ โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโจ
โ POLL โ 230.55422ms โ 0.03956ms โ 0.45693ms โ 5828 โ
โ PRE_REQUEST_DONE โ 0.49432ms โ 0.04494ms โ 0.05262ms โ 11 โ
โ REQUEST_DONE โ 81.32786ms โ 0.25495ms โ 4.19836ms โ 319 โ
โ PRE_LIQUIDATE โ 0.05686ms โ 0.00517ms โ 0.00576ms โ 11 โ
โ PRE_PROVIDE_DONE โ 0.29739ms โ 0.02704ms โ 0.04087ms โ 11 โ
โ PROVIDE_DONE โ 455.52469ms โ 1.41029ms โ 6.18424ms โ 323 โ
โ PRE_DISPATCH โ 1.10775ms โ 0.10070ms โ 0.10859ms โ 11 โ
โ DISPATCH โ 480.64045ms โ 0.72495ms โ 8.80316ms โ 663 โ
โ PRE_BUFFER โ 0.04539ms โ 0.00413ms โ 0.00445ms โ 11 โ
โ PRE_POLL โ 5.59665ms โ 0.50879ms โ 0.53696ms โ 11 โ
โโโโโโโโโโโโโโโโโโโโโโโโทโโโโโโโโโโโโโโโโโทโโโโโโโโโโโโโโทโโโโโโโโโโโโโโทโโโโโโโโโโโ```
this is with stations per tick set to the default of 2
polling doesn't seem to actually be all that expensive, which matches what I'm seeing in game - I'm not seeing a significant ups drop when going from stations per tick = 2 to stations per tick = 8
and with the (innaccurate) fmtk profiler, I'm seeing that >80% of request_done/provide_done/dispatch is just assigning a new schedule to a train (pathfinding), which isn't something I can do much about
I suppose I should also make clear that the in game update time shown for SSPP is going to be a lot higher for SSPP than for other logistics train mods, even if SSPP isn't actually more expensive
this is because the train pathfinding costs for provider -> requester and requester -> depot are going to be included in SSPPs totals
other logistics train mods, or even just vanilla trains, still have to do this pathfinding, but for them that will just be counted as being done by the base game (even though they have the same effect on UPS)
โ Key โ Total โ Average โ Maximum โ Count โ
โ โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโจ
โ POLL โ 1102.93549ms โ 0.20612ms โ 0.75575ms โ 5351 โ
โ PRE_REQUEST_DONE โ 1.78051ms โ 0.01664ms โ 0.03668ms โ 107 โ
โ REQUEST_DONE โ 95.85178ms โ 0.23153ms โ 2.16258ms โ 414 โ
โ PRE_LIQUIDATE โ 0.43546ms โ 0.00407ms โ 0.00511ms โ 107 โ
โ PRE_PROVIDE_DONE โ 0.96895ms โ 0.00906ms โ 0.01542ms โ 107 โ
โ PROVIDE_DONE โ 716.93936ms โ 1.77022ms โ 7.90224ms โ 405 โ
โ PRE_DISPATCH โ 8.60059ms โ 0.08038ms โ 0.08886ms โ 107 โ
โ DISPATCH โ 600.73761ms โ 1.54829ms โ 9.29898ms โ 388 โ
โ PRE_BUFFER โ 0.36401ms โ 0.00340ms โ 0.00417ms โ 107 โ
โ PRE_POLL โ 48.81423ms โ 0.45621ms โ 0.51763ms โ 107 โ
โโโโโโโโโโโโโโโโโโโโโโโโทโโโโโโโโโโโโโโโโโทโโโโโโโโโโโโโโทโโโโโโโโโโโโโโทโโโโโโโโโโโ```
after the shortages have been sorted out (so that dispatch always has a train to send), and with `stations per tick = 20`
poll is still quite reasonable, provide_done and dispatch are still the only particularly slow parts, but again that is mostly due to train pathfinding
I suspect that the best way to improve UPS in your base would be to simplify your intersections
I should address my intersection design....
I believe the version on right should be a decent amount friendlier for the pathfinding algorithm, and also wouldn't cause congestion as often
It also includes a roundabout, which I've seen lots of ridicule of by people more into the trains side of the game than I am.
roundabouts are indeed a bit worse for congestion than proper 4 way intersections, but they are compact
also the original version has a roundabout as well
I think UPS wise roundabouts should be pretty similar to 4 ways though
I'm not a megabase train pathfinder ups expert anyway, so take my suggestions with a grain of salt
train has gone to a station pushing stone.
it then sits there and waits, for some reason,
despite there being stations requesting stone that have negative amounts.
shouldnt those stations with negative amounts be recieving the stone?
i must be missing something.
[-1399, 1257] is the coordinates where the train is sitting full of stone, in case that info is relevant.
seems to also be occuring at this carbon dioxide station?
tho, looks like there's something funky happening at that -51039 station... lemme check that out

there was a train waiting at that station to unload chlorine, which was full cos i forgot to connect the tanks to the general_I/O
which meant that the train behind it couldnt unload it's stone.
and that train waiting with stone meant that the system never moved onto other trains in the "que"?
Uh
Unless the stone requster itself was stuck, then the stone train at the provider should have been sent
I'd need a save to be able to investigate further
Is it possible the stone requester was just at its train limit?
yes, the stone requester that was also requesting CO2 was in fact at it's train limit
solving that clog, and freeing up the station to continue operating, seems to have solved the system wide problem of not shipping stone... it seems...
which, i wouldnt have expected such a clog at one station to also prevent other stone stations, even stone sinks, to stop being able to recieve stuff...
odd.
no, the stone sink station was very much not at it's limit
i unfortunately didnt keep a save of when the problem was happening
i could probly just disconnect the chlorine tanks and wait for it to happen again?
sounds like something I should look into anyway
I think it sounds like it should be fairly easy for me to reproduce
Wait no
No this is working correctly
Pull stations out prioritise sink stations, even when they are at train limit
i'm attempting to recreate the situation now.
Being at train limit is not the same as having requests satisfied
if a train is waiting while full at a stone provider, and it's wating for that one clogged stone drop station, it cant alter it's drop target while sitting and waiting for a space to open, right?
It can alter its target, but its target will always be a the highest priority requester with demand
Then that requester says "I'm at my train limit, please wait a few seconds"
hmmmm
Rather than having the train go and dump its cargo at a sink and cause the pull station to miss out
that makes sense.

im losing my mind.
i feel like i've been staring at this problem for hours.
oh
ofc i see the glaring issue after sending the save

hahaha, what was the problem/cause
i set the delivery size to 2x what the cargo wagon can hold
so it was waiting until it has 2k
when it is only ever gonna get 1k
Oh, that does remind me that I should add a sanity check for that
alternatively, being able to just say "1 train full" as delivery size, would be 10/10
Technically classes can have trains with different capacities
though I guess then one train full would just be whatever the minimum is
[wagons * slots per wagon * stack size of item] ?
cos the train class knows how many total slots the train is gonna have, right?
it mainly gets complicated because you can set up your items before ever adding any trains to a class, or even adding a class at all
ah, ye, idk if the implementation gets fuzzy there.
a sanity check message would also save me from being dumb (mostly)
not insurmountable but a lot of special cases to add to a file that is already nearly 2000 lines long
mainly both the network and station gui need a way to show warnings that aren't just hard errors
Maybe the little warning icon that currently shows when a row is invalid could have a red (error) and a yellow (warning) variant, then you'd hover over that to see warnings
https://github.com/jagoly/SourceSinkPushPull/wiki/Commands easiest page done
yeah, it's showing the deficit (which is a negative number), but that station has more items than it's target (because some got put in manually, or you changed some settings after the fact)
so the deficit is -700
it's got an extra "-" tho
yes, because the deficit is -700
if I replaced the -- with a + then it would look like that station was providing that item
which it is not
ah
its weird but I'm not sure there is a non-weird way to show that
anyways, the station that is providing quartz ore has the "train sits around waiting full of cargo" issue
what is delivery size? less than 475?
it looks like you changed some settings when there were already jobs in progress, which can cause things to get weird for a bit
1k, should be 1 train full (1-1 trains)
might be residue from old settings. i'll just toggle manual-auto to send it to liquidation state
lol that's what I was typing
I try my best to update things when settings get changed, but there isn't always an obvious thing to do
Is there a known issue with using SSPP stuff in editor mode (to build BPs)
not that I know of, 95% of my time has been in the editor
are you having some problem in particular?
I got a surface issue, but when I try again I get this:
`The mod SSPP Logistics Train Mod (0.4.8) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event SourceSinkPushPull::on_built_entity (ID 6)
LuaItemStack API call when LuaItemStack was invalid for read.
stack traceback:
[C]: in function '__index'
SourceSinkPushPull/scripts/main.lua:43: in function <SourceSinkPushPull/scripts/main.lua:14>`
"unsupported surface" is the tootlip popup
aaah, you mean blueprint sandbox
and if I try to placce ffrom the map editor entity menu I get that aforementioned lua crash
At risk of being flamed - is there a good BP book for SSPP rails ๐
perfectly reasonable to ask, but no, I've not made one yet
I'm not normally railbrained but on this pY run I should really be haha
generally the actual stations in SSPP are very simple, the first screenshot on https://mods.factorio.com/mod/SourceSinkPushPull shows pretty much the entire station setup
Yeah I have a rail BP that's set up for cybersyn, what I was trying to do was basically convert to sspp in the bp editor
for now at least there are likely some issues with blueprint sandbox specifically
unlike cybersyn, some of the configuration for SSPP is done at the the level of the network
each surface has a default network, but blueprint sandboxes use a special surface which doesn't really make sense to have a normal network
fair
I did very quickly test blueprint sandboxes when I added the custom network feature a couple weeks ago, but it seems there are still more issues to sort out. I don't personally use them, I just have a second editor save I use for designing/testing.
I guess I'll just remove out the cybersyn stuff from all the BPs in the bp ui and just deal with manual placing for now
Oh right, I just made SSPP entities unplacable for non-standard surfaces
I'm not sure how you managed to get it to crash though
need to add proper support anyway
what are those things the pumps up the top are connected to?
It's this mod
Oh that's awesome
Yeah it's really cool
Makes for awesome looking stuff like this
Overlap looks a bit weird but you don't notice it much
Any ideas why are trains waiting at load stations like this?
They are filled with items that they came for and the amout is correct
The station isn't showing any more items that need to be loaded
Via the entity placer
if the status is "waiting for request", is the highest priority station requesting that item at it's train limit?
What mod exactly are you using? https://mods.factorio.com/mod/blueprint-sandboxes or something else?
Found that the target station was full, thanks
The Raiguard one: "Editor Extensions" https://mods.factorio.com/mod/EditorExtensions
@grand warren the lab surface from Editor Extenstions is now supported, let me know how it goes!
sweet!
Hi.
Thanks for the suggestion to simplify the intersections. I did originally use a style like that, but I found that sending the trains all the way around the roundabout to turn "against" the natural direction, e.g. heading south and turning east, seemed to be making them to slow down a lot and cause congestion.
So I added direct routes for those choices and that's the reason why my intersections are so complex. I wasn't considering the pathfinding issue.
Your current intersections don't solve that issue at all because they have no signals breaking apart the loop
The entire thing is one block so any train using the intersection in any way blocks all other trains
I don't actually know for certain if my design would improve UPS noticably anyway so it's probably not worth rebuilding everything
Most likely its just the sheer number of intersections and alternate routes making the A* algorithm suffer
silly q - is there any examples of multi-provided fluid stops?
I guess you do just one pump and the set filter does it
but how-2-plumb it so nothing gtets stuck in a pipe?
I do multiple fluids per pipe
I have stations with 5+ fluids all stored in tanks far from the station with a single sushi pipe connecting to pumps at the station
The trick is setting granularity correctly, it needs to be a large enough value so that nothing gets stuck in the pipe
I also have another mod that helps with this, basically a super pump that is able to empty pipes at a consistent speed https://mods.factorio.com/mod/PerfectPump
You can do multi fluid providers without that mod but finding granularity is trial and error
Yes, but doing it this way seems to make the router choose to go around the square - avoiding the intersection completely. So the routes that the trains take across the whole grid are spread out a bit more; instead of everything trying to squeeze through the shortest route every time.
It may seem to be counter-intuitive at first, but it did seem to reduce the bottlenecks that I had with simple roundabouts.
BTW, each intersection is two blocks - the centre is a different one. It's for historical reasons when I was getting queues at the refuelling station, before I bit the bullet and rebuilt that to cope with the demand. ๐
I'll have a think about it for the next layout I build. I hadn't considered the effect on the UPS of the path-finding.
Ah, interesting. I think if you really wanted to optimise that, you might even want to do intersections that only allow trains to continue straight or turn right (no left or u turns). This way trains will only flow in one direction so there should be very little congestion ever.
That's a very interesting idea
I know a lot of megabasers swear by intersections like that
Is there any way of sending trains back to depos automatically? I want to upgrade them
Just seeing if there is a quicker way than chasing them around the map
not currently no
just had a train run out of fuel for the first time.
was after building a far out SSPP station.
but given that the refueling stations are Vanilla stations, my best bet here is to add another refueling station such that any train can take their pick of closer ones?
For now yeah
Trains SHOULD be taking the maximum delivery time into account when deciding refuel thresholds, but they currently don't (they just use a fixed time of 150 seconds). So if your base is really big they may run out.
How fast is your perfect pump? Is it faster than three normal ones (3600/s)?
it's twice the speed of a regular pump (whatever that may be, in vanilla that's 1200/s, in py it's 12000/s)
but the main reason it is faster is because it doesn't slow down if the input isn't full
regular pumps get REALLY slow when they are trying to suck up the last bit of fluid
OK, thanks. Pressure isn't an issue for me. I'm just being greedy to get the trains going quickly.
Good to know.
Ill just slap down a few around so that they can have a choice to pick one that is close.
Would it be possible to add to this screen the number of items/s each station is requesting?
And a total amount somewhere vs the total amount of ones that are supplying the network with the item
Another thing, is it possible to do multiple items delivery in a same order?
As in, can a train go to multiplie pickup stations for different items and then go to a single unload station
I dont believe that is supported under SSPP functionality.
Each trip made by a train that is dispatched by the SSPP system only handles 1 item/fluid.
You could probly mix in some vanilla stations/trains for this sort of use case? Idk how extensive you're wanting the "sushi train" function to be.
I thought about doing a 4 wagon train where each one has a different item, goes to 4 available stations for each and then unloads all 4 at the destination
I probably could do it with circuits but eh
That sounds like a use case best handled by having dedicated vanilla trains take the static route.
You'll likely need to have any given combo of 4 items have a dedicated train.
Unless you're incredibly good with combinators and comfortable setting up a very complicated combinator system to handle dispatch of trains to allow for the list of 4 items to be dynamic.....
But either way, thats beyond the scope of what SSPP is built to handle
I believe... ive been wrong before. Jagoly might drop in with more insight.
yeah pretty much, in general multiple pickup stops aren't really worth doing
if you have specific cases where you want them, best to just do vanilla train routes
Im identifying some behavior where my trains seem to not be taking routes, despite stations requesting plates with others having plates available.
I shall investigate further today.
Likely user error again.
Im also gonna need to tinker with that perfect pump mod.....
Cos im recognizing that upgrading to pYs mk02 trains (and their wagons) is gonna scuff ALL of my stations. They'll all need to be redesigned.
I think a lot of py players just skip the mk2 and mk4 wagons
And just upgrade the locomotives
but my brain is broken, and it wont stand for the mixed tiers and/or forgoing potential upgrades.
plus, i should learn how to implement the perfect pump mod stuff anyways
for sushi fluid providers
Even with that sushi fluid loaders is really hard to do for multiple wagons
Because you don't know how much fluid each wagon has loaded
you would if the delivery size was to have all wagons full, right?
The issue is loading them evenly and not having stuck fluid
Two pumps connected to the same pipe won't pump at predictable speeds
when implementing the perfect pump situation,
the mod pumps go.... from shared-pipe into wagon?
or do they go from the holding tanks to the shared-pipe?
Shared pipe into wagon
Their job is to keep that pipe nearly empty
So it only takes 2 ticks to empty completely once the pump going into the shared pipe switches off
and those pumps from tank -> shared, they need to disable once the remaining to-be-loaded is low?
If granularity is set, then when it's zero
and granularity is... the finicky bit
cos it's gonna be dependent on the total capacity of the shared pipe
?
hmm.
seems the perfect pumps wont even engage with the mk02 wagons
(train in pic is in automatic mode, waiting for water to be loaded)
Oh hmm
in the pY discord, someone mentioned the mk02 fluid wagons are a bit finicky when it comes to pumps engaging
even more so than usual
I'm pretty sure I tested those...
Yeah I know they are weird
Does it work with the front wagon
doesnt seem to be any location on the wagons where i can place the PP's and have them engage
Weird, I'll have to have a look when I get the chance
They don't solve the main issue with multiple wagons anyway
i'm still gonna poke around until i feel i have a better understanding of what that problem is to begin with.
thanks for the help!
Anyone any ideas on how to multi-provide w/ loaders?
Do you understand how to do multi provide with inserters?
You can think of loaders like inserters with a hand size of whatever fits on the belts between the storage and the wagon
So if you have two loaders with no belts in between, I believe they have a capacity of 8 items total (or maybe 16, I don't remember)
So if you have 6 loader pairs, then you set granularity to 6 * 8 = 48
Ohhh
I was thinking in per/s so tried multiples of 15
but you're right, it's 8 * n loader pairs
hm, 8 * 2 for 2 loader pairs left 12 on the belts
They might hold more than 8
You should be able to see just by hovering over them with the mouse
You have set filters enabled for the loaders connected to the storage?
ofc
Oh, you need to enable the inactivity condition
In the top right of the station gui
Because otherwise the train will leave before the loaders are empty
Need to add a loaders guide to the wiki
or if it's possible to detect loaders a little warning
clicking the button changes tooltip completely and i had hovered over that button wondering if it was the right thing to do but ye
18 as a granularity seems to work ๐คทโโ๏ธ
All granularity does is subtract from the load target (including the output of the provide io)
So it makes the filter clear a bit earlier
Hi
I mistakenly increased my copper ore trains to have a delivery size of 2500, when they can only take 2000. So everything stalled, which was expected. When I reduced the delivery size to 2000, they haven't reacted to the change, and I need to restart them (swap to manual and back to automatic again).
Is this expected? I was a bit surprised.
A save of the game is available here: https://drive.google.com/file/d/1G_7oGm99Eht3t7VQmFbcQ1_G5B61hY5J/view?usp=sharing
Haven't looked at the save but that is how it works yeah. It intentionally doesn't update things if they are in a state where it is likely that updating things would cause something to break
For example, changing the target on a delivery that has already started loading would be very likely to cause items to get stuck in inserter hands
Of course in this case items are already stuck in the hands, but the mod has to assume that the 2500 number was intentional and correct
OK, that makes sense. Thanks
Are you still intending to do this? I'm starting to wish it could handle more than ten requests per station, too.
I would like to, but right now the workaround is so ugly and complicated that I really don't want to incorperate it, so I'm waiting and hoping the base game just fixes the issues that make it impossible to do cleanly
OK, thanks
Can SSPP work with "nuclear fuel" for the locos?
Should work with any fuel
OK. The reason I'm asking is that nuclear has a stack size of 1, so I wondered if SSPP would be confused by that?
i.e. you can only fit three in a loco, though they take a while to empty
The refuel thresholds work on mj, and know the amount left in the burner
So it shouldn't care about the stack sizes
I loved the way that adding multiple trains at once used to be easy with the button to automatically choose the class. Could you add that back, where there is a button that selects the "last used class"? Alternatively (or even at the same time), can you make the window moveable, so I don't have to move from one side of the screen to the other every time?
I can't seem to get different classes to work. Is there some kind of restriction on class names? I have a demand, a supply and availability of trains, but nothing seems to be happening. Here are some screenshots ...
A save of the game is here: https://drive.google.com/file/d/1fSc5yYZMYrtQ6E-A7idzcyVJ_Xh3HO0C/view?usp=drive_link
The screenshots relate to shipping red science, which is one of the two things that are assigned to nuclear fuel.
Weirdly, after I did all the above, it's just started working. It's been sitting there for hours doing nothing. Could saving the game have kicked it into life?
@drifting salmon any chance you can look at this issue? https://mods.factorio.com/mod/SourceSinkPushPull/discussion/68479d8b0165ae04dab28932
263.085 Error MainLoop.cpp:1510: Exception at tick 26641884: The mod SSPP Logistics Train Mod (0.4.9) caused a non-recoverable error.
Potentially, definitely sounds like something was broken though. Would be hard for me to test though if saving fixes the issue...
I did miss that, sorry. But it does look like I would need a save file to actually test though.
Apologies for being absent for the last month. A lot of IRL stuff has changed for me, and I've started another (non factorio) project and am the kind of person to hyperfocus on one thing for a month at a time. I'll set aside a day to do a round of bug fixing ASAP though.
It's fine now. Put it in the "switch it off and on again" box.
Wanted to chime in on this since I'm working on this kind of station in Py right now, and I think I've got a reasonable understanding of how to do it pretty reliably with the current behavior.
- The inactivity setting is essential. Would you be against making this the default behavior if a station has any fluids enabled?
- Loading pumps can't have a filter on them, or anything left in the pipe won't load during the inactivity as the filter is set.
- Set the delivery size significantly lower. My initial thinking on this is something like the capacity of the pumps plus the capacity of the pipes, but in testing you can get a little closer to the true capacity without getting stuck.
I'd be interesting in taking a crack at the sequential loading suggestion you made, I'm a decent programmer but haven't modded Factorio before. Can you point me to the code that has the unloader behavior and a resource on setting up Factorio modding?
The loading for pumps is made more complicated by the fact that pumps run at variable speed based on input fullness
So the correct delivery size (or alternatively, granularity setting, which subtracts from the delivery size without risking loading too much fluid for the requester to unload) varies based on the specific station and the number of tanks, pipes, etc
Its been a while since I thought about the sequential loading proposal, but when I'm at my computer I'll have a look at what would likely need to be done ๐
Yeah makes sense. Granularity is just a bit tough to get to cooperate. Its current calculation is floor(granularity/capacity)*granularity, right? Means you have to do pretty finnicky multiple math, vs just lowering the capacity to a safe threshold.
Yeah the issue is that the safe threshold is different for every station
Yeah I guess it would have to set the capacity to the minimum of every station's safe value. Granularity sets per station, which is definitely better, but overall harder to tune imo
I'm pretty sure granularity is just a plain subtraction
It used be more complicated but I simplified it
Either way works anyway ๐
Yeah looks like you're exactly correct, I'll try tuning it that way again since before I assumed it was the mathy way to do it and was trying weird non-multiple numbers
https://github.com/jagoly/SourceSinkPushPull/blob/24f7d517dbccaf69f0eb433201631bb1a37c5fc8/SourceSinkPushPull/scripts/main/hauler.lua#L151
Opinionated Logistics Train Mod for Factorio. Contribute to jagoly/SourceSinkPushPull development by creating an account on GitHub.
So looking at that issue write up I did again, a few things in are a bit out of date now. I think that if such a feature is to be added, it would only add one new toggle to providers, "sequential load". Granularity and the inactivity condition would continue to work the same way, the only difference would be splitting the loading up into different phases as described.
a few things would need to be done:
- add some logic to check if the station has sequential loading enabled, and the train has multiple wagons, to https://github.com/jagoly/SourceSinkPushPull/blob/main/SourceSinkPushPull/scripts/main/hauler.lua#L236
- if it has, instead of transitioning the job/hauler to "waiting for request", call https://github.com/jagoly/SourceSinkPushPull/blob/main/SourceSinkPushPull/scripts/main/hauler.lua#L131 again
- NetworkJob.Pickup and NetworkJob.Combined would need a new field to keep track of wagon index
- if the station has sequential loading enabled, on_arrived_at_provide_station would make either the general or provide comb (not sure which would be best) output a new "sspp-wagon-index" signal
- that function would also need to be made to add the starting item count to the schedule and combinator conditions
I think that's all that would need to be done for the actual logistics code, then the rest of the work is just coming up with an icon for the GUI and a good tooltip
oh and it'd be best to update the expanded job view to also show the current wagon index somehow when appropriate (maybe have minimap focus on the currently loading wagon instead of the main locomotive)

my train network has stopped working in a way i cant seem to figure out.
trains will go to pickup items, either pushed or sourced, and then the train will just sit there at the pickup station.....
the bottom right says "waiting for request", but there are existing requests, both pulls and sinks, for the items the trains have already loaded?
any ideas on why this behavior might be happening?
things were operating normally until fairly recently
(the coordinates on the train schedules i pictured are the coordinates for the stations at which theyre sitting and supposedly "waiting for request")
hmmmm. the issue seems to have solved itself?
only thing i did inbetween was to temporarily babysit swapping my stone sink station to be a pull for stone instead.

If you have a save from when they were all locked up I could have a look
Nothing comes to mind just from your description
here's a save where a train is doing the weird behavior.
i didnt notice any others doing the same.
the item in question, which the train is full of, only has 2 stations that deal with it; one source and one pull.
Hi. Chiming in again after a while.
Do any video tutorials exists for this mod ?
Last I asked the playthrough that was to be used as example wasn't progressed far enough.
Still no, sorry. Been busy with other stuff lately so the mod has been a bit neglected. Me and others are still happy to help if you have any specific questions.
I'm (relatively) experienced using the mod. feel free to ping me with any questions and i'll try to answer.
so, the mod is dead? 4 months, still waiting for bug fixes 
No but don't hold your breath. I've only got so much motivation and energy to work on stuff and my other project (a full game) is taking all of my brainpower.

