!!

Not Registered?

Welcome!  Please register to view all of the new posts and forum boards - some of which are hidden to guests.  After registering and gaining 10 posts you will be able to sell and buy items on our N'porium.

If you have any problems registering, then please check your spam filter before emailing us.  Hotmail users seem to find their emails in the Junk folder.


Thanks for reading,
The NGF Staff.

Author Topic: Layout a la Smiff  (Read 7417 times)

0 Members and 1 Guest are viewing this topic.

Offline daversmth

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 138
  • Country: gb
    • Awards
Re: Layout a la Smiff
« Reply #75 on: February 29, 2020, 09:28:04 AM »
Thank you for your kind comments, and thank you for your interest.

The red dots on the control panel denote where you click the mouse on the panel to toggle the state of that turnout.

I usually run the trains using my own scripts and gui, but the turnout state can also be manually changed from the control panel. I sometimes do this when setting things up by using the JMRI webserver so I can get the control panel up on my Android tablet.

Offline DarrwestLU6

  • Trade Count: (0)
  • Full Member
  • ***
  • N Gauge Society Number: 28089
  • Posts: 436
  • Country: gb
  • Gender: Male
  • Getting back into N after a long break!
    • Awards
Re: Layout a la Smiff
« Reply #76 on: March 11, 2020, 10:05:25 AM »
very cool
Hogwarts to King's Cross - My layout under construction: http://www.ngaugeforum.co.uk/SMFN/index.php?topic=43358.msg536504#msg536504

Offline impinabox

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 46
  • Country: gb
  • Gender: Male
    • Awards
Re: Layout a la Smiff
« Reply #77 on: March 11, 2020, 06:33:08 PM »
Just discovered this thread - fascinating!  I'm trying to imagine where I would start with the algorithms for this.  Presumably a signal 'belongs to' a track section and that knows if there is a train in it.  If a train knows which track section it's in it can respond to the signals in that section - or the next section - which might depend on the state of a point?  Hmmm.

And how does it all start up?  This must be a bit like seeding a random number generator - if the start conditions are the same each time then you'll get the same sequence each time.  Do you inject a bit of randomness into the start and then see what happens?

Oh and nice footbridge too - looks like the PD James kit.  I bought one at Doncaster - had a quick look and shut the box again quickly!

Keep the updates coming, I'm really enjoying this.

Mike
If it's worth doing, it's worth doing badly.

Current layout project: Halfway - https://www.ngaugeforum.co.uk/SMFN/index.php?topic=48537.0

Online Paddy

  • Trade Count: (0)
  • Full Member
  • ***
  • N Gauge Society Number: 10732
  • 2mm Association Number: N/A
  • Posts: 1414
  • Country: gb
  • Gender: Male
    • Awards
Re: Layout a la Smiff
« Reply #78 on: March 11, 2020, 06:53:29 PM »
Some very neat ballast in there.

Paddy
HOLLERTON JUNCTION (SHED 13C)
London Midland Region
http://www.ngaugeforum.co.uk/SMFN/index.php?topic=11342.0


BARRIES'S TRAIN SHED - HIGHLY RECOMMENDED
https://www.youtube.com/channel/UChVzVVov7HJOrrZ6HRvV2GA

Offline daversmth

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 138
  • Country: gb
    • Awards
Re: Layout a la Smiff
« Reply #79 on: March 13, 2020, 09:42:34 AM »
Just discovered this thread - fascinating!  I'm trying to imagine where I would start with the algorithms for this.  Presumably a signal 'belongs to' a track section and that knows if there is a train in it.  If a train knows which track section it's in it can respond to the signals in that section - or the next section - which might depend on the state of a point?  Hmmm.

And how does it all start up?  This must be a bit like seeding a random number generator - if the start conditions are the same each time then you'll get the same sequence each time.  Do you inject a bit of randomness into the start and then see what happens?

Oh and nice footbridge too - looks like the PD James kit.  I bought one at Doncaster - had a quick look and shut the box again quickly!

Keep the updates coming, I'm really enjoying this.

Mike

Hi Mike,
Thank you for your interest.
To answer your points, a signal mast 'belongs to' either the entry node at one of the three tails of a point, or if no point, the entry node to the next block. The signals are three colour aspect, and are set to green, amber, or red based on the state of the point, occupancy of the next block, and the state of the next mast ( for amber or green ). This is all standard functionality provided by JMRI in their control panel so there is no need for any scripting to set up the signalling.

The control script I have written sets the speed of a train to fast, medium or slow (and eventually stop), depending whether the mast aspect is green, amber or red.

Startup is not automatic or randomised.
The script presents the user with a menu where they can decide which trains run and on what routes.



In this case D1005 is going to run for one iteration of a loop from block S1W back to S1W where it started.

Points will be set to the required state for that route as the loco proceeds from block to block - all done by the script.
If it is the only loco running it will whizz round with all green lights.
If other locos have been set off on other routes, the script will resolve any potential conflicts and halt locos as needed to allow others to pass. Well, most of the time anyway ...

Offline impinabox

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 46
  • Country: gb
  • Gender: Male
    • Awards
Re: Layout a la Smiff
« Reply #80 on: March 13, 2020, 10:02:36 AM »
... Well, most of the time anyway ...
Excellent - there's play value need for debugging there too!   :D
If it's worth doing, it's worth doing badly.

Current layout project: Halfway - https://www.ngaugeforum.co.uk/SMFN/index.php?topic=48537.0

 

Please Support Us!
March Goal: £60.00
Due Date: Mar 31
Total Receipts: £105.55
Above Goal: £45.55
Site Currency: GBP
176% 
March Donations


Advertise Here
SimplePortal 2.3.5 © 2008-2012, SimplePortal