#Source-Sink-Push-Pull
1 messages · Page 1 of 1 (latest)
It is. And I was recommended in mod-dev-discussion to put it here 😅
I'm going to make a video for it at some point and stick that in showcase. This thread is just for people that want something more convenient than the discussion tab on the mod portal.
video would be nice, as I am lazy to read after all day of programming in work, haha
@drifting salmon do you have this BP book called (TODO) or have the video made yet for tutorial cause i cannot get this thing working
sadly no
I have a blueprint book I use, but it uses pyanodon's things, I still need to make a comprehensive vanilla one
can you tell me what im doing wrong?
Sure, what have you done so far?
that all looks good, other than 200s latency is a lot, that's usually more like 30s
ive even tried 15
it definitely shouldn't crash, if it does that's a bug
ok ive changed them to 40 latency
that shouldn't affect things not working at all anyway, all latency does is makes stations try to keep bigger buffers
so, you have a train set to that class that says ready for dispatch?
i did before the crash and it rolled me back now wont say it again
they both say nil
oh literally the word nil?
huh that's not good
so what happens when you set them to automatic?
if i set it to auto then try to change a name it crashes which is what hindered me
if i clear the name it goes away
oh, did you try to press the icon button on the text field while set to auto?
oh its working
there is a bug in the modding api where that button doesn't get disabled when a text field does, you aren't meant to be able to edit the class unless the train is set to manual
that is probably the fueler
as in its trying to get fuel, but you didn't build anywhere to get fuel from
if you don't want to build dedicated fuel stops, you can set the fueler to be the same as the depot
nice!
Pleasure is all mine, let me know if you have any other issues
will do
Also, just a heads up, that 40s for delivery time seems very very low
that should be the maximum total time it takes to go from any depot, to any requester, then to any provider
so unless you have a very tiny train network and very fast trains, that should probably be bigger
if you set it too low then SSPP might not send enough trains and your requesters might run out, and the only downside to setting it too high is that you need bigger buffers at stations
ok
@drifting salmon jsut updated the mod and got this
had to roll back 2 updates for it to work
dang, you too
would you be able to send me the save that is causing that? the save I'm using to test migrations doesn't get that issue
fix one bug, introduce another one, the endless cycle
@unkempt pike
so that save dies when you try to update SSPP?
yes
cool, thanks, I'll get to work, it shouldn't be too hard to fix
(unless you have like 300 other mods installed like some of the other saves I've had to debug...)
hahaha, yeah, that one was rough, took like 2 minutes to load and ran at about 10fps with the debugger
hahahaha
my biggest save was 1800 hours
what run was that?
what're playing rn btw, looks like some kind of seablock type thing
nice, for some reason I put off getting factorio for a long time
despite being a veteren of the minecraft mods that inspired it (and later gregtech)
yeah im big into enigmatica expert packs
talk about a headache
im not a huge fan of space x or space age
yeah space age was just ok for me
I was enjoying it but mostly that was because I was doing multiplayer with a friend
it just gave me the itch to have another crack at py
oh you're using electric trains too
have you hit this issue yet https://github.com/jagoly/SourceSinkPushPull/blob/main/SourceSinkPushPull/scripts/lib.lua#L581
no i just have it there for lols
i dont think ive ever actually used them but would like to at some point
hahaha, well right now they will probably kill sspp (I assume, I haven't looked into how electric trains are implemented yet)
gotcha
won't be a complicated fix anyway
so if im using sspp does vanilla method just stop working
vanilla method?
if you don't set the class, the train should just be ignored
yeah no vanilla trains are very much intended to keep working alongside sspp
for example if you have specific, extremely high traffic train routes with special trains and schedules
oh hang on, you're getting a migration issue from the PREVIOUS major version
that's weird, were you not updating regularly? (fine if you weren't, just nobody else reported issues when I published that version)
no you the 0.2.3 version
i just open the game and hit update then restart
yeah this is weird, I'm not sure why this function is even being called
i had to roll back to that version to play
i even tried 3.0
right so it looks like sspp's state got messed up before the update, the update itself was ok
running /sspp-reboot on version 0.2.3, saving, and then updating will fix the issue
I think I know what caused it to break, basically there were some entity references that weren't getting removed properly, that was fixed in 0.2.1 or 0.2.2 but on your save the old references were still around from before that fix
tldr it shouldn't happen again
I published a new version that will automatically reboot if it detects invalid or inconsistent state after doing updates, so you should be able to just update now and not have any issues
Wow, there was a discord thread
hellooo
are you deweykai?
if so, I did not respond here fast, oops
I should probably stop trying to code for the night
got bit by a confused doggo this morning and took some serious painkillers a bit ago
if you are deweykai sorry if my gh posts were a bit disjointed
yep I am
y u got so many internet names
because I've had this one since I was like 4 lmao
I changed the auto btn algorithm, I think it works pretty well now and doesn't generate classes.
Instead it just checks the class of other haulers with the same layout. If there is just one shared class, uses that
pretty much the behavior you wanted, fixes layout issues, and not class generation. I'm pretty satisfied with it
but yeah definitely best to discuss things here before you spend too much time working on things, I hate having to reject PRs or make you redo work
that sounds good, an auto button is both way better and way less complicated than a popup window with a list of classes like I was going to do
well, sometimes it is nice to try something just to see if it is feasible.
I'll have a look at the code and merge it tomorrow, would like to do it now but doggo bite
oh yeah, if I add you to the authors, which of your many names do you want me to use
deweykai is good
k will do
you done much factorio modding before? you seem to already know your way around lua
I've done prototype stage stuff before, but this is the first time I've been in runtime. Lua is pretty easy to get used to
yeah lua is nice if not a little weird
very simple, sometimes too simple
the "foo and bar or baz" thing still makes me die a little bit inside, knowing that the check for bar will be added to the bytecode
I spent way too much time microoptimising cybersyn lol
ok I sleep, g'night
night
hmm looks like I should move my personal vscode config to a gist or something
wasn't expecting other people to be working with the code so soon haha
I'm going to look into updating depot names in schedules when they change
did you see my pr for your pr? if that looks good to you you can merge it and then I can merge your pr
I'm trying to work out how the grid view should work for stations
I think that just having it show trains for every item by default is probably the best option
you mean on the station gui?
yeah
if the minimaps show the item on them (like in the network) then you probably won't need to be able to filter them
I think something like the train overview (o) for the station, but with train also going to providers would be good.
oh good point, requesters should be able to show trains on the way to providers as well
I don't think I've looked at the train overview since 2.0, it's much nicer than I remember
though that might be confusing since that would show more than the just the ones that would end up at that specific station
hmm the station gui could also be event based rather than polled like the network
so that it updates instantly
polling is probably fine though
there should be a list somewhere of where deliveries need to be sent. Could you track trains that will at some point end up at the station?
sspp doesn't work that way, it only looks ahead to the next station
so trains don't know where they are providing to until they finish picking up items
yep
when they are first dispatched, they only know that there is a requester somewhere
I think not showing providers is probably fine, showing the trains at the station other than looking nice is mostly going to be actually useful for if they are no path or something
or they are deadlocked
What about instead of a grid, you use like a manifest of trains. It would be a list of trains that are currently processing the order. When a train is providing, it just says something like "Provide in progress", and trains coming from providers can be more specific. It doesn't give specific information about deliveries, but still gives information about what is currently happening
that sounds like the same info just not in a grid
we can put as much extra info as we want on the minimaps and in their tooltips
or if there was more info we could have a little box next to them, though I don't know how much useful info there actually is we could show
with a grid you need a specific train for the display. With a list you can just say waiting for a train, whether the train actualy exists or not. The information that the station has requested a train still shows
wouldn't that make more sense to add to the items table? in the statistics (bad name, can't think of a better one) column
I guess it is the same information as the items table for the demand thing. It is just grouped by station instead of item.
yeah my plan was literally to just copy those exactly, but replace the station name (top label) with the item icon
it would be nice if opening the network from the station gui went to the items tab instead of classes
yeah I've wanted to change that for a while haha
you know what I'm gonna do that right now
great
oh wait
you mean JUST from the station
trains would still default to classes
that's even better, I was just gonna change the default
that makes sense: classes for trains, items for station.
yeah it seems obvious now lmao
another thing I want to look into at one point is seeing if it's possible to add back/forward buttons to the station and network guis (like the vanilla ones)
I have no idea if it's possible to add custom guis to the vanilla guis histories though
I haven't seen any mods do it, so I'm not sure
I think just being able to go back from the network to a station or train would be 99% of the usefulness, and that doesn't need to touch vanilla guis
you can go back to the station since it is a custom gui, but I don't think there is any way to go back to the train
we just open the vanilla train gui the same way we currently do
if it works then great. I merged the pull request you made to the auto btn
cool
so for updating depot names, only trains that are on the way to a depot currently break. But it is probably best to also update trains that are sitting in a depot as well right?
so when exactly does this problem come up?
I think that a bigger issue is that, currently, if you clear the depot field completely, that removes the class (it's no longer valid) so all of the haulers get locked, yeah?
A train is going to depot A, if the class changes to depot B, then train gets stuck since it still tries to go to depot A
that's the breaking case
yeah that is true but if the class gets removed completely then it locks
and plenty of people clear textfields before they start typing
if the train is waiting at depot A, then it just continues to wait at depot A even after the class depot changes to depot B
I think just having a button to "reboot" just that class might be best
I see the locking thing
making changes to classes that already have trains should be very rare
I think a case were changing schedules is more important is when new things get added to stations and the automatic name changes
sometimes it seems to adjust the schedule automatically but sometimes it doesn't and I couldn't work out why
I was messing with updating train names the other day. I think when a train has already reserved a path to the station. Changing the station doesn't get rid of the reservation so the train schedule is updated. Also if the station is unique, it updates schedules.
right
seems messy to handle
does that mean it will never update now that we have the rail stop first?
it don't think it would hit the first case, but it hits the second. A unique name change updates schedule
oh right the unique thing is probably what made the difference
I think it should be fine to just iterate through all of a station's trains (provide_deliveries and request_deliveries) after a name change and update the schedules?
having the rail stop first should make that easier. If the stop and the rail stop are the same, we can identify the updated station.
we don't need to do that though since stations already know which trains have them in their schedules
no, since trains first go to the rail before the stop, trains technically aren't going to the station until they are at the station. Until then they are still in the pool of all trains going to the station name.
Unless haulers store the stop they are going to
I mean SSPP Stations yeah
the nomenclature I've gone with is station = storage.stations[], stop = train stop
then easy yeah
I really wish one of those two users getting a migration crash would give me a save file
I want to fix that issue before doing a new version
well I'm off, ciao!
cya, quick question before you go: are you opposed to using metatables?
nope, I just haven't seen a need
I liked the C like style (mostly free function) Mami went with for cybersyn so I used the mostly the same style for SSPP
what exactly were you thinking to do with metatables?
I was thinking it might be nice to do some refactoring, and class like organization is nice for namespacing.
I think splitting things into modules is already good enough for that
I already have "namespaces" for main and gui for the exposed stuff
fair, but some refactoring should be done for lib.lua it has too many functions for different stuff
anyways, good night
yeah agreed, I don't really want to put the stuff in there in another table though
table lookups aren't free, some of the functions in lib are used inside hot loops
it's already bad enough putting them in the global table instead of pulling them to locals in every function they are used, but that is just too ugly for me
but some of it could probably be moved elsewhere
I thought performance is only better for local functions
all the functions in lib are global
one table lookup is still better than two table lookups
it's not that big a deal
mostly lib is just the place to put shared code when I feel like I really shouldn't spend too much time thinking about the perfect place to put it
I'll still be around for a while if you have more questions btw, I'm just too tired to keep coding
I have other things to work on. Rest well
@drifting salmon ran into another problem for you
my train is trying to path to a unconnected station instead of searching on connected rails
2 seperate rails
with the same items? as in you have providers and requesters for the same item in both sets
yes
that isn't supported yet
i have 1 set to pickup iron ore and its trying to go to the other rail
need to add support for creating sub-surface networks
even though i have one on the same rail
sspp doesn't know that you intended for that to be two seperate systems
as far as it knows you just accidentally broke a rail so it will give no path errors
how long till thats fixed?
well it isn't really a fix, it's a significant feature
it wasn't on my short term todo list because I think it's a fairly niche thing to want to do
i still cannot comprehend the class system
- decide on a train layout, for example 1-1 or 1-2-1 or whatever
- build a train, click it, open the network
- create a new class, assign a depot and fueler
- go back to the train, type in the class name
then whenever you want to add an item to the system:
- open the network items tab
- decide what kind of train should be used to deliver this item
- put that class into the class field
which part do you think should be made clearer?
also I should note that the "capacity" fields for classes are gone in the next version, we just detect them based on the trains you've added to that class
next version also has an auto assign button in the train gui so that you don't have to type in the class name over and over again to add many trains
thanks, I assume from this that the issue was part of the station got built by a robot while you had the gui open?
I thought I had that handled properly but I'll have another look over it
just from some quick testing I can't seem to reproduce this, the gui just gets closed if new parts are built while it is open (as it is supposed to be)
if you could give me exact steps to repruduce this (with a save file) that'd be amazing
I don't even remember what I did tbh it just happened and all I know is I place the bp then crashed but it hasn't happened again
got another one
i clicked the io interface while robots built it
yeah just gotta shuffle my mods around
i usually just rename my mods folder then reinstall it all
yeah I just copied it and got an OS warning about the partition being nearly full lol, need to do some cleaning
is there a particular reason you were using an old version of SSPP?
bleh, the latest factorio experimental broke a bunch of your other mods
is ok I can just roll back to stable
oh crap
oh big crap that slider isn't meant to be there
oh shit I uploaded the wrong file
good job
also not sure how well the auto choose class things gonna work with fluid trains and cargo
1 sec
isnt it gonna request a fluid train by mistake
oh man this is so ass
yeah I accidentally uploaded a zip with all of the stuff I'm in the middle of working on in it
that version only had 35 downloads at least, and it should be fine after an sspp-reboot
I'm not sure if factorio will re-download the same version if I reupload a different file
lmk when it uploads
fixed version uploaded
in my rush to post a bugfix for the previous version I accidentally posted a much more broken version 😭
I wish I could have two release channels so I could post new versions out to just a few testers first
well, about this anyway, not an issue
the way it works is it compares the train to add with the existing trains in a class
since your item and fluid trains are in different classes it knows which one to add to
the provider only has 161 items
@coral plaza I pushed an initial implementation of train limits to github
if you get a chance it'd be awesome if you could test it and let me know your thoughts on it
Very cool. Overall it seems to work great.
When a train goes to a provider and is waiting for an open requester station, inserters can still load into it since it stopped at the rail stop.
There is an error that occurs when at the provider, when toggled auto -> manual -> auto -> manual
Error while running event SourceSinkPushPull::on_train_changed_state (ID 27)
__SourceSinkPushPull__/scripts/lib.lua:123: attempt to get length of local 'list' (a nil value)
stack traceback:
__SourceSinkPushPull__/scripts/lib.lua:123: in function 'list_remove_value_or_destroy'
__SourceSinkPushPull__/scripts/main/hauler.lua:45: in function 'hauler_disabled_or_destroyed'
__SourceSinkPushPull__/scripts/main/hauler.lua:63: in function 'hauler_set_to_manual'
__SourceSinkPushPull__/scripts/main.lua:77: in function <__SourceSinkPushPull__/scripts/main.lua:61>
whu
why don't mine do that
ohhhh you mean when you toggle it by hand
yeah I see
also happens for requesters, providers are when I found it
yeah... this isn't a new bug
this has been like this since depot bypass was added
fixed
but yeah, the trains being able to wait at the providers when the requesters are over limit seems like it should be really nice
I don't think any of the other train mods can do that since they all plan the whole trip from the start
It is nice. Ideally the train would be in waiting state instead of the stopped state to prevent insertion. Connector the provide io also solves it, and I guess that is a more "correct" setup.
oh, right yeah I didn't even think about that
I think that would only be an issue for very specific loaders right?
inserters, pumps, aii loaders can all be plugged in to the io combinator
The only downside is single item provider stations, before not using the combinator was no problem since the train leaves when it is full.
there is a somewhat cursed way I found a while ago to do a "waiting" state like that
tell the train to go to a stop that just doesn't exist
but you have to keep clearing the alert that spawns
actually I don't think it being insertable is an issue
if the user hasn't plugged in the inserters, that not only means that the station is single item, it also means that they don't care about how much the train gets filled
so even if it stays open it's already going to be full anyway
the vanilla behavior is that insertion stops once wait conditions are met. So there needs to be something clear to indicate that it will behave differently if it does.
I'm not sure about that
I think expecting the behaviour to exactly match vanilla when you don't follow the basic instructions for setting up a station is not reasonable
and I think trying to explain that in the readme would not really improve clarity, since what we want is for people to just plug the thing in
Plus a big part of me feels like anyone who doesn't bother to plug in the wire also isn't going to set a train limit
At least one person will, because that's exactly what I did. Set the train limit and eventually found that trains carrying way more than they should were going around.
but also the people that do that only do that because they already know that they explicitly don't need to do so
which means they will know what they did wrong
My main problem is it is a silent error. maybe an error checking for overfilled wagons.
the instructions for plugging in the storage and plugging in the inserters are right next to each other in the readme
an error for overfilled wagons could be very annoying
lots of people just let their wagons slightly overfill, that shouldn't be an error other than maybe the requester stalling for a bit while waiting to use up the extra items
It can have some leeway. But when my train that should be carrying 1k iron suddenly has 4k, something is definitely wrong.
sounds like something to put in the FAQ, I don't think it should be in the main readme
okay
well I've gone over my test world as thoroughly as I can and I'm not seeing any wrong deliveries, so I fairly sure the rework to the tick code hasn't broken anything
so guess it's release time, really hope it doesn't have a really obvious bug in it this time
good luck
ok, I think all of the major things I wanted to do are done
except for the log tab, but that is whatever, it can wait until I actually get far enough in my py run to want it
tommorow I'm gonna try and just work on the script/prep for the tutorial/showcase video
hey, can someone help me out? trying to set it up; have 4 station (fuel, depot, input, output), a train. there is a task to deliver cargo, but the train is waiting to be dispatched. what could be the issue?
found the solution. one of the stations had to have "priority" 4/5/6
I need to find a place to mention that, you need to have at least one push or pull station for deliveries to be made at all
Maybe I should explain the modes using the vanilla logistics chests
The source modes are basically passive provider chests - they will only send to pull stations (requester chests)
Just stumbled upon this mod. Do any videos showcasing it exist ?
Not yet. I'm working on one but I want it to showcase some real-world (video game real) examples
So I'm mostly playing Py and building those setups
But Py is Py so that is taking a long time
I really like this idea. I'm planning on trying it on my PyBlock run. Though it will likely take a long time for me to get to railroading. Haha.
Specifically, I like the idea of putting something down and configuring it instead of ending up with a dozen different combinators to do what you want.
Figuring out the combinators once for a new LTN or Cybersyn system is a fun challenge. But actually just having a simpler cleaner blueprint and picking things in the interface is better.
Same with picking the four priorities of push/pull/source/sink which lets you handle what you need. Having an infinite number of priorities and needing to implement the thing you want in that system is only interesting once.
Yes, those were my thoughts exactly! Cybersyn is awesome, but even once you have blueprints it's still a pain to set up hundreds of stations, and it's very easy to make mistakes. Especially if you try to minimise buffers (you end up with stations that can't actually handle the throughput you expect). I've very much been enjoying the mod taking the guesswork out of how much of each item to buffer at each station.
I should also mention that I did recently split each of those four modes (source/sink/push/pull) into low/normal/high priority, since I did end up wanting just a bit more control.
working on dedicated support for bufferless stations
Oh that is neat. I've thought I wanted to try making a bufferless train system at one point. I look forward to trying this out.
It's definitely not something to use everywhere (it doesn't work at all with multi item stations), but it should be quite useful for certain cases, like really high throughput mines (you could even mine directly into the wagons, like is often done in vanilla megabases)
you can do something similar for requesters in other logistics train mods (just always send a negative signal), but as far as I'm aware no other mods let you do bufferless provider stations, for technical reasons
just discovered something cool and unintended you can do
when throughput is set to 1 on any item, then latency exactly becomes a minimum item count
so if you set throughput to 1, and latency to 50, then a new train will be dispatched as soon as the item count drops below 50
I'm doing an advanced station where I want to only request native flora (which spoils) once enough of all of the other items needed to consume it have been delivered
so I can just work out the ratios of all of the other ingredients, use a decider to enable native flora (by using a dynamic item mode), and then set all of the other items to keep that number of items on hand
I wonder if showing the actual formula used for calculating the buffer size in a tooltip somewhere would help people to understand what throughput and latency actually do
the stations I was talking about, flora will only be requested once there are enough of all of the other items, and the stations will ensure that at least the required amount of each item is kept on hand
Something like that for flora specifically seems like a win because of spoilage.
So I set up my network and the trains did one run of 2 or 3 items but arent picking up the 3rd
Do the providers have enough / requesters need enough items?
The surplus of the provider and deficit of the requester needs to be at least equal to delivery size
If thats not the issue, you can send screenshots of your provider/requester/network and I can tell you what the issue is
Ok will do once I'm home, I know one was a negative number while other two were still positive
so two things:
- The provider mode is set to "dynamic". This is an advanced mode where you control the mode dynamically by sending a special signal. If you aren't sending that signal, then no dispatches will happen (the item is effectively disabled). You probably want to set the mode to 2, "source".
- throughput is in items per second, I don't think you mean to provide 500 circuits every second (that's 33+ yellow belts)
Yeah I set it to dynamic trying to get something running last night lol
also it looks like circuits aren't being sent anyway because the requester already has way more items than it needs
So my setup is need 224 plastics Per/s I had it set to 224, what should I set it as for a provider?
oh right haha, sorry I got used to py numbers (just did a build yesterday for 1.2 plastic /s)
providers don't actually care about the throughput value, that's just to give you an idea how much space to reserve in chests
does it look wired right?
ah yeah that's not right
you need to use different wire colours for the filter wire and the storage wire
does the general io need to be linked via wire to requester?
no
in fact if it is then things wont work
basically that results in items being double counted when unloading
here's the example station from the mod page
unless you are doing something fancy (like sushi fluids), then the only two wires you need is:
- 1 wire going from your storage to the general input
- 1 wire going from your inserters or pumps to the request/provide output
I can't see the red wire connecting to the chests, but assuming it is that looks correct
I have them connect to the chest above the rail, not the ones from the inserters at bottom
is there a reason for that? you can connect multiple chests + belts if you want to also have that counted as "in storage", but the chests directly before the inserters need to be connected as a minimum
the issue with that is that the items will be "forgotten" as soon as they leave the train
could it be a issue with those chest? even tho it worked once?
sorry never really was good at logic XD lol
from what I can tell, for this set up what you want is to to connect ALL of the chests and belts to the storage input
as far as SSPP is concerned that's all just one big block of storage
the general rule is items at requesters should never go up except when a train is unloading
so you don't want to have them be lost when a train unloads only to show up again when they enter the second set of chests
ok gottcha, I have done that, but its not setting filters now
there's a train there?
they are in depot
filters will only get set when a train is there to unload
(fwiw, filters don't really matter for requesters, they're just provided so that you can have stations that won't accidentally unload the wrong item if a wrong train shows up somehow)
the total capacity of your inserters
yep
it just rounds down the delivery size so that trains don't get overloaded and items get stuck in inserter hands
only matters for multi-providers or really low delivery sizes
what does the network look like?
ah
I didn't notice before, plastic and copper are set to "sink"
that's not really relavent for vanilla, sink stations are meant for things like voiding byproducts
set to pull?
yeah
nice plastic train is moving
I probably should change the default for requesters to pull, you aren't the first person to have this issue
tbh didnt even notice lol, i figured default was pull lol
So its still showing a Deficit for Copper and GC
deficits are positive, if the number is negative that means that the station has more items than it needs
so that station should be requesting plastic
ok gotcha
also, if the numbers ever do become negative, that means you either dumped a bunch of items in by hand or one of your trains got way overfilled
SSPP will only try to get the deficit to zero, not lower
ok think I am working now, will finish the setup and see if there is anything else I messed up XD
great to hear it! one thing to be aware of with any logistics train mod is that multi providers can be hard to do correctly when using multiple chests per station, you have to be careful that they get loaded evenly
I'm not sure if you plan to use them but keep it in mind if you find items getting stuck in hands at multi providers
do providers need to be hooked to the belts? or just requestors
generally no, sometimes it can be useful, but those are advanced use cases
roger
all that really matters is that SSPP can see that the station has enough items
also, you don't usually need to connect the belts at requesters either
that's only needed here because you have your storage split into two parts by the belts
if you instead just had the items stay in those first set of chests then you'd only need to connect those
in fact you could leave the second set of chests and belts unconnected, but if you did that, SSPP would just keep sending trains over and over again until the second set of chests was completely full and the whole thing backed up
Dumb question for fluids would delivery be 100,000 for two fluid carts?
50k it says
then 100k yeah
Made a station for fluids but cant set Limt to higher then 0, everytime I set it to 1 it just jumps back to 0
oh that's very weird, it shouldn't be possible to set the limit to 0 at all
will investigate
can you send a save? I have no idea how you managed to get a stop to have a limit of 0, other than there being some kind of bug in factorio itself
@umbral sandal
yeah I can't reproduce this and I can't see how it'd even be possible for this to happen
so I'm thinking it might be some other mod doing something weird, so I need a save
also, unrelated, but fluid wagons only have 3 pump connection points, so only 3 of those 6 pumps will get used 🙂
It's cause I used a BP and pasted sspp station on top of it, fixed it by deleting station and replacing it
a BP of a vanilla station?
Yeah
good catch, I'm not handling that case
Lol
no actually I am handling that case
not explicitly but the code that sets the default limit runs even if you place an SSPP stop over a vanilla stop blueprint with a limit of zero
so I still don't know how you managed to do it
WIP history tab
I need to think of some way to let the user quickly associate a station name with an actual station on the map though
ideally that'd be something like hovering over a station name would show a minimap in a tooltip
but I don't think that's possible within the lua gui API
That history tab would help seeing if a train is actually doing stuff at times lol
That would be super handy
The mod SSPP Logistics Train Mod (0.3.20) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event SourceSinkPushPull::on_tick (ID 0)
SourceSinkPushPull/scripts/tick.lua:400: attempt to index field '?' (a nil value)
stack traceback:
SourceSinkPushPull/scripts/tick.lua:400: in function 'pop_best_dispatch_hauler_if_any'
SourceSinkPushPull/scripts/tick.lua:771: in function 'tick_dispatch'
SourceSinkPushPull/scripts/tick.lua:867: in function <SourceSinkPushPull/scripts/tick.lua:843>
Random crash while on Fulgora
man another one, I keep thinking that I'm nearly ready to promote the mod to "beta" and make the warning on the mod page a bit less scary, but people keep finding crashes
it looks like this might be the same issue as https://mods.factorio.com/mod/SourceSinkPushPull/discussion/67d535aae9b0f05e9352cf7f
Error while running event SourceSinkPushPull::on_tick (ID 0)
did you try setting up a station before setting up a class?
If so, I've fixed this issue for the next release but haven't published it yet
more progress
So how does Latancy work? I am not getting enough trains to keep supply up
yeah think thats what I did
Basically, latency is how much "wiggle room" a station gets
So for example, if a requester needs 15 items a second overall (throughput), then latency is how much extra time the station should be able to last without getting new deliveries
If you have enough providers where every train can always be dispatched instantly, then you dont need any latency
However, if the demand is uneven - for example a requester needs a delivery right after another one drains your provider - then latency ensures that the station has enough of an extra buffer to last until the whole network evens back out
It should also be noted that there are other reasons that stations might not get enough items, for example if train limits are too low then it won't be possible for SSPP to keep up with high throughput stations
Also delivery time being too low, IIRC you were using 60 seconds, while on my system deliveries take up to 150 seconds. That time is kind of a guess right now, though the history tab will help with that
Delivery time should be a "maximum ever" time, don't be afraid to set it to a large value to future proof things
spending way longer than I should be on this vanity tab lol
Actually, it just occurred to me that why is the user setting delivery time? Can't the mod keep track of the last N deliveries and take the max? Or do an EWMA + 30% safety factor?
I'm still not to trains yet to try this myself, though. Haha. Hopefully soon.
Tracking max delivery time doesn't really work because its going to get messed up by outliers
Like if a train gets stuck for a bit because the player is doing work on the rails
Plus, the request target can't be dynamically changing
If you set up a requester that want to request a bunch of items, you're going to check the reported storage needed value to make sure you actually have enough space in your chests
Hmm. I guess I'll see how it works when I get trains going. I was thinking that 'max of last N deliveries' would mean outliers get dropped after a while.
And that the request target would be updated once per delivery after the delivery is made. "This delivery took 10 seconds longer than expected, so the buffer should be 7% higher than previously calculated."
But I haven't played around with the system yet so I am probably not grasping how it all works completely. Pyanodon's is slow. 🙂
Yeah but the main issue is you need an idea of what the buffer size will be when you are designing the station
Yeah. The station has to have some kind of max which is the overall buffer limit in any case. I'm kind of assuming that Py warehouse will have way more buffer than I need in any case. Though I'm trying hard mode so maybe not.
I have seen more then 1 train of the same type go pick up from a provider, with 200k of items waiting for pickup and requester asking for 600 throughput and running dry quick
I'm not sure what to tell you other than some setting is too low 😅
I'm going to be looking in to adding some more diagnostics to the history tab today that can hopefully tell you exactly which settings are too low (though once you understand what each setting does, its fairly easy to know which one to raise)
For example, if trains are getting stuck waiting because a station is above its train limit, if items are getting drawn from requesters faster or added to providers slower than what throughput says they should, or if deliveries are taking much longer than the expected delivery time
getting there
just need to fill out the section in the bottom right with useful info
also this tab especially really needs a search field so you can filter by item
but search that searches through translated item names (instead of just the internal code names) is super complicated
so that will come later
Its looking really good
is it useful? probably not
is it cool? maybe
aaand the history tab is published
in terms of the ratio of time to design vs usefulness, it's pretty awful lmao
making nice guis takes ages
I'm replacing the custom icons SSPP uses to mean "fuel" and "depot" with signal icons recently added to the base game, which of these do people think works better to mean "depot"?
for reference, the icon currently used is this one
I'm thinking the flag
actually no think I prefer the moon
yeah definitely the moon
ok tallow has convinced me, flag it is
Hahaha. The power of emoji!
Ok, I think that at this point I've fixed all of the known bugs, and the cleanup of the code base is complete. Now to start thinking about the next big feature - virtual items
Basically, I want to aleviate the main deficiency SSPP has over other logistics train mods, which is not being able to have different delivery sizes for the same item at different stations.
There are two main use cases for this:
1: You want to use larger trains to bring in bulk resources (for example ore to smelting), but you also want to be able to deliver a small amount of that item to other stations (say iron ore to concrete).
2: You are building a mall, where you want to keep only a small amount of most resources compared to normal requesters.
The solution I'm thinking of, which I'm calling "virtual items/fluids" for now, would basically let you create multiple (linked) entries for each item/fluid within a network, each with a different class and delivery size.
Then each station would be able to specify which virtual items it provides or requests. Possibly multiple virtual items of the same real item, but that will depend on how much more complicated that makes the code.
Thinking I can make the whole thing faster and more reliable if I restrict things to three virtual items per item (one default one, and two optional ones)
There's the default one which is used in most places, then if needed you can add one virtual item for high-volume deliveries, and another virtual item for low-volume deliveries
hmm. I wonder if things can be further simplified by making those default/low volume/high volume options explicitly for that
that lets us make the assumption that higher volume stations can always service jobs for lower volumes
which lets priority/modes remain unified and consistent
ok found at least one question to solve: should a high volume pull station be able to get items from a lower volume source station?
In cybersyn for example, the answer would be no - if a provider is never able to meet a requester's request threshold, then a delivery will never be made
but I think we can do better here because we have more information at the provider. we know the maximum volume a provider might hold in the future, so we can prevent dispatches from happening until the provider reaches that volume

Hello
I'm here cos I'm interested in hybrid push-pull train systems.
And this mod seems highly relevant.
I've spent a long while trying to implement an emulation of the usual "logistics chests" system; but for trains, by using interrupts and radars for data transmission between stations
Its meant adding a 6th type of station, for "passive requests"
But I'm at the breaking point of my ability to handle the complexity required to add more features. And i want more features.

So the "delivery" time is meant to be used for determining how much local inventory a requesting stop should aim to maintain, below which it will request more.
Does the system take distance into account when determining which train to dispatch when a shipment is to be made?
This is something I spent a long while trying to prevent my trains from doing.
Does SSPP allow for this sort of behavior from trains?
(For further context; playing pY has also caused me to look for different solutions to train things.
The abundance of different byproducts has me wanting a system that allows for pushes to the network and sinks for items.
And the relative expense of crafting and placing trains and vast count of item types makes me want a system that pulls only when needed, while minimizing the amount of time any 1 train spends waiting at a station while occupied with 1 item type. )
If you plug the combinator output into inserters and have them set filters, overloading isn't a problem.
Distance is generally not taken into account, no. Rather, if set up correctly, distance shouldn't matter - the system should correctly handle the worst case scenario, so you shouldn't ever need to think about distance between stations.
So if distance isn't taken into account, what does determine which train gets dispatched if more than 1 train is otherwise available?
I feel you, haha. The mod started as a fully vanilla interrupt and combinator (LOTS of combinators...) based system, but I hit a wall with what was actually possible
so many combinators at my stations right now....
Priority, and if priority is the same, the amount of trains vs the trains limit, and if that is the same, weighted random sampling
Those seem like values that would be attributable to depots/stations, not trains themselves?
Oh, yeah when picking the train to send to a provider, that's just random. It prefers those waiting at depots, then ones going to a depot, to give trains a chance to refuel if using mixed fuel/depot stops.
Picking trains by distance is actually quite UPS heavy so I opted not to do it.
Plus the philosophy is that the mod should handle the worst case just fine, so again shouldn't be an issue
I would love if you'd give the mod a go haha, you sound like someone who'd do a good job really stress testing it. Progress on my own Py run has been very slow because I keep working on the mod 😄
From what it seems, SSPP will replace my current system with one that allows for mutli-item requesters.
And other than that, it'll just make for stations that don't have like 20 combinators and radars at every station.
Out of curiosity were you using something like compact circuits?
Or are your stations massive
Interesting, looks like your system was quite different to mine. I had only one delivery interrupt and the rest was all combinators
The signals for triggering the conditions of the "dispatch 🟥 🟦 " interrupt, and the "active provision 🟪 " interrupt are provided by radar.
The signal for "valid targets" is the count of all enabled 🟦 and 🟪 stations, for that item, minus the trains already en-route or at the 🟥 or 🟦 stations, for that item.
The total counts of all enabled stations, for any item type, were also encoded to radar using bit-packing
And the stations blueprint includes a prompt for threshold on how many other stations of the same type could be open before the one being built could be open.
Its.... intensive.
Oh thats an interesting way to do priority
I had a central brain that picked out the best station and sent an id signal out that each station would check before enabling
Ye.
I have all my ore processing put the stone into purple stations.
Most of the time, that means the stone ends up being set to 🟨, for mass storage.
There; it gets sorted, and put into a 🟥 stone station
And my 🟥 stone station that mines off a patch is told "only enable if you're literally the only 1 station available for stone pickup"
That way any byproduct stone that gets sorted through yellow is guaranteed to get consumed first.
Accounting for route distance is gonna be my White Whale, I fear.
Has the system been working ok in your run? Mine ran into game limitations before actually being deployed in my real run
Oh geeze, no compact circuits
There's an example of some actually placed stations.
The combinator count near the stations themselves is... just approaching the limit of what i can put up with.
After making the comb based system I kinda went the opposite direction with SSPP
I want no extra combs at all on most stations
The only times I have some is for special stations that request spoilable items (they check that there are enough other items to consume the spoilable items)
At least 4 of the combinators i have at each station are for totally aesthetic things like lights indicating the station status and playing an arrival sound via programmable speaker.
Interesting, it looks like you don't have any waiting areas for your trains
Waiting areas are fairly important with multi item stations
Yeaaaaaah.
Lack of waiting areas means limits of 1 at basically every station.
And, since i didn't even account for multi-item requesters to begin with, that's been mostly alright
I use 1-1s personally since you get waiting areas basically for free on corners
I'm realizing as I progress, lack of multi-item requesters is going to mean far more area than id like going towards individual stations for every item a process needs.
Hence, I'm exploring solutions that allow for them.
I think that if you standardise on 1-2-1s you're going to need a lot of space no matter what mod you do or don't use
I suppose?
You should see the array of like 14 stations i have to drop off ingredients to the sushi-based omni crafter I've come to call "The Mistake"
Its... entirely too large.
Multi wagon trains also make multi providers a lot harder if you aren't using a cheaty connected chest mod
And could easily be like 3 multi-item stations instead, had i thought to account for them.
So
For multi-fluid stations,
My idea would be to have the pumps go straight into a "shared" pipe.
And then pumps with filters for each fluid type take the items from there, and sort them into their own dedicated fluid system. Those dedicated fluid systems would be what actually gets read for the purposes of letting the station know how much it's got locally.
The process for items wouldn't be much different; dump any recieved items onto a belt, and have either filter-splitters or just filter inserters sort the items into the chests actually used to report local inventory.
The extra infrastructure at each multi-item station for sorting is more footprint than is strictly necessary.
But compared to the alternative of having every different item require it's own stop, it's nothing.
Oh ye, that looks exactly like what I described
basically I put the actual storage in the builds, rather than at the station
and because of the way SSPP stations work you don't need to do any signal filtering
so I have the one wire used for 3 different stations with 5 fluids each
Just need to make sure you never have a situation where fluid arrives when you don't have space in the tanks for it.
Otherwise the "shared" pipe directly off the train will have fluid-A in it when a train arrives with Fluid-B, which would be very bad.
ah yeah this is for a provider
requesters are easy, since they can just filter on the pumps into the tanks
I hadn't even considered the prospect of a multi-provider.
like this
yeah providers are a lot harder to get right, since it's easy for fluids to get stuck in pipes
they were nearly impossible pre 2.0
.... can items be done with multi-providers?

Can a station passively providing one item be used to actively provide a different item??
yep!
that was one reason I made this mod, because that is impossible with cybersyn
passive/active provide/request are all set per item
this station for example, which is for requesting stuff to make saline water, is a low priority stone/gravel sink (passive request), but a normal priority salt requester (pull)
geeze 😄
it does look cool tho
when I did my vanilla based system, I did sort of have multi item stations
basically just two train stops in sequence
each with their own set of combinators
so really it was two stops, but it only took up a little bit of extra space
couldn't do more than two though because then the wagons wouldn't line up with the cranes any more
mod input; there's no mini-tutorial under tips and tricks
soon(tm)
I'm putting off making a tutorial (a video, since that's probably more useful than tips and tricks) until I finish my rail base transition
so that I have a real world to show off in the video instead of just my editor one
yeah they are just vanilla stops
(make sure you read the readme on the mod page, it's not great, but it does cover most things)
are you playing py with spoilage enabled?
the mod has some completely undocumented features for robustly handling spoilable items
I'm currently in the process of setting up my butchery block
no spoilage for me, pY alone was honestly more than i was looking for
haha, sensible
i cant seem to figure out why my trains arent leaving
any build I do that has spoilage involved takes like 4x longer to design
It's definitely a lot more interesting in py, but yeah still a lot of effort
items, defined
looks like the class has no trains
have you added any trains to that class and switched them to automatic?
the text field is gray'd
switch the train to manual
you can only modify the class when the train isn't in use
also for future trains you should be able to use the auto assign button
also, the numbers here are almost certainly incorrect
im in the lab
setting numbers to unrealistic values was intentional
just to see what it does
ah yeah fair enough
a lot of people have been putting really low values in there and having problems
if you are curious what the values all do exactly, you might be interested in this function https://github.com/jagoly/SourceSinkPushPull/blob/main/SourceSinkPushPull/scripts/lib.lua#L192
.... can SSPP stations not have their color changed?
no, but the mod does have the option to automatically paint trains based on what they are doing
I guess I can add the option to colour stations too, just haven't done it yet because that's a lot of gui code to write for a pretty niche feature
yeah that is the only thing that can't be changed, have a look in the mod settings for changing the train colours
at least, if the trains can be colored based on activity
i've grown just a little attached to the color scheme i had created
I started doing some code to have the stations actually colour themselves based on activity
but having them change colour looked weird so I scrapped it
my color scheme delineated between push and source, as well as between pull and sink.
and it had "storage" stations, that were "last resort" option for items pushed to the network when no sink or pull station was available,
so i had 3 more colors
unfortunate. at least i can pick the colors for some of the things
I guess the issue would be that even if I let you set the station colour (and then trains got painted based on target, like in the base game), that still wouldn't distinguish based on the actual mode of the item
if a station was a sink for some items but pull for others
i only asked about station color cos that's how i was painting my trains.
and the train color themselves, based on what theyre doing, is what i actually care about
I'm not entirely sure how useful painting trains based on whether they are going to an active/passive station is all that useful
it's not, i just like it for aesthetic reasons
even within an active request station, there are breakpoints before which deliveries aren't actually counted as "active"
like, stations become available for sink deliveries before they become available for pull
so that deliveries from push stations are preferred temporally
but I'm not sure that would make a lot of sense to explain to the user for the purpose of train colours
ah. that makes
it's.... fine.... i'll just.... set all the train colors to white, and spam colored lamps around my stations so that I know what color they are
yeah
hahaha
hopefully the gui should be convenient enough that it should be easy to tell what kind of station it is
i keep getting iserters stuck with extra items in hand when the train leaves.
gotta be related to that "granularity" setting
what is the hand size of those inserters?
granularity should be 36 * number of inserters
yeee, i had it at 36 previously
letting a simple setup rip at 16x speed, i get a train with multiple item types loaded every so often
that should only happen if stuff gets stuck in inserters
can I see the provider where that is happening?
well, the first issue is that the two storehouses aren't going to get loaded evenly
so there will be times where one of the cranes won't be able to pickup a full hand of items
yeah, that's a big reason people use those connected chest mods
im likely gonna cave on that mod, i've been avoiding it for a long while
my solution is just use one storehouse, but you will need multiple if you really want multi wagon trains
the throughput of my inserters is just currently so bad
either the merged chests mod,
or some very finicky combinator magic for very even loading
a balancer + a pair of inserters with some simple logic between the storehouses should be enough
it's only really bad with more than two wagons
something like a decider with each(red) > each(green) ==> each for one way and the opposite for the other way
so two deciders + two inserters between the storehouses (or warehouses or whatever)
of course, imo 1-1s are just objectively better since you can signal your rail system much better for 1-1s, which more than makes up for the congestion improvements from having fewer larget trains 🙂
but long trains are cooler
im gonna have to go around and retrofit all my sites with new stations anyways, might as well take a look at what train type i use
i also could feed my SSPP combinators some fake negative numbers at provider stations.
if my copper ore pickup station thinks it has 50 less ore than it actually does, that's 50 items of leeway i have on my buffers being evenly loaded.
there are definitely workarounds like that, but they will tend to get more and more uneven over time
ok yeah went to try out my inserter thing and yeah it doesn't work
needs extra constant combs to make sure that the difference between the two chests is >= 2, and signal isolation combs since you need one wire colour to read the contents to feed into SSPP's comb
deposits are wide enough for two wagons if you don't mind the ugly diagonal 6 wide cranes
also they are so massive you could just fit two single wagon storehouse stops in just two extra tiles
but yeah, my thoughts are that using more than one wagon only makes sense for really high throughput items (and even then, I think better signaling and more consistency makes up for the extra trains of just always using shorter trains)
and if items are so high throughput that they need multiple wagons, then they should also just have dedicated stations
im getting the other "cranes for pY" mod, the one you seem to have, to see if i like it more
I mostly use it because the other one didn't exist when I started using it. The main difference is these ones are kinda OP
but being able to move stacks at a time is really convenient and makes loading extremely reliable
yeah, im a little over the throughput capacity of yellow inserters when it comes to train stations
so, "OP" is... fine.
the way I justify it to myself if that I still use regular inserters for actually getting the items into the storehouses
so the only thing that gets sped up is the actual loading
not that any of that matters, single player game and all that
the 2x6 footprint makes them INCREDIBLY unfit for basically anything except for train stations
yeah, it does have an option to make them narrower though
but I like the chunky ones
i need the chonkers, to justify their throughput
they need to be impossible to use for anything but trains
and honestly, getting these in my test setup in the lab, theyre hardly even usable there
with the way I do my stations the extra width doesn't make a difference
since the tracks between bays need to be an even number of tiles apart anyway
oof, intermetalics, shaft, and gearbox as ingredients for the cranes? yeah, that's ballanced.
oh man the god damn intermetallics
it's fine, i'll just have my omni-crafter make them
ez
im procrastinating implementing SSPP stations in my save.
such a big task; going around and retrofitting stations
I made the mistake of using this intersection everywhere from the very start
elevated rail?? that's post Logi-science?
yeah I did a bus base up to logi
I am still doing the the rail transtition lmao
after like 4 months
I did make a mod in that time tho
the main reason for my train system before was to minimize number of trains needed, since i was afraid of trying to make any more than like 5 of them
is that a water train
hahaha, I guess you're still working towards logi sci yeah?
yep, still working on making logi sci cos i've spent so long tinkering with trains
that's the interconnection where old-system can provide stuff to the new system
very cool!
the auog setup was mostly for a lil test run of using SSPP stations
and it's worked flawlessly so far
that does remind me that I wanted to add support for letting the user customise the automatic name generation
here's an example of my old naming/color scheme
the colors match up with the function of logistics chests
yeah the coloured squares are quite quick to visually parse
only downside is that take up a lot more characters than the unicode arrows do
yeah....
i personally would gladly take longer station names tho
i definitely wouldnt mind a train stop named:
dunno if you've noticed but the auto name will cut off once you add too many items
ahhhh, and rich text is like, a ton of characters each
especially py names
hmmmmmmmmmmm
if that was happening to me regularly, i'd likely just start naming stops by just the function/mode theyre serving, and then use map tags to label specific items
yeah if I was less lazy stations would be named based on the block they're in
I mean in my run, I'd name them
also, you were absolutely correct about 1-1 trains, and being able to sneakily allow a train stacked in series at the curves generally already present at stations
iddy biddy trains are the best
if py had tier 1 short wagons and short locos I'd use those even if they were half the capacity
maybe 😄
I'd have to try them and see if they ended up too small
hopefully by the time you get to logi sci you'll be in a better place than I am lmao
for some reason I've opted not to properly plug my bus base into my WIP rail base
so I'm basically rebuilding (and upscaling) everything
as soon as i got items on rails, i'd plug it into the starter base, and then decon the part of the starter base that made that item
that's almost always how i play
Right.
So, sinks are the "passive requesters"
So I'll need/want to set up a sink at the lowest priority, to act as "mass storage"?
That way any station i set to push an item, it'll have that low-prio sink as a fail-safe target.
Yeaaaaaaaah.
That'll work.
Anyways, I noticed that the SSPP stations/combinators don't allow their item types to function as parameters in blueprints.
this feels illegal.
1 itum pull
1 itum source
3 item push
4 fluid pull
seems to be working so far
Yeah that's by design
I don't have any control over the user setting the numeric values to valid values, so it made more sense to just not store them in a way BP params can see
Personally I don't use a mass storage sink like that
Rather my sinks are "void stations", their job is to just make the items go away
Since if items get sent to a sink, that means that everything that actually wants that item already has a buffer of it
i just like knowing that i can setup a push station, and the stuff will be guarenteed to go somewhere....
perhaps that just enables me to make bad designs, equivalent to just stashing stuff in a chest instead of properly dealing wiht it.
in part it's laziness, in part it's to have a fail safe if i scuff the sink sites, and they arent actually sinking items properly.
i generally try and find something to do with excess byproduct, some sort of value i can squeeze out of it before actually just tossing it. even if it's just making tons and tons of bricks out of extra stone
when that happens I just add a bigger buffer at the push stations that are actually getting clogged
while I fix the sinks
also friggen stone lmao
I have been desperate for more stone for ages
after turning heaps of it into bricks early on
actually ripped up a lot of my bricks I had spammed around to turn them into more science
thats the count of bricks at my stone sink
how have you made so much stone in the first place lmao
are you mining it for kerogen?
No, just byproduct stone from doing other stuff.
And that's not even counting all the landfill.. I'll have to check the product graph tomorrow.
Anyways.
A meta-level question; what stuff goes here?
- questions about SSPP functionality/implementation
- discussion about projects working with SSPP
- suggestions for features to be added/removed from the mod?
- reporting of bugs with the mod?
Some of all of that? I don't wanna clog communications channels with unwelcome content.
that's my all time numbers for bricks and stone
Whatever you want, this channel isn't active enough (yet?) for that to be an issue
Alright.
Multi-fluid providers, arbitrary number of fluids, so i can't just make 3 pumps, 1 for each fluid. without the pumps getting stuck full of residual fluid of one type....
Each fluid will need to be "staged" in a tank, up to an amount equal to what the train will be expecting when it shows up....
Which doesn't seem to be exactly 25k, for single wagon trains. They have some other number set as their threshold for the wait condition....., slightly less than 25k, iirc.
I should brush up on my understanding of how pumps work.... my understanding is they they have an internal buffer capacity. It's that buffer volume that I'm afraid will get stuck with fluid in it.
For fluids, granularity just gets subtracted from the threshold in the schedule
With a bit of trail and error, you can see how much fluid gets stuck in the pumps/pipe after a delivery and set granularity to that
You'll want as many pumps as possible loading the train (from the same pipe) so that they can empty the pipe quickly
For my setups I usually start with a value of 800 and then increase it whenever I get a "loaded wrong cargo" alert
All of the tweaking kinda sucks, but until the devs add an option to let us read the contents of an entire fluid segment (like you can with belts now) its the best I can come up with
and i suppose the tweaking is gonna be different deepening on the throughput set for the fluid?
No not really
What matters is how long the pipe segment is, and how full the storage tanks are
Because that affects the speed of the pumps
There are probably ways to work it out mathematically if you count the number of pipes, but thats dumb and annoying
I have been tempted to make a special mod with script based pumps just for loading trains because I do kind of feel that its weird how imprecise fluid transfer always is
But I feel like most people will prefer to use SSPP with just inserters/cranes/loaders/pumps so I'm just making do with those
I wonder if there's a limit to the speed you can make a custom pump
Wondering if I could make 2x3 "turbo pump" that's fast enough to clear any pipe segment in a single tick
That way granularity would be easy for multi providers, it'd just be the amount of fluid a normal pump (going into the sushi pipe) can move in two ticks

I haven't gotten into the lab to test this.
But I could....
requesting train pulls into the station
train tells the pumps to fill the shared pipe with 
train gets its fill, then leaves
- it leaving tells the pumps to stop pushing
into the shared pipe, but there's still some residual
in there - it leaving causes the circuits manually overriding the train signals to let the "janitor train" into a standard stop placed directly after the SSPP stop
- it leaving tells the pumps to stop pushing
- the janitor station being placed so close allows the janitor train's fluid wagon to still be close enough to the pumps to fill the wagon with all the residue.
- the janitors train pulls forward by like 10 tiles, to another station, where it offloads the residue into separate shared pipe, where the residue can be sorted back into its respective tanks.
- the janitor train then loops back around to wait for the next time a requesting train shows up, so it can do the same thing.
I'd just need to figure out the circuitry for ensuring that every other train through the array of stations is a janitor train .
Its such a stupid solution, I love it.
Wait the janitor train isn't even needed.
I can just route the old residual fluid into the new train, then right back out to a sorting tank, before putting the new fluid into the train.
That is certainly quite an involved solution
I think if you already relying on having a second stop, you could instead just use the extra space to put output pumps on the other side of the wagons, to suck out any incorrect fluid
That would need me to add a station option to disable the "loaded wrong cargo" check
Oh I think that is what you meant by the second bit
yeah, im in the lab testing things rn
and that's the issue i keep running into
that "loaded wrong cargo" check, the trains keep setting themselves to manual as a result.
is that the sort of things that would be hard to implement? having an option to disable that check per station?
it mostly works.
just 2 problems;
- the "wrong cargo" error, which sorta makes the whole thing break. if that cant be turned off, i'll have to think of a different approach.
- i need a way to tell the evac pump to not pump the fluid a given train in the station is expecting to be filled with. otherwise, the needless circulation there from filler pumps -> wagon-> evac pump will quickly eat away at the 5k units of headspace i tell the factory pumps to not go above for the tanks
but pumps cant be set to blacklist for filters....
No, I had already sort of planned to do it

But I can't do it for a day or two
oh, yeah, no worries
i can make this work with 6 fluids and dedicated pumps, it'll be a LOOONG while before i actually expect to be exporting more than 6 of these fluids from tar processing
Maybe, read the contents of the train, and the "to load" output, and feed them into a decider on different wires?
can SSPP stations be wired to have the usual "read train contents" function that normal stations have?
My tar block exports 14 fluids haha, though I don't have anything to use most of them yet
Yeah the station already always does that
That's what's on the automatic wire
The provide/request combs are actually just arithmetic combs
hmmmm..... i suppose im thinking about it wrong....
i dont need to blacklist the current fluid.... cos the evac pump will still have multiple options for other fluids, and it can only pick one of them.
instead, i need to know what the previous fluid was, and target that fluid alone for the evac pump.....
which is gonna mean latches, probly
i hate latches
I don't think it should need a latch?
Oh actually yoy might need ti detect the state where loading has finished
So you once again only have one signal
the last fluid this station handled was creosote.
the share pipe is empty, but the pump itself has creosote in it's buffer. that buffer is the problem. that fluid has to go into a wagon in order to get rid of it, and i cant read the contents of that buffer directly
so, while the previous train was in the station, i'll need to store "creosote" in a memory cell, to know to target creosote with the evac pump
and i'll need to reset that memory cell later, when the next train rolls in and i need to store whatever thing it's requesting
Hmmm
I feel like there is a way to do that without a cell but I may be wrong
(each == 0) on red and (each > 0) on green and (anything > 0) on red
====> each on green
Red being the output of the comb, green being the station (train contents)
I think that might work as the evac filter?
when the train shows up, the first 2 conditions pass, but the 3rd one doesn't
so it doesnt initialize the storage
Is that after the train gets set to manual or before? Because when the train gets locked, the output signal from the provide comb will get cleared
(Which won't happen after I add the option)
it's when clear the setup to be free of any "previous" train's residual stuff leftover in the pump
https://github.com/jagoly/SourceSinkPushPull/blob/f7d6c42a7492e2ad725203416d247ef5e53a4405/SourceSinkPushPull/scripts/tick.lua#L116
If you don't mind editing the mod code (just edit this file in the mod zip in your factorio mods folder), you can disable the check for fluids by putting -- before these three lines

i failed CS101 in college 3 times before swapping to civil engineering

i guess i can take a look
I'll add it is a proper option when I can but this way you can at least get it working now 🙂
but it's in a .zip folder
i didnt even know you could edit files within those
Well depends on what zip viewer you are using, you can also just unzip, edit the file, then make a new zip
seems to be working without getting the error+set_to_manual
and now the recirculation problem is far more pronounced than before, the train just gets stuck at the station having 1 pump fill at +4,715 while the evac pump drains at an equal rate. very odd behavior that it wasnt doing before, but i need to fix the evac pump anyways
I wonder if there's a chance we can just get a blacklist mode added to pumps
That seems like it'd be extremely easy for the devs to add
Will have to see if there's already a feature request for it and make one if there isn't
I can't remember, can you put "anything" into the enable condition of entities?
Then the evac setup would just be set blacklist filters, with a anything > 0 condition, connected to the provide comb output
Darn, thought that might be the case. I've definitely tried to do that several times before and been disappointed
Yeah I meant that anything > 0 would be the circuit condition
So that if there is no fluid left to load, it stops completely
i found a different approach that's working.
just start a clock when a train arrives, and disable the evac pump after X ticks.
then the clock resets to 0 when the train leaves.
Ah yeah, that's not too bad
that's with 5 fluids, unequal demands.
this is the summary of train trips
now im adding 3 more stops with high demands for 1 fluid type, set at a higher prio for pulling.
cos i wanna see if repeated stops for the same fluid break it
I will need to revisit multi fluid providers, I was mostly happy with just having the trains a bit underloaded (granularity), but now I'm not sure
i just wanted to get this set up cos it was a fun puzzle, idk how useful it'll be in practice
I still don't really like the idea of needing an extra pump, pipe, logic to not overfill tanks, etc
Oh yeah sure haha
But I don't think I'd want to make it the "recommended" way to do multi fluid
yeah i dont love the idea of the extra added stuff.
especially with py, where a dedicated 1 pump per fluid will still have very speedy load times, and can allow for 6 unique fluids per station with no hassle whatsoever
You should have seen the monstrosity I made to do multi fluid providers in pre 2.0 cybersyn

If you are doing full size wagons, you can actually fit 12 pumps
They can't all connect at the same time, but any one of them can connect
(though currently SSPP has a hard limit of 10 items/fluids provide and 10 more request per station)
and i cant imagine ever needing more than 12 fluids at a station.........
ah
hard limit of 10
that's good to know
Yeah, the way settings are stored (in the combinator description, you probably noticed it), I can't safely fit more than that in the 499 character limit
You know what
I wonder if it's viable to do sushi pipe all the way up to the station, but then just have a different pump for each fluid
That would basically give you 400 units of wiggle room and granularity could account for the rest
And you could still get 6 fluids per side
Wait no that'd still have issues, because you really need the pumps going in to the wagon to be faster / more numerous than the ones filling the sushi pipe
I've avoided using the phrase "sushi pipe" because a pipe shared between fluids doesnt really function the way multiple item types on a belt does.
pipes function like a sushi belt that's consistently overloaded with items such that nothing flows, and any inserter off the "belt" has a static 1 item type it has access to as a result
I mean, I'm not sure it matters too much, since a true "sushi pipe" doesn't exist anyway
Are those actually multiple pipes? I thought they were just pipes with longer undergrounds and extents
uh, lemme editor some in and see
I've never tried them haha
i havent either, i was just assuming

i remember there being something regarding shared fluid logistics.....
idk what's going on with the "vessels", they seem like pipes? i'll leave that for later, i guess. back to the factory

kicked me to main menu
Aaaah dangit






