[MOD 0.15] SmartTrains 2.0.5

Topics and discussion about specific mods
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by Choumiko »

If you look at a train stop or a trains schedule, there is a button "ST-Settings", click it and change "Interval for signals" to 12. No need to be code-savvy :D

MainTango
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Tue Oct 27, 2015 12:22 am
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by MainTango »

Ah, right. Many thanks :D

Creat
Inserter
Inserter
Posts: 41
Joined: Sun Jun 22, 2014 4:35 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by Creat »

Choumiko wrote:I'd like a save, as the ones i tried take the same time, whether it's version 3.73, 3.74 or 3.75
Don't know if it's still relevant as I only just sat down on my PC and the post is already a bit older, but the save is attached, if only for future reference (assuming I can upload the ~6MB here). As the name implies, this is a save where I'd already done a reset of ST and re-added the schedules/lines.
Update-Time for ST is down significantly after updating to 0.3.76. Without changing the "Interval for Signals" to 12 (leaving them at 2) ST needs about 3.8ms for the update. After changing it it drops to ~0.4 on my machine.

I might "feel" this issue more strongly than other people, because the single-threaded performance of my CPU is relatively weak (AMD FX-6100 wth 6 cores, but each core is slow). So if you have an Core-i5 or similar, you're single-threaded performance will be about double (at the very least).
Attachments
5Dim-RSO-STReset.zip
(6.43 MiB) Downloaded 124 times

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by Choumiko »

Creat wrote:Update-Time for ST is down significantly after updating to 0.3.76. Without changing the "Interval for Signals" to 12 (leaving them at 2) ST needs about 3.8ms for the update. After changing it it drops to ~0.4 on my machine.

I might "feel" this issue more strongly than other people, because the single-threaded performance of my CPU is relatively weak (AMD FX-6100 wth 6 cores, but each core is slow). So if you have an Core-i5 or similar, you're single-threaded performance will be about double (at the very least).
For me its down to ~2.6 (~0.4 for 12 tick interval) on a Phenom II X6 1055T

I guess the update works as good as it can for now :D

Btw, i noticed an issue with your circuit setup at station Iron E1, the train is full but doesn't leave. The -1 green signal from the buffer chests nullifies the +1 from the full cargo wagons :D

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by steinio »

Hello,

is it possible to just name the refuel station 'Refuel' so all trains independent from their setup could refuel there?

Otherwise anybody needs a lot of refuel stations for their setups...
L-C
L-CC
L-CCC
L-L
L-C-L
L-CC-L
L-CCC-L
LL-LL
LL-C-LL
LL-CC-LL... :D

Greetings steinio
Image

Transport Belt Repair Man

View unread Posts

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by Choumiko »

steinio wrote:Hello,

is it possible to just name the refuel station 'Refuel' so all trains independent from their setup could refuel there?

Otherwise anybody needs a lot of refuel stations for their setups...
L-C
L-CC
L-CCC
L-L
L-C-L
L-CC-L
L-CCC-L
LL-LL
LL-C-LL
LL-CC-LL... :D

Greetings steinio
That's how it should work: Trains first look for the correct refuel station (e.g. Refuel LL-CCCC-LL), if it doesn't exist they go to Refuel.
The thing with one for all is: What happens when a LL-CCCCCC-LL refueling station get's used by a L-CCCCC-L ? The cargo wagon is going to get contaminated with coal/whatever fuel you use :D

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by steinio »

Hello Choumiko,

thanks for your answer.
I will oberserve my train because i never saw it travel to the 'Refuel' station.
But maybe it does it while i was not watching :)
... or the min fuel level was not reached.

Greetings steinio
Image

Transport Belt Repair Man

View unread Posts

Creat
Inserter
Inserter
Posts: 41
Joined: Sun Jun 22, 2014 4:35 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by Creat »

Choumiko wrote:Btw, i noticed an issue with your circuit setup at station Iron E1, the train is full but doesn't leave. The -1 green signal from the buffer chests nullifies the +1 from the full cargo wagons :D
Yes, that's intentional, and the signal doesn't come from the buffer chests but from the base. The signal means "Depot still has stuff, no reason to bring more", so it's meant to nullify the "green" signal. The train only leaves when it's full and the depot actually needs the stuff (same or similar with all other stops in that map). That's why there's green wire running along the track, telling me a (normalized) value of how much is in the base. Thanks though :D

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by Choumiko »

Creat wrote:Yes, that's intentional, and the signal doesn't come from the buffer chests but from the base. The signal means "Depot still has stuff, no reason to bring more", so it's meant to nullify the "green" signal. The train only leaves when it's full and the depot actually needs the stuff (same or similar with all other stops in that map). That's why there's green wire running along the track, telling me a (normalized) value of how much is in the base. Thanks though :D
Oh ok, haven't followed the wires too closely.. But wouldn't it be basically the same if your trains only leave the unloading station/depot once they are empty or the depot has < X stuff? I guess your setup halves the time until resupply arrives at the cost of long wires :D

Creat
Inserter
Inserter
Posts: 41
Joined: Sun Jun 22, 2014 4:35 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by Creat »

Choumiko wrote:
Creat wrote:Yes, that's intentional, and the signal doesn't come from the buffer chests but from the base. The signal means "Depot still has stuff, no reason to bring more", so it's meant to nullify the "green" signal. The train only leaves when it's full and the depot actually needs the stuff (same or similar with all other stops in that map). That's why there's green wire running along the track, telling me a (normalized) value of how much is in the base. Thanks though :D
Oh ok, haven't followed the wires too closely.. But wouldn't it be basically the same if your trains only leave the unloading station/depot once they are empty or the depot has < X stuff? I guess your setup halves the time until resupply arrives at the cost of long wires :D
Yes and no: but since I only have one unloading station, and I have one train per outpost, they won't ever cause congestion that may or may not block something else. They are basically parked at their own station that nobody else uses. This way I'm sure trains are only coming if they're needed and can unload so they don't clog up the depot or main line.

MainTango
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Tue Oct 27, 2015 12:22 am
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by MainTango »

Are the 'leave when empty/full'-conditions combined with the signal, wait forever and signal value ones currently working? I've been fiddling with them for two hours now without any luck. I have my train line set up and the smart train stop is receiving a signal with a value that matches a station # in the schedule but the train just sits there forever, doing nothing. When I uncheck the 'wait forever'-boxes, the train will simply ignore the 'leave when empty/full'-condition.
Please help, I'm desperate :(

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by Choumiko »

It's working as expected for me
Image

The train waits at the first station until it is full AND until the signal is valid. Then he goes to the next station. If you want full OR signal then you will have to do something with combinators for the time being.

If it's not working as i described, do the /c remote.call("st", "saveGlob") things again please. And/or a save if you are absolutely sure your circuit setup is doing the right thing and is valid/stable for at least the # of ticks you have set in ST-Settings

MainTango
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Tue Oct 27, 2015 12:22 am
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by MainTango »

Still not working for me. Here are rules for the line:

Image


The smart train stop is getting a signal as seen here:

Image


However, it just sits there forever – even though, from what I understand it's supposed to go to station #2 as soon as the train is empty, right? As you've said, it's supposed to work like an AND-condition. I'm not trying to make it work like an OR-gate. The circuit signal is steady. I've set the interval for signal ticks to 12, as you've suggested.

Here are the contents of the debug log:

http://pastebin.com/Wc91vW8B

If you can't find anything there, as a last resort I can provide the save file.

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by Choumiko »

Did you set a condition for the lamp? (Green Signal > 0 should do) Only then SmartTrains knows which signal to actually check and when the Signal is valid ( Lamp is on -> train is good to go.

MainTango
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Tue Oct 27, 2015 12:22 am
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by MainTango »

Choumiko wrote:Did you set a condition for the lamp? (Green Signal > 0 should do) Only then SmartTrains knows which signal to actually check and when the Signal is valid ( Lamp is on -> train is good to go.
Holy crap, that was it!!! Please don't hate me for being retarded :oops: Thanks a bunch for helping out and for sharing your wonderful work :D

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by Choumiko »

MainTango wrote:Holy crap, that was it!!! Please don't hate me for being retarded :oops: Thanks a bunch for helping out and for sharing your wonderful work :D
Haha, no worries :D I think it's only mentioned somewhere in the thread when i introduced it, not in the first post though.

dylloop
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Aug 29, 2015 11:53 am
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by dylloop »

Im having a little trouble with refueling I have a station named Refuel L-CCCC-L but my trains keep running out of fuel. so i followed a train with just above minimum amount and it isnt adding the station at all.
If i check the refuel box that is to the right of marked it will go to the next station add the refueling and then instantly take it away. so again it never gets refueled? any help?
It seems like a bug to me because whenever the train stops at a station it the game freezes for a second then it adds refueling to the line but once it goes to take off game freezes for a second again the never goes anywhere until i open up train GUI and see that there is no refuel and the train stopped itself. so i restart and it does the same thing.

dylloop
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Aug 29, 2015 11:53 am
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by dylloop »

dylloop wrote:Im having a little trouble with refueling I have a station named Refuel L-CCCC-L but my trains keep running out of fuel. so i followed a train with just above minimum amount and it isnt adding the station at all.
If i check the refuel box that is to the right of marked it will go to the next station add the refueling and then instantly take it away. so again it never gets refueled? any help?
It seems like a bug to me because whenever the train stops at a station it the game freezes for a second then it adds refueling to the line but once it goes to take off game freezes for a second again the never goes anywhere until i open up train GUI and see that there is no refuel and the train stopped itself. so i restart and it does the same thing.
I think i figured it out actually if you open the train GUI it actually removes the station if i just sit and watch the train without touching anything it works but if i check to see if the station is there it removes itself.

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by Choumiko »

dylloop wrote:If i check the refuel box that is to the right of marked it will go to the next station add the refueling and then instantly take it away. so again it never gets refueled? any help?
It seems like a bug to me because whenever the train stops at a station it the game freezes for a second then it adds refueling to the line but once it goes to take off game freezes for a second again the never goes anywhere until i open up train GUI and see that there is no refuel and the train stopped itself. so i restart and it does the same thing.
The freezing for a second sounds a little worrying. Is it really a second?
Checking refuel next of marked (Trainlines window) will set all trains on that line to autorefuel. The refuel box on the top is for this specific train only, maybe this one should act the same way if the train is assigned to a line?
dylloop wrote: I think i figured it out actually if you open the train GUI it actually removes the station if i just sit and watch the train without touching anything it works but if i check to see if the station is there it removes itself.
Yes, when you close the gui of a train that is assigned to a line, it resets it's schedule, appareantly i should check if it needs refueling then also.

If it's working with your changes it all boils down to indicating that the GUI is confusing and needs an overhaul :D

Lemlin
Long Handed Inserter
Long Handed Inserter
Posts: 85
Joined: Thu Mar 17, 2016 10:25 am
Contact:

Re: [MOD 0.12.12+] SmartTrains 0.3.75

Post by Lemlin »

Is it possible for a train/line to send out a unique signal? Or to add that to this mod?

I´m thinking something like this:
IF train A stops at a station it send out signal "trainA". A smart inserter then loads coal on a transport belt which get delivered and loaded to the train.
Train B later stop at the same station and then send out signal "trainB". Another inserter now load iron on the belt.

I guess I could do something similiar with a dummy item in one of the wagons but it would be a lot easier if the train itself sent a signal like that.

Post Reply

Return to “Mods”