#Source-Sink-Push-Pull

1 messages ยท Page 3 of 1

drifting salmon
#

plus factory planner makes do with chicken pecking and that's pretty much the gold standard for mod guis

storm adder
#

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.

drifting salmon
#

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

storm adder
#

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.

drifting salmon
#

yeah and everyone knows meat should be with tin

storm adder
#

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.

drifting salmon
#

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

storm adder
#

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.

drifting salmon
#

problem is, with ogadei's world I'm using for testing, there are 1000+ deliveries in just 30 minutes

storm adder
#

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.

drifting salmon
#

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

storm adder
#

Makes sense.

agile ruin
#

Do I need to have as many depos as I have trains?

#

Or can I have more trains than there are depos

drifting salmon
#

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

agile ruin
#

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

drifting salmon
#

what you're describing are "bufferless" stations, which do work like you've described

storm adder
#

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.

drifting salmon
#

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

agile ruin
#

Oh so bufferless provider stations will always take a train even though there are no requesters that need that item at the moment?

drifting salmon
#

exactly

storm adder
#

Buffer-less providers just treat the train wagon itself as the buffer.

drifting salmon
#

yeah but they also act as effectively "constant" users of trains, so you don't need as many depots

storm adder
#

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.

agile ruin
#

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

drifting salmon
#

unless ALL of your providers are bufferless, you will need some depots though

agile ruin
#

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

storm adder
#

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.

drifting salmon
#

all bufferless sounds neat and should work

storm adder
#

So the true calc is that you want [depot + bufferless-provider > train count]

#

Very interesting. I hadn't considered using bufferless in that way

drifting salmon
#

depot + (bufferless provider * train limit) >= train count

storm adder
#

Ohhhh, trueeeeee

agile ruin
#

I went with this route because I'm using loaders so buffering at stations doesn't really provide anything meaningfull for ores

drifting salmon
#

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

storm adder
#

Multi-providers are so satisfying.

agile ruin
#

Yeah I can see them being very useful

storm adder
#

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.

drifting salmon
#

all of my ore still gets caravaned lmao

#

into an outpost where the station will eventually be

storm adder
#

I never set up caravans.....

#

Don't tell everyone over on the pY discord, they'll make fun of me.

drifting salmon
#

wait till this thread finds out I'm yet to actually place any trains in my real world

storm adder
drowsy palm
#

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?

drifting salmon
#

It's hard to know without more info, would you be able to share screenshots of the station guis?

drowsy palm
drifting salmon
#

I think you might have an extra zero in delivery size

#

your stations don't have/need enough items

drowsy palm
#

Ah that was the problem!

#

My math was waaaaay off on the delivery size lol

storm adder
#

16k would indeed be a lot of delivery

drowsy palm
#

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.

storm adder
#

That's rough ๐Ÿ˜•

drifting salmon
#

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

drowsy palm
#

Something about registering the station

drifting salmon
#

Could you share a screenshot of the crash? A save would be even better

drowsy palm
#

It crashes on launch so no save needed

drifting salmon
#

Oh huh

#

Looks like LTN is doing something weird

#

I should be able to work around it though

storm adder
#

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

drifting salmon
#

I haven't put a lot of thought into two way stations like that, but does setting dynamic modes work?

storm adder
#

that might be the ticket

drifting salmon
#

So that the station doesn't try to provide and request at the same time

storm adder
#

even if i dont make them dynamic, just having the explicit declaration of operation modes might work

#

well.....

#

hmmm

drifting salmon
#

Yeah dynamic mode also functions as a simple on/off switch

storm adder
#

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

drifting salmon
#

You combine the mode with a decider

#

You want the storage to be shared anyway I would think

storm adder
#

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

drifting salmon
#

It kind of seems like logically you have just made two stations here

storm adder
#

the General_I/O is seeing 2.1k biomass.

#

which means it's primed for being a Source.

drifting salmon
#

Ngl I've had about 4 hours sleep in the last 48 hours so I'm not gonna be much help rn

storm adder
#

yea, no worries, i'll figure it out (or reasonably convince myself that it's unsolveable)

drifting salmon
#

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

storm adder
#

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

storm adder
#

hmmWiggle

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.

drifting salmon
#

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

drifting salmon
#

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

storm adder
#

I'll have to do a think on it.

#

I must be too smooth brain.

drifting salmon
#

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

storm adder
drifting salmon
#

I wonder what happens if a station tries to deliver to itself actually ๐Ÿ˜›

#

I think it should "work"

storm adder
#

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.....

drifting salmon
#

even if the numbers are the same

#

they just need to be at least 2 deliveries worth

storm adder
#

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

drifting salmon
#

(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)

storm adder
#

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.

drifting salmon
#

On my (mental) TODO list is a detailed tooltip for the "storage needed" value that will show you the whole formula with numbers

storm adder
#

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)

drifting salmon
#

I'm pretty sure I have linked the relevent bits to you before

storm adder
#

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"?

drifting salmon
#

yeah pretty much

storm adder
#

I bit awkward, but understandable.

drifting salmon
#

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

drowsy palm
drifting salmon
#

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

drowsy palm
drifting salmon
#

oh, yeah I'm dumb

drowsy palm
drifting salmon
#

oh my gosh

#

why is my zip program doing this

#

slightly embarrassed XD

drowsy palm
#

it happens

drifting salmon
#

please tell me that one worked

drowsy palm
#

it launches without crashing

#

and the mod is detected

drifting salmon
#

yaaay

#

yeah, the first two zips just had the wrong folder name within the zip

drowsy palm
drifting salmon
#

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

drifting salmon
#

wooooo

drifting salmon
drifting salmon
storm adder
#

What happens if you try and press the "reorder" up/down buttons while it's searched?

drifting salmon
#

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

storm adder
drifting salmon
#

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

agile ruin
#

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?

storm adder
#

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

drifting salmon
#

You can't have duplicate entries for items like that

storm adder
#

Oh, I thought you could

#

Odd

#

Good to know

drifting salmon
#

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

storm adder
#

And that's because a station can only have 1 provide entry for a given item?

drifting salmon
#

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

storm adder
#

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?

drifting salmon
#

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

storm adder
#

To clarify; the network as a whole won't allow multiple declarations of the same item type?

drifting salmon
#

No that's exactly what it would be

storm adder
#

I see. Unfortunate.

drifting salmon
#

Basically there'd be "iron plates a" and "iron plates b"

storm adder
#

Can't even shove 2 stations into the same spot with the 2 stations in series trick.

drifting salmon
#

I think people tend to greatly overvalue how useful the feature would be

storm adder
#

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.

drifting salmon
#

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

storm adder
#

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.

drifting salmon
#

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

storm adder
#

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.

drifting salmon
#

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

storm adder
#

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.

drifting salmon
#

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

storm adder
#

Hmmge
I believe this gets into "buffered intersections" vs "non-buffered intersections", which I've never bothered even learning what the distinction is there.

drifting salmon
#

They also barely matter if you use small trains ๐Ÿ™‚

#

Buffered intersections also are a lot less useful with elevated rails

drowsy palm
#

How do I assign a class to a station? I need multiple classess transporting the same item

drifting salmon
#

the mod does not currently allow that, sorry

drowsy palm
#

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

drifting salmon
#

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?

drowsy palm
#

Fluids such as Petrol and Lubricant

#

I had set up a buffer for the long distance trains to unload into the reversable "shuttle" trains

drifting salmon
#

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

drowsy palm
#

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

drifting salmon
#

is there no way to just connect it to the main rail system and use your normal bidirectional trains?

drowsy palm
#

I can but the bidirectional trains are not as fast which is why I wanted two different train classes

drifting salmon
#

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

drowsy palm
#

that would work, if I wasnt loading and unloading multiple items at the same station ๐Ÿ™‚

drifting salmon
#

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)

drowsy palm
#

Those are Krastorio2 fluid tanks

#

also noticed this

drifting salmon
#

I thought I already fixed that???

drowsy palm
#

ยฏ_(ใƒ„)_/ยฏ

drifting salmon
#

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

peak sluice
#

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.

drifting salmon
#

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

peak sluice
#

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

peak sluice
#

Do you mean stacking on the belts?

drifting salmon
#

I mean shipping deadlock stacks of items on trains instead of unstacked items

#

That saves a lot of train trips

peak sluice
#

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.

drifting salmon
#

oh huh

#

I think I was getting mixed up with some of your other items which do have custom stack sizes

peak sluice
#

ok

drifting salmon
#

are you sure?

#

iron ore normally stacks to 50, if scaled down this would be 5

peak sluice
#

Not in my version of the game. Perhaps Py changes it?

drifting salmon
#

yeah normally ore only stacks to 50, including in vanilla

peak sluice
#

OK. I've probably loaded a mod that increases it

drowsy palm
#

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

drifting salmon
#

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

peak sluice
#

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?

drowsy palm
#

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?

drifting salmon
#

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.

drifting salmon
#

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

peak sluice
#

Thank you!

peak sluice
noble furnace
#

Sorry for delay. It works

agile ruin
#

If a station requests multiple items, will a single train do multiple items or will there be separate trains for each item?

drifting salmon
#

Multiple trains

#

Which is intentional, don't worry about grouping related items together at stations

storm adder
#

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.

agile ruin
#

Was just wondering, I have some stuff that has quite a few ingredients and not enough space for a station per iten

storm adder
#

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)

peak sluice
#

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.

arctic ibex
#

I tried browsing through this channel and google, but does anyone know of a tutorial video on how to get this to work?

peak sluice
#

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?

arctic ibex
#

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

peak sluice
#

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 ๐Ÿ™‚

arctic ibex
#

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

peak sluice
#

I tend to put a save onto Google Drive and share it that way. Are you familiar with that?

arctic ibex
#

yeah I can do that one sec

peak sluice
#

I don't have the space age expansion, btw. I've only got the vanilla game

arctic ibex
#

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

peak sluice
#

Thanks, let's try it anyway. Can you make the link public?

arctic ibex
#

sorry forgot that step. should be done now

peak sluice
arctic ibex
#

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

peak sluice
#

OK. The key problems that I had are:

  1. 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.

  2. 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.

  3. 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)

  4. 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.

  5. 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?

arctic ibex
#

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?

peak sluice
#

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.

arctic ibex
#

i guess thats the part I am missing. how do I configure it to a class?

peak sluice
#

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:

arctic ibex
#

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

peak sluice
#

The train needs to be in manual mode for you to change it

arctic ibex
#

perfect i think I got it sorted

peak sluice
#

Great

arctic ibex
#

thanks so much

peak sluice
#

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

arctic ibex
#

gonna have to play with the throughput numbers but Its largely working

drifting salmon
#

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

drifting salmon
#

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.

storm adder
agile ruin
#

Depos shouldn't have more than one train, right?

storm adder
#

Yep

#

#1329785565863874610 message

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.

drifting salmon
#

That discussion was just about finding depots with limits other than one so that they can be set to one

agile ruin
#

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

agile ruin
#

Unless there is support for like multiple networks per surface?

drifting salmon
#

Multi network per surface is planned, but not supported yet, sorry

drifting salmon
#

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

peak sluice
#

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.

drifting salmon
#

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

peak sluice
#

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?

drifting salmon
#

What is the stack size on your modules?

#

Also throughput can be less than one

peak sluice
#

That's 1,000

#

Ah, I can use fractions?

drifting salmon
#

0.5 would be one every 2 seconds

peak sluice
#

OK. I didn't realise that fractions are OK

drifting salmon
#

Yeah, that's pretty common for more expensive items in overhauls

peak sluice
#

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. ๐Ÿ™‚

drifting salmon
#

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

peak sluice
#

Having a minimum of the stack size is unfortunate.

drifting salmon
#

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

peak sluice
#

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

drifting salmon
#

Not sure what you mean, there shouldn't be extra ones

#

The point of granularity is that it prevents overshooting the target

peak sluice
#

I see trains that don't have whole numbers of stacks

drifting salmon
#

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

peak sluice
#

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.

drifting salmon
#

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

peak sluice
#

OK, thanks. I'll use fractions ๐Ÿ™‚

drifting salmon
#

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

peak sluice
#

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.

drifting salmon
#

I really feel like a lot of your issues are coming from the massive stack sizes

peak sluice
#

Maybe true. But I feel that the algorithm is wrong even with small stack sizes.

drifting salmon
#

That's just going to happen if you can only make a deliveries worth of items every 20 minutes or so

peak sluice
#

Look at this one:

#

Why is the deficit 13289, when the throughput is now 0.01?

drifting salmon
#

Hmmm

#

That does look wrong

#

You sure stack size is only 1000?

peak sluice
#

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 ๐Ÿ™‚

drifting salmon
#

Yeah maybe just tweak the ones you want big

#

5000 for modules seems very odd

peak sluice
#

I agree

drifting salmon
#

Though I think the deficit should still be no more than 10000

peak sluice
#

But, for very large bases when things spread all over, the "delivery time" is pretty impossible to set at a class level

drifting salmon
#

So it may be slightly off

#

Should be clamping at 2 slots, but maybe it doesn't handle delivery size < stack size properly

peak sluice
#

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.

drifting salmon
#

I'm not following

#

I think it would probably be better to just add an option to not clamp to stack sizes, yeah?

peak sluice
#

That might work. Because i don't know the calculations, I can't be sure

drifting salmon
#

The issue does seem to be that you just want to send very small amounts

peak sluice
#

In this case, I'm trying to get it to spread the slow supply across several receivers

drifting salmon
#

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

peak sluice
# drifting salmon The issue does seem to be that you just want to send very small amounts

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.

drifting salmon
#

When I can I'll add an option to remove the rounding to stack sizes

peak sluice
#

OK

drifting salmon
#

I suspect that that with smaller delivery sizes will make the problem go away entirely

peak sluice
#

OK, let's try that.

peak sluice
#

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?

peak sluice
#

I'm trying to work out why the iron plates are not being transported:

drifting salmon
#

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

drifting salmon
#

One for the delivery, one for a buffer from push stations, one for a buffer from source stations

#

I was tired I guess

peak sluice
#

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

drifting salmon
#

I'm not sure if there is an issue here other than the tooltip for demand not being more detailed

peak sluice
#

Do you remember we had a chat in the forums about having a way to make disabled stations more obvious?

drifting salmon
#

Yeah, right

#

Still not 100% sure the best way to do that

peak sluice
#

I think the Network GUI display would / might be a way to do it. I use it a lot; it's great

drifting salmon
#

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

peak sluice
#

Another tab feels like quite a lot of work for this, though

#

listing them doesn't help you find them

drifting salmon
#

It'd be filterable

peak sluice
#

I mean for when the base gets big and messy.

drifting salmon
#

Well they'd be clickable, like the current minimaps are

peak sluice
#

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

drifting salmon
#

Adding more filters for the existing item stations minimaps view could also help

peak sluice
#

But having an extra count in the station column here would make it jump out at me:

drifting salmon
#

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

peak sluice
peak sluice
drifting salmon
#

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

peak sluice
#

OK

drifting salmon
#

Like there are a lot of other things that can cause a station to not function, other than just being disabled

peak sluice
#

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.

drifting salmon
#

@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

peak sluice
#

Thank you

drifting salmon
#

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

storm adder
#

Oooh. Looks fancy

storm adder
#

O_O this'll be useful for separating fluids of the same type, but different temps

peak sluice
#

(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).

drifting salmon
#

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)

peak sluice
#

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.

peak sluice
#

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.

drifting salmon
#

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

peak sluice
#

That's entirely possible.. I'm going through the base and trying to rationalise it!

drifting salmon
#

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

peak sluice
#

I wonder how it ended up being missed, then

#

doesn't matter

drifting salmon
#

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

peak sluice
#

I remember that, too. I think it doesn't matter, as no-one else will hit the problem, going forward

drifting salmon
#

the fix of just switching the train to manual before it crashes seems to still work

peak sluice
#

OK. I just deleted the train. That works, too.

drifting salmon
#

ah cool, all good then

drowsy palm
#

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

peak sluice
#

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?

drowsy palm
#

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

storm adder
#

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

drifting salmon
#

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

drifting salmon
#

multiple networks per surface is up!

drifting salmon
#

ok time for an easy feature, the ability to turn off rounding amounts up to stack size

peak sluice
#

yay

drifting salmon
#

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

peak sluice
#

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?

drifting salmon
#

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)

peak sluice
#

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)

drifting salmon
#

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

peak sluice
# drifting salmon at most, I would want to maybe nudge one station up a bit temporarily (add a bun...

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.

drifting salmon
#

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

peak sluice
#

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

drifting salmon
#

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

peak sluice
#

I rarely have that as a problem. I'm not coping with lots of complex recipes

drifting salmon
#

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 ๐Ÿ™‚

peak sluice
#

There are many ways to play. SSPP is coping very well with my base, and I think I'm pushing it quite hard, now

drifting salmon
#

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?

peak sluice
storm adder
#

I'll have to catch up with the conversation

storm adder
#

Alrighty, let's take a look.

storm adder
# drifting salmon thoughts on this layout for threshold information?
  • 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.
storm adder
# peak sluice I'll think about it for a few days. I still don't like the throughput thing. I w...

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.

storm adder
drifting salmon
# storm adder - You're pushing stone and sourcing silver. - The station chest needs to have 6...

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.

drifting salmon
drifting salmon
#

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 ๐Ÿ˜„

drifting salmon
#

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

drifting salmon
#

next version is pretty much done, just waiting on some translation updates

storm adder
#

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

peak sluice
peak sluice
peak sluice
drifting salmon
#

oh, that's unexpected, I'll take a look

drifting salmon
drifting salmon
#

ah, I see, yeah the mod has a dirty secret, I don't bother migrating open GUIs between versions

peak sluice
#

Ah! lol. It's always the edge conditions that kill you ๐Ÿ™‚

drifting salmon
#

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

peak sluice
#

OK, thanks

drifting salmon
#

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

peak sluice
#

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

peak sluice
#

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.

drifting salmon
#

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

peak sluice
#

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.

drifting salmon
#

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

peak sluice
#

OK

drifting salmon
#

so they get a lot closer to running out than they should

peak sluice
#

Looking at it, there is no steady state burn while stationary. There is a big hit when it accelerates

drifting salmon
#

yeah stationary trains consume no fuel, and they consume less when coasting

peak sluice
#

This one is not going to make it to the front ๐Ÿ™‚

drifting salmon
#

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

peak sluice
#

The batteries do claim that they are 50 MJ in my game.

drifting salmon
#

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

peak sluice
#

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!

drifting salmon
#

hahaha, did they all just happen to go flat at around the same time?

peak sluice
#

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

drifting salmon
#

ah, yeah

peak sluice
#

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.

drifting salmon
#

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

peak sluice
#

They're much quicker; which is why I like them

drifting salmon
#

fixed for the next version!

#

was a lot simpler than I thought it would be, should have done it sooner

drifting salmon
#

new version is up

peak sluice
#

thanks

peak sluice
#

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!)

drifting salmon
#

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

peak sluice
#

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?

drifting salmon
#

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

peak sluice
#

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 ๐Ÿ™‚

drifting salmon
#

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

peak sluice
drifting salmon
#

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

peak sluice
#

OK

drifting salmon
#

After your cleanup, do send me a save. Would make for a pretty good benchmark.

peak sluice
#

Will do

#

I'm at 251 trains, 1010 stations (about 800 are SSPP, the others are depots).

drifting salmon
#

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

peak sluice
#

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?

drifting salmon
#

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

agile ruin
#

Is there some kind of warning if there are requests that need to be done but no trains are available?

drifting salmon
#

You can look at the network class page and check the available train count

#

No special warning but it really isn't needed

peak sluice
# drifting salmon For requesters it especially wouldn't make sense, since it's common for a reques...

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?

drifting salmon
#

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

peak sluice
sturdy halo
#

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

drifting salmon
#

Oh darn, that's not good, can you send a save?

sturdy halo
#

yes

drifting salmon
#

@sturdy halo any update? I'd like to get the issue fixed ASAP but I do need to sleep ๐Ÿ™‚

sturdy halo
#

i messaged u

drifting salmon
#

oh my bad, thanks

#

That mod effectively destroys and recreates trains whenever they finish at a station, which would cause SSPP to forget about them

sturdy halo
#

understood thank u!

drifting salmon
#

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

sturdy halo
#

i was considering removing it anyway as it had other issues

drifting salmon
#

It's a cool concept, sadly the game doesn't have a good way to let mods modify train speed like that

sturdy halo
#

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

drifting salmon
#

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.

sturdy halo
#

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

drifting salmon
#

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.

sturdy halo
#

oh word, thank u

peak sluice
# drifting salmon After your cleanup, do send me a save. Would make for a pretty good benchmark.

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..)

drifting salmon
#

excellent, this will be extremely useful

drifting salmon
#

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)

drifting salmon
#
โ”ƒ 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

drifting salmon
#

I suspect that the best way to improve UPS in your base would be to simplify your intersections

storm adder
#

I should address my intersection design....

drifting salmon
#

I believe the version on right should be a decent amount friendlier for the pathfinding algorithm, and also wouldn't cause congestion as often

storm adder
#

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.

drifting salmon
#

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

storm adder
#

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"?

drifting salmon
#

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?

storm adder
#

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.

drifting salmon
#

It shouldn't

#

I meant were THOSE stations at their train limit

storm adder
#

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?

drifting salmon
#

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

storm adder
#

i'm attempting to recreate the situation now.

drifting salmon
#

Being at train limit is not the same as having requests satisfied

storm adder
#

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?

drifting salmon
#

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"

storm adder
#

hmmmm

drifting salmon
#

Rather than having the train go and dump its cargo at a sink and cause the pull station to miss out

storm adder
#

that makes sense.

drifting salmon
storm adder
#

oh

#

ofc i see the glaring issue after sending the save

drifting salmon
#

hahaha, what was the problem/cause

storm adder
#

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

drifting salmon
#

Oh, that does remind me that I should add a sanity check for that

storm adder
#

alternatively, being able to just say "1 train full" as delivery size, would be 10/10

drifting salmon
#

Technically classes can have trains with different capacities

#

though I guess then one train full would just be whatever the minimum is

storm adder
#

[wagons * slots per wagon * stack size of item] ?

#

cos the train class knows how many total slots the train is gonna have, right?

drifting salmon
#

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

storm adder
#

ah, ye, idk if the implementation gets fuzzy there.
a sanity check message would also save me from being dumb (mostly)

drifting salmon
#

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

storm adder
#

one of my stations things it has "negative negative seven hundred"

drifting salmon
#

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

storm adder
#

it's got an extra "-" tho

drifting salmon
#

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

storm adder
#

ah

drifting salmon
#

its weird but I'm not sure there is a non-weird way to show that

storm adder
#

anyways, the station that is providing quartz ore has the "train sits around waiting full of cargo" issue

drifting salmon
#

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

storm adder
#

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

drifting salmon
#

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

grand warren
#

Is there a known issue with using SSPP stuff in editor mode (to build BPs)

drifting salmon
#

not that I know of, 95% of my time has been in the editor

#

are you having some problem in particular?

grand warren
#

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

drifting salmon
#

aaah, you mean blueprint sandbox

grand warren
#

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 ๐Ÿ˜„

drifting salmon
#

perfectly reasonable to ask, but no, I've not made one yet

grand warren
#

I'm not normally railbrained but on this pY run I should really be haha

drifting salmon
grand warren
#

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

drifting salmon
#

for now at least there are likely some issues with blueprint sandbox specifically

agile ruin
#

Absolute work of art

#

Dual station

drifting salmon
#

each surface has a default network, but blueprint sandboxes use a special surface which doesn't really make sense to have a normal network

grand warren
#

fair

drifting salmon
#

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.

grand warren
#

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

drifting salmon
#

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

drifting salmon
agile ruin
#

It's this mod

drifting salmon
#

Oh that's awesome

agile ruin
#

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

grand warren
drifting salmon
#

if the status is "waiting for request", is the highest priority station requesting that item at it's train limit?

drifting salmon
agile ruin
grand warren
drifting salmon
#

oh huh

#

I use that mod haha, never realised it had a lab mode

drifting salmon
#

@grand warren the lab surface from Editor Extenstions is now supported, let me know how it goes!

grand warren
#

sweet!

peak sluice
# drifting salmon I suspect that the best way to improve UPS in your base would be to simplify you...

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.

drifting salmon
#

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

grand warren
#

silly q - is there any examples of multi-provided fluid stops?

#

I guess you do just one pump and the set filter does it

grand warren
#

but how-2-plumb it so nothing gtets stuck in a pipe?

drifting salmon
#

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

#

You can do multi fluid providers without that mod but finding granularity is trial and error

peak sluice
# drifting salmon The entire thing is one block so any train using the intersection in any way blo...

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. ๐Ÿ™‚

peak sluice
drifting salmon
peak sluice
#

That's a very interesting idea

drifting salmon
#

I know a lot of megabasers swear by intersections like that

agile ruin
#

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

drifting salmon
#

not currently no

storm adder
#

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?

drifting salmon
#

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.

peak sluice
#

How fast is your perfect pump? Is it faster than three normal ones (3600/s)?

drifting salmon
#

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

peak sluice
#

OK, thanks. Pressure isn't an issue for me. I'm just being greedy to get the trains going quickly.

storm adder
agile ruin
#

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

agile ruin
#

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

storm adder
#

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.

agile ruin
#

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

storm adder
#

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.

drifting salmon
#

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

storm adder
#

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.

storm adder
#

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.

drifting salmon
#

I think a lot of py players just skip the mk2 and mk4 wagons

#

And just upgrade the locomotives

storm adder
#

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

drifting salmon
#

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

storm adder
#

hmm_spin you would if the delivery size was to have all wagons full, right?

drifting salmon
#

The issue is loading them evenly and not having stuck fluid

#

Two pumps connected to the same pipe won't pump at predictable speeds

storm adder
#

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?

drifting salmon
#

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

storm adder
#

ducknotes and those pumps from tank -> shared, they need to disable once the remaining to-be-loaded is low?

drifting salmon
#

If granularity is set, then when it's zero

storm adder
#

and granularity is... the finicky bit

#

cos it's gonna be dependent on the total capacity of the shared pipe

#

?

drifting salmon
#

Except with perfect pumps its always the same

#

400

storm adder
#

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)

drifting salmon
#

Oh hmm

storm adder
#

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

drifting salmon
#

I'm pretty sure I tested those...

#

Yeah I know they are weird

#

Does it work with the front wagon

storm adder
#

doesnt seem to be any location on the wagons where i can place the PP's and have them engage

drifting salmon
#

Weird, I'll have to have a look when I get the chance

#

They don't solve the main issue with multiple wagons anyway

storm adder
#

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!

grand warren
#

Anyone any ideas on how to multi-provide w/ loaders?

drifting salmon
#

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

grand warren
#

Ohhh

#

I was thinking in per/s so tried multiples of 15

#

but you're right, it's 8 * n loader pairs

grand warren
#

hm, 8 * 2 for 2 loader pairs left 12 on the belts

drifting salmon
#

They might hold more than 8

#

You should be able to see just by hovering over them with the mouse

grand warren
#

yeah it's 8

#

4+4

drifting salmon
#

You have set filters enabled for the loaders connected to the storage?

grand warren
#

ofc

drifting salmon
#

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

grand warren
#

ahhh

#

yes

drifting salmon
#

Need to add a loaders guide to the wiki

grand warren
#

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

grand warren
#

18 as a granularity seems to work ๐Ÿคทโ€โ™‚๏ธ

drifting salmon
#

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

drowsy palm
#

Hi

peak sluice
#

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

drifting salmon
#

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

peak sluice
#

OK, that makes sense. Thanks

peak sluice
drifting salmon
#

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

peak sluice
#

OK, thanks

peak sluice
#

Can SSPP work with "nuclear fuel" for the locos?

drifting salmon
#

Should work with any fuel

peak sluice
#

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

drifting salmon
#

The refuel thresholds work on mj, and know the amount left in the burner

#

So it shouldn't care about the stack sizes

peak sluice
#

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?

peak sluice
#

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 ...

#

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?

drowsy palm
drifting salmon
drifting salmon
drifting salmon
#

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.

peak sluice
shell fulcrum
# drifting salmon Oh, you need to enable the inactivity condition

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.

  1. The inactivity setting is essential. Would you be against making this the default behavior if a station has any fluids enabled?
  2. 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.
  3. 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?

drifting salmon
#

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 ๐Ÿ™‚

shell fulcrum
#

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.

drifting salmon
#

Yeah the issue is that the safe threshold is different for every station

shell fulcrum
#

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

drifting salmon
#

I'm pretty sure granularity is just a plain subtraction

#

It used be more complicated but I simplified it

#

Either way works anyway ๐Ÿ™‚

shell fulcrum
#

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

GitHub

Opinionated Logistics Train Mod for Factorio. Contribute to jagoly/SourceSinkPushPull development by creating an account on GitHub.

drifting salmon
#

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:

#

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)

storm adder
#

Hmmge
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")

storm adder
#

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.

drifting salmon
#

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

storm adder
#

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.

buoyant oriole
#

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.

drifting salmon
#

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.

storm adder
#

I'm (relatively) experienced using the mod. feel free to ping me with any questions and i'll try to answer.

shy shadow
#

so, the mod is dead? 4 months, still waiting for bug fixes sadge

drifting salmon
#

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.