[MOD 0.15] SmartTrains 2.0.5

Topics and discussion about specific mods
Steven_McWayne
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Apr 18, 2016 1:18 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Steven_McWayne »

I've got it working somehow. Looks like a mess but i think i've debugged it.
If anyone want to check
http://www.filedropper.com/trainstation_1

terror_gnom
Fast Inserter
Fast Inserter
Posts: 117
Joined: Wed Apr 06, 2016 4:01 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by terror_gnom »

I started to build exactly that: A logistic network for trains, where you got 3 station types: loading (passive provider), unloading (requester), waiting (even trains want a evening off :lol: ).
Different lines will be different kind of trains (e.g. 1 line for iron, copper, coal and stone with 2-6-2 trains, 1 line for oil with 1-2-1 with filtered wagons, etc) so that your FARL wont run to a outpost to fetch copper, but is waiting in the base for you to realize that you´re 1 belt short at the outpost 10 mins away^^

poorly i´m missing 2 things in this mod to do so (or I´m just to stupid and/or lazy to work around them :P ):

1) make trains unique (each train gets a unique number, so I can check whether the requested train arrived. If you wont do me that favor and add it to the mod, each train gets one wagon full of raw fish for this number :P ) *edit2* why did I thought it mattered which train comes back? only the load counts...
2) please let me edit the station numbers, so i can easily adjust them (like it is with the line numbers yet, its just insane to create a line for each possible connection :( )

would be great if this is possible :)

*edit* I saw xeteth wants do do the same... hmmm :D

User avatar
DemiPixel
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Mon Mar 21, 2016 7:27 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by DemiPixel »

First post, can't post URLs...

User avatar
DemiPixel
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Mon Mar 21, 2016 7:27 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by DemiPixel »


alaeth
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Apr 21, 2016 2:57 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by alaeth »

Struggling with how to accomplish a couple things:

I've been using a simple threshold rule for copper and iron for quite some time, but as I expand my supply locations, I am in need of a more complex layout.

First Problem - multi-supply depots:
I want to have a list of supply depots with one unloader station.
Each supply depot has the signal rule "goto station X" (X being the unloader/main-base station).

My expectation is the trains will goto the first depot, and if not full, continue to the next, and so on... once full they return to unload and start back at the first supply station.
However, what actually happens is the trains all perform a merry tour of the world - full trains going to each station in turn before finally returning to unload...

Thoughts & mussings...
* Do I need a shorter/longer depot filling time? (currently set to 20s per depot, which is sufficient to fill given adequate supply in the station)
* do I need to re-order the stations? For my Iron line, there are five listed:
** Waiting - Iron x 3 (Smart Station - circuit network condition Iron < 10,000) - all named the same
** Depot1 - Iron (normal station)
** Depot2 - Iron (normal station)
** Depot3 - Iron (normal station)
** Base Unloading - Iron (normal station)

Second goal - single train, multi-station based on "goto station X":
This one baffles me, I watched the demo train run for what seems like hours, but I can't quite pin down the logic used at the "Decider" station.
I have a L-CC-L line that is general purpose. I'd like to have it service both the plastic and oil depots (depending on remaining supply).
* Right now I have a single train that just does a full tour - plastic pickup, oil pickup, return
* I'd like to use the logic in the Demo/decider station to send it strategically to "location X" when supply dips below a threshold.

I see the constant logic elements setting A = 2, B = 3, C = 4 - but I can't quite pin down how to implement them given a circuit condition of low plastic or oil (priority to oil)

Steven_McWayne
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Apr 18, 2016 1:18 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Steven_McWayne »

go to station x. a fixed value or signal value?

alaeth
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Apr 21, 2016 2:57 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by alaeth »

Fixed value in the Line definition:

http://steamcommunity.com/sharedfiles/f ... =673690293

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

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Choumiko »

First goal: If I understand correctly you are using "full" rule and "go to station #"? In the current release "full" ignores the goto rule. You will have to replicate the full rule with the signal rule and combinators. For single item cargo that's 1 or 2 combinators. 1 combinator variant: Decider with input from the Smart train stops cargo readout, set to Iron = 3000 (for a 2 wagon train) output set to "some signal" 1. Connect the output to the smart stop lamp with "some signal" > 0. 2 combinator variant would add an arithmetic with "cargo wagon signal" * -1500 and output as Iron in the decider, decider would output 1 when iron = 0.

The Depart rule you have set for your lines might screw things up a bit. Next version will make Depart available for lines on a per station basis and also it will allow full/empty to work with goto station/signal

Second goal:
Looking at the setup at the Decider the first time after creating the save: It's confusing.. :D
What all the deciders do is: (from left to right):
  • Single decider: Outputs 1 for each item in the trains cargo to Combinators 1, 2, 3 <- that's pretty important
  • 1: Iron > 0 -> Iron (Iron has top priority)
  • 2: Copper > Iron -> Copper (outputs only if there is 0 Iron in the train)
  • 3: Coal > Iron -> Coal (outputs only if 0 Iron in the train)
  • 4: Coal > Copper -> Coal (get's input only from 2 and 3, so it only outputs if there is no Copper or Iron in the train
It basically turns Iron, Copper and Coal into true/false values and does:

Code: Select all

If Iron then
  goto Iron unload
else
    If Copper then
      goto Copper unload
    else
     If Coal then
       goto Coal unload
     else
       goto Mixed mining
     end
  end
end
To match it to what you desire: Change iron to the signal for oil and Copper to signal for plastic. The combinators with coal can probably be removed.
To more easily look at the setup, set the rule for the decider station to full AND signal and set wait forever. This way you can put stuff in/out of the cargo wagon and see what each combinator does.

alaeth
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Apr 21, 2016 2:57 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by alaeth »

Choumiko wrote:In the current release "full" ignores the goto rule.
Ahh, that helps immensely! I shall re-jigger my depot stations to use a "goto 4" rule once it detects full.

If I understand correctly, if there is no signal condition, the train simply follows the normal route once the timer expires?



For the second question, it seems I can dramatically simplify the logic since I'm not checking the cars incoming - but rather the local circuit-network supply. Now I just have to get signals from my storage network since plastic is being sent off with Active provider chests... or I switch to smart chests and unload those to active providers based on the same "plastic < X" threshold... hmm...!

Steven_McWayne
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Apr 18, 2016 1:18 pm
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Steven_McWayne »

Yay i got my Setup working mostly bugfree now. (Reworked the train requester part from scratch)
I've got 1 station for a collector station like several mines.
It waits at "HQ" until a Mine saying it's full. If it's there and empties the mine it goes to another one if there is a Signal from it.
Also i busted out my resonance effects when 2 were signaling at the same time.

Also i made one for the other way around. A delivery station to get the iron plates to several factories.
Oh, also the stations check for fuel and send the train to refuel.

http://www.filedropper.com/test2_1

Xeteth
Fast Inserter
Fast Inserter
Posts: 158
Joined: Tue Feb 17, 2015 6:06 am
Contact:

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Xeteth »

So there I was - working away on my massive combinator controlled train system setup when suddenly...


Image

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

Re: [MOD 0.12.27+] SmartTrains 0.3.81

Post by Choumiko »

Updated to SmartTrains 0.3.82
  • Smart train stops no longer output any signal if no train is at the station
  • fixed error on Mac (152571)
If some of your combinator setups depend on the cargo signal for wagon count to be -1 when there is no train at the station you'll have to change them a bit. Existing smart train stops without a train will stop outputting the signal after the first train after the update leaves the station.
Steven_McWayne wrote:Yay i got my Setup working mostly bugfree now. (Reworked the train requester part from scratch)
Looks interesting xD I'll try figuring out the combinator stuff some time :)
Xeteth wrote:So there I was - working away on my massive combinator controlled train system setup when suddenly...
:lol:
alaeth wrote:If I understand correctly, if there is no signal condition, the train simply follows the normal route once the timer expires?

For the second question, it seems I can dramatically simplify the logic since I'm not checking the cars incoming - but rather the local circuit-network supply. Now I just have to get signals from my storage network since plastic is being sent off with Active provider chests... or I switch to smart chests and unload those to active providers based on the same "plastic < X" threshold... hmm...!
Yes, if the time expires they go to the next station, ignoring goto station#

Sounds about right. You could also get a mod that reads logistic network contents into combinators (Logisitics Combinators i think)

Steven_McWayne
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Apr 18, 2016 1:18 pm
Contact:

Re: [MOD 0.12.30+] SmartTrains 0.3.82

Post by Steven_McWayne »

Image

Image
Here you go Choumiko. Just don't ask me how this works because i totally don't know even if i engineered this.
Oh and sorry about that lack of english in there :P.

Dashie
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Apr 22, 2016 2:13 am
Contact:

Re: [MOD 0.12.30+] SmartTrains 0.3.82

Post by Dashie »

I have a mod Conflict using
base 12.29
SmartTrains_0.3.81
with
TheFatController_0.4.12+(same error with 0.4.13 // 0.4.11 works thuugh)

Image

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

Re: [MOD 0.12.30+] SmartTrains 0.3.82

Post by Choumiko »

Dashie wrote:I have a mod Conflict using
base 12.29
SmartTrains_0.3.81
with
TheFatController_0.4.12+(same error with 0.4.13 // 0.4.11 works thuugh)
Any other mods? I can't reproduce it on 0.12.30 with these versions.
Can you try updating to 0.12.30 and https://github.com/Choumiko/SmartTrains ... ag/v0.3.82 ? and see if it works?
I made the mistake of releasing 2 0.3.81 versions of SmartTrains.. Maybe this: https://github.com/Choumiko/SmartTrains ... g/v0.3.81f will solve it (it's the latest 0.3.81 :roll: )

Dashie
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Apr 22, 2016 2:13 am
Contact:

Re: [MOD 0.12.30+] SmartTrains 0.3.82

Post by Dashie »

i try it and let you know
yeah there a other mods but i debuged the issue down to these mods

edit : ok now it works thx

NoriSilverrage
Fast Inserter
Fast Inserter
Posts: 159
Joined: Mon Mar 21, 2016 1:19 pm
Contact:

Re: [MOD 0.12.30+] SmartTrains 0.3.82

Post by NoriSilverrage »

Is there a simple way to have a train alternate stations? Say you have 3 stations right next to each other, all with the same name. If only one train is running it'll just go to the same station over and over. Is there a way to have it rotate through all of them (assuming they are all open)?

Steven_McWayne
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Apr 18, 2016 1:18 pm
Contact:

Re: [MOD 0.12.30+] SmartTrains 0.3.82

Post by Steven_McWayne »

just put them all into the schedule list and the train goes to all the stations from top to bottom.
If that wasn't what you wanted you need to setup some sort of combinator setup.

User avatar
MtnDew
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sun Aug 02, 2015 3:29 am
Contact:

Re: [MOD 0.12.30+] SmartTrains 0.3.82

Post by MtnDew »

Just put your drop off station in between each one and it will go to one then back to the drop off then the next. Of course, you will have to rename the three into different names.

NoriSilverrage
Fast Inserter
Fast Inserter
Posts: 159
Joined: Mon Mar 21, 2016 1:19 pm
Contact:

Re: [MOD 0.12.30+] SmartTrains 0.3.82

Post by NoriSilverrage »

Ok I figured out a pretty slick way to do what I want (using lotsa smarttrain features). I'll make a post about it later in case anyone else is interested.

Post Reply

Return to “Mods”