¿ªÔÆÌåÓý

Date

Locked Re: Full timetable automation - AutoDispatcher 2 - abstraction - documentation - scripting

 

James,
I have used AutoDispatcher to schedule and run 40+ trains at a "museum" a couple of years ago. I now use Dispatcher to run 5 trains on my small home layout. Both required considerable investment in time to understand fully, and both required extremely solid physical setup (trains, track, turnout control, detection, etc.).
AD is probably closer to what you desire, as you tell it when and where you want to go and the code finds the best path based on current occupancy, etc.
I've not used TC, but I've seen it in effective use. My take is that it limits the flexibility of the "panel" so that the routing logic becomes easier. Not a bad compromise if true. Of course, considerable time investment is required with that tool as well.

Regarding "abstracting" out the scheduling and running, I'd be very interested to see your track plan. In practice, there just aren't that many ways to get "there" from "here" on most model layouts. So things like transits become much less of an issue than they seem at first. With both of my tools, most of the "trick" is collision-avoidance, not routing and scheduling.

--SteveT


Locked Re: RPi-JMRI image updated

 

Hi Lindsay,
I tested it tonight with my PiSPROG-One, and it does not. :(
There are a couple of steps required to make it work. I've added them to my working copy, but I may not get a chance to upload a new image until after I return from vacation next week. Here are the steps if you'd like to give them a try, or you can wait until the new image comes out next week.
add these 2 lines to /boot/config.txt:
dtoverlay=pi3-miniuart-bt
enable_uart=1
then, remove the text:?
console=serial0,115200
carefully from the single long line of /boot/cmdline.txt

You'll also need to disable the AutoIdentify (use icon on the desktop), as the PiSPROG is not (yet) part of that logic.

Let me know how you get on,
? SteveT


Locked Re: Full timetable automation - AutoDispatcher 2 - abstraction - documentation - scripting

 

Thank you all for your replies - that is most helpful. I take it that nobody knows how AutoDispatcher 2 works or what its capabilities are? I have found a discussion about it on the JMRI Developers mailing list , but that refers to some documentation that I cannot find and dates from 2008, whereas the latest revision of that script is in 2011.

In relation to the abstract question of abstractions (!), the issue is, I think, that writing fully procedural logic for a non-trivial case is labour intensive and not very robust. It is not labour intensive compared to creating a system of higher level logic from scratch, of course, but it is very labour intensive compared to using already implemented and designed higher level logic in a specific case. To use a metaphor, it is a bit like the difference between maintaining a 'blog using WordPress compared to maintaining a 'blog using hand-crafted HTML in Notepad - it takes much, much more effort to write WordPress than it takes to write a few pages in Notepad, but, once WordPress is already written, it is vastly easier for somebody to create and maintain a 'blog using WordPress than using Notepad. Moreover, trying to use Notepad to maintain a 'blog that is regularly updated with lots of cross-linked pages which links need updating every time that a new post is added quickly becomes unmanageable, even though using Notepad to create a static website is perfectly feasible. Because what I am after is the layout equivalent of a dynamic 'blog rather than the layout equivalent of a static website, I am after the layout control software equivalent of WordPress (the self-hosted version that one can tinker with, to extend the metaphor rather furhter) rather than the layout control software equivalent of Notepad (or even Dreamweaver - does that thing still exist?). Of course, in theory, one could create WordPress in Notepad (or DreamWeaver) - but the amount of work involved in doing so would not feasible be just for the purpose of creating a single 'blog.

I hope that that metaphor makes sense and explains what I am after. Is the only way to get a WordPress like experience (without the trying to write WordPress in Notepad experience) to use software such as Traincontroller? That would be a shame if it were so, especially since my attempts this evening to see whether Traincontroller would run under Linux using Wine were unsuccessful (bizarrely, it was the user interface and not the layout hardware connexion that was the point of failure: I could get it to connect to my control station and throw turnouts and monitor sensors, but the throttle window would freeze the whole interface).

One other concern that I have is undocumented and inconsistent behaviour with the dispatcher, which I have posted about here, with only a partial solution to the problems that I have found so far. It is a concern because building timetabling logic on top of that is likely to exacerbate that inconsistency, and if, fairly early in my explorations with JMRI, I come accross quite a number of behaviours which are not readily explicable even after reading the documentation either at all or without a chance meeting with someone with experience of the software, I can foresee a very large number of similar problems obstructing reliable automated working in the future if I were to try to script this.

I am particularly interested in what people who have actually implemented timetable based automation on their layouts have achieved and how they have achieved it, so I am very interested to hear from David Parks. I have looked at the Cumberland West website with much interest; that is really a rather impressive layout.

As an aside, the difference in conventions between the way in which US layouts are operated compared to the way in which British layouts are operated intrigues me, and I do find the US style of operation (and the design of a layout built for the purposes of that sort of operation) of interest. One of the notable features of the US convention from a British perspective is the far greater emphasis on the operational aspect, whereas the British convention tends (albeit not universally by any means) often to treat operations as just a way of showing trains running on the layout without much thought about why a particular train is running in a particular place at a particular time.

That aside is not entirely off topic, since the US convention for model railroad operations is more likely to involve the kinds of automation that interest me than the more characteristically British approach, albeit much of the detail will be different, and there is likely to be far more of a focus on freight, whereas I am more interested in passenger operations.

I am thus very interested to learn more about how David has implemented the automation on the impressive Cumberland West layout, and, in particular, the extent to which this is procedural and the extent to which this uses higher level/abstracted logic so that changes to the schedule or even layout itself can be achieved by changing only data, not code. David - do you use a script similar to AutoDispatcher for the automation of Cumberland West? To what extent is the automation achieved by portable logic separated from data and to what extent is it achieved by logic that is specific to the layout and the timetable that you run?

Thank you all again very much for your replies - it is most helpful.


Locked Re: Scripts

 

I am sorry that this small step does not seem to help get some progress toward your goal. Many JMRI users run scripts without understanding the internal workings, only the results.

It is not clear to me that I understand the context of your intended application or your question.

Let me ask a trivial question that is, nevertheless, not clear to me: How many sensors does your first example need for moving two locomotives?

As written, the two examples at the end of the script each control a single hypothetical locomotive and have a sensor at each end of some undefined physically selected route. Each "object" of the class named "BnFModTest" provides an expanded capability to duplicate of the ability to control a locomotive, as was done in the BackAndForth.py script. It also allows one to provide customized forward and reverse speed settings for each train.

Part of what I inferred from your original post was that you have at least two trains running back and forth on two separate locations on your layout, each with two physically separated sensors. Total of four sensors for two trains, or six sensors for three trains. Did I misunderstand that part of the post?

Also, I thought that I understood that you wanted the ability to take advantage of your RailCom sensors and decoders to allow other trains to cross into or just through one of those routes without causing a false trigger to the back and forth train running in the same region. I did not question how you were going to manage the intrusion of a manually controlled train into the automatically controlled route, and just assumed that you have a large enough space between the two ends of the route to allow a sufficient time interval to avoid unpleasant results. Perhaps I got that wrong too?

Our club is strongly considering the use of the Digitrax Transponders on a new expansion that is still in the planning stage, and I have made several stabs at understanding the Reporter capabilities in JMRI. Clearly, without any hands-on experience, I have a long way to go. JMRI seems to treat the incompatible Transponder and RailCom in manner that allows common software.

We have used a variation of the BackAndForth script for a small portion of the existing layout from time to time and again for a scenic animation device that only rotates back and forth.

Any further information or questions will be appreciated,

Cliff


Locked Re: Operations - Somewhat complex senario - would like help

 

Thanks, but I am looking to understand how the C/I track type could really be used to allow the cars from storage to "pause" at the barge location and be picked up by another train to deliver...


Locked Re: NCE POWER PRO

 

¿ªÔÆÌåÓý

Good to hear. I'd recommend the ESU or RRCirKits cable, no further driver installation required as you already have one FTDI cable working.

Our Dropbox help page is equally applicable for OneDrive
<>

--?
Dave in Australia

The New England Convention 2018

On 15 Aug 2018, at 4:35 AM, Bob via Groups.Io <GMRC405@...> wrote:

Thank you for the help. I'm going buy another cable later. I now have both my computers up and running JMRI with Power Cab and Power Pro. Now to get them setup on One Drive for the roster info.


Locked Re: Scripts

 

Dear Cliff,

Thank you for the examples and the work you invested into them. Unfortunately, I am not familiar with the language and I must confess I cannot follow what is going on in them.

Let me ask a trivial question that is, nevertheless, not clear to me: How many sensors does your first example need for moving two locomotives?

Yours,
????????????? Gabor


Locked Re: Full timetable automation - AutoDispatcher 2 - abstraction - documentation - scripting

David Parks
 

We have been using automated running for over 15 years.? We used Winlock until they folded.? Then we moved to MRI Control Panel Warrants. ? We run multiple trains using Warrants overlapping in time every op session.? Mostly we use Warrants for stage train fetching.? Logix can launch warrants, but the primary capability missing is the ability to be driven from a flexible schedule.? A key is absolutely bullet proof layout control.? That we now have since converting the layout to LCC for everything except throttles.? Out goal is a mix of Automated trains and operator trains mixed in the same territory. We have 6 tower positions using controlling 12 interlocking sections using JMRI touch-panel CTC.? These towers can be controlled by an operator or automatically following Routes. ? We are very interested in automated training running developments.

David Parks
Los Altos, CA
dpcw.borail.net


Locked Re: Layout editor turnout control issue

 

That fixed it! Turnout mode BSTURNOUT


Locked Re: New file uploaded to [email protected] - tcs-wow.zip

 

¿ªÔÆÌåÓý

Either should work for Diesel 3 or 4
But 4.13.2 has an update for all WOW decoders and first version to have the
paneWowReadMe.xml file, so if 4.13.2 then you don't really need to copy that file, it was included in zip for those with 4.12

Installing the files from the zip to 4.12 will give latest version of Wow diesel 3 & 4 but 1 & 2 and all the steam versions will be slightly out of date but the change was just adding a note indicating to turn off a couple JMRI settings.
Michael Mosher
Webmaster, ECSFM            
Member SFRH&MS              
DCC Master PVSMR            
On 8/14/2018 7:11 AM, Greg Komar wrote:

Michael,

?

Better to apply this (TCS_WOW_Diesel03.xml & TCS_WOW_Diesel04.xml & paneWowReadMe.xml) to production release JMRI_v4.12+Rb6a9bb1 or the latest beta, JMRI_v4.13.2+R8a2b21d?

?

Thank you very much!!

?

Greg Komar

gkomar@...

"The nicest thing about the future is that it always starts immediately."


From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Notification
Sent: Monday, August 13, 2018 8:41 AM
To: [email protected]
Subject: [jmriusers] New file uploaded to [email protected]

?

Hello,

This email message is a notification to let you know that a file has been uploaded to the Files area of the [email protected] group.

File: tcs-wow.zip

Uploaded By: Michael Mosher

Description:
add quill checkboxes to diesel sound set 3 & 4.

You can access this file at the URL:
/g/jmriusers/files/Decoder%20files/TCS%20decoders/tcs-wow.zip

Cheers,
The Groups.io Team



Locked Re: Full timetable automation - AutoDispatcher 2 - abstraction - documentation - scripting

 

¿ªÔÆÌåÓý

Hi
For transits, you would use the defined transits as templates, duplicate the
transit & start train on the duplicate.
Steve G.


Locked Re: Decoder Pro Manual ?

 

Over the years, people have started to write manuals (i.e. something with a linear organization) a couple times:



They¡¯ve even gone to some trouble to make nicely¡ªprintable versions:



But none of those efforts have really continued. The people involved would be the ones to say definitively why, but it seems to me that it was an unfortunate balance of motivation and desire: The people who wanted to work on the manuals were trying to make a contribution, spent a lot of time creating them, but most of the comments they got back were requests for them to do even more work (!) When the first PDF manual came out, the first few JMRIusers posts were mostly requests: better cross-references, a different font, even a request that it "come out earlier next time¡±!

I think it would be great if a few people decided to create a printable, linear manual. They could start with one of the older ones, or start anew from the help pages, or whatever other strategy they want. One way to do it quickly would be to pretty-print a few of the key web pages to make a PDF, then create a table of contents and/or index.

Bob

On Aug 13, 2018, at 6:24 PM, george.pendergraft <gmpender@...> wrote:

Yes, but I for one like to have something in my hand to read. A real printed manual at my leisure instead of staring at a computer monitor. I can also concentrate on learning about the program whenever I want to without having to go back and fourth between the program and the online manual. That is just me. Granted, if there are manuals that are incomplete or out of date like those of today, then a manual to that extent is not going to do much training. Thus my solution to set a release date for the software to come out every year, and put a printable manual out for use in that year. Makes sense to me. Unfortunately I am not knowledgeable enough on the software to help with the writing of such a large undertaking. And I do realize it is a big undertaking. But many of us (like me) out here are just squeaking by on how to use the software and as some say even the software instructions for today would be inadequate to instruct anyone today just because things are changing so fast. But it would be nice to have something to look at in my lap while learning the software. Anyone else out there agree?
--
Bob Jacobsen
rgj1927@...


Locked Re: New file uploaded to [email protected] - tcs-wow.zip

 

¿ªÔÆÌåÓý

The question was WHICH of the two JMRI versions would be the preferred version to apply the update to¡­.

?

Greg Komar

gkomar@...

"The nicest thing about the future is that it always starts immediately."


From: [email protected] [mailto:[email protected]] On Behalf Of Peter Ulvestad
Sent: Tuesday, August 14, 2018 1:50 PM
To: [email protected]
Subject: Re: [jmriusers] New file uploaded to [email protected] - tcs-wow.zip

?

On Tue, Aug 14, 2018 at 05:11 AM, Greg Komar wrote:
>
> Michael,
>
> Better to apply this (TCS_WOW_Diesel03.xml & TCS_WOW_Diesel04.xml &
> paneWowReadMe.xml) to production release JMRI_v4.12+Rb6a9bb1 or the
> latest beta, JMRI_v4.13.2+R8a2b21d?
>>
> Thank you very much!!
>>
> Greg Komar

Greg,

We don't go back and modify a releases. These changes will be applied in 4.13.3.
If you wish to use the modified files you can download from the link provide and install the changes yourself following the instructions provided in the zip file.

--
Peter Ulvestad

JMRI Users Group Moderator - ( ) Tam Valley Group Moderator - ( ) Sprog-DCC Group Moderator - ( ) Edmonton Model Railroad Association -


Locked Re: Layout editor turnout control issue

 

OK, so I was being daft! I hadn't set up the turnouts in the DCC++ configuration so the feedback was coming back from the command station. I will set it up properly and then report back....


Locked Re: Scripts

 

A partial implementation script has been uploaded to /g/jmriusers/files/ProblemsBeingWorkedOn/Back%20and%20Forth%20Script%20with%20Reporter%20Action/BackAndForthMod.py for your inspection and modification.

The BackAndForth.py script has been modified to allow multiple trains to run between specific sensors and with forward and reverse speeds as parameters.

The identified sensors are queried for Reporter information, but neither RailCom or Transponder sensors are available for me to do any further investigation or testing. All "testing" done thus far has been with simulators for Digitrax, NCE, and XpressNet with the Sensor Table to pretend that the trains have arrived.

Not specifically requested, but a separate modification also provides a brute force method that stops all of the trains that are being controlled by this script when the "Quit" Button is clicked on the PanelPro window.

Hope this effort provides someone else with clues as to what might be provided (or corrected) next.

Cliff in Baja SoCal


Locked Re: Full timetable automation - AutoDispatcher 2 - abstraction - documentation - scripting

 

Most of the JMRI community doesn¡¯t really think or talk in terms of ¡°abstractions¡±.

JMRI itself is entirely organized around (internal) events and listeners. Things like Logix, signal logic, etc, listen for changes in object state and react. At the lowest level, those listened-to objects are small things like individual sensors, turnouts, lights, icons on panels, etc. From those are built higher-level objects like signal heads and masts, signal logic, CTC elements, etc.

In certain cases, JMRI will also use threads to handle sequencing, in the usual sense of ¡°do X; wait for Y; do Z¡±, etc, sequencing. JMRI itself uses this pattern for i.e. control of operations across communication links, sequencing startup, etc. There can be many threads running in parallel, each operating their own sequence. A lot of scripting is done this way, because many model railroaders find it easier to think that way, and it¡¯s an easy way to build a little sequence of tests and operations. But please note that there¡¯s no practical limit on how many of those can be running in parallel, either for small things (sequencing the operation of a few sensors and turnouts) or something large and complicated. I know a local layout that¡¯s running over 80 threads in parallel (two per CTC control point because of how their CTC panel was coded) just fine during operating sessions, and it¡¯s doing just fine.

Dispatcher, Warrants, etc are all suitable for specific purposes, but if they¡¯re not suitable for you it¡¯s not so hard to craft a custom solution. (It¡¯s usually _much_ easier to create a custom solution than a general one what will work for lots of different purposes and layouts). All those tools started as efforts that somebody thought were suited to their specific application

When scripting, the best way to think about it is that you¡¯re writing Python (really Jython to ease Java access, but that matters little; JavaScript is also available if you prefer that) on top of a JMRI library that gives access to layout objects. There are no fundamental limits to what that can do that way. If you want to create your own class library that has abstractions you like, go ahead: You have the full power of the Python language available for OO, functional, relational or even dynamic programming. Use listeners, threads and other constructs as you¡¯d like; they all work.

For example, all the way back in 2006, there was a JMRI-driven layout (built by John Plocher with help from Dave Falkenburg and others) at the Java One conference that ran multiple interleaved trains: two in one direction around an oval with two sidings, with another one working its way in the other direction. That was done with (IIRC) one thread per train, plus JMRI-standard signal logic that was automatically setting and clearing up signals. One thread per train was a good way to get this specific demo up and running really quickly.

Bob

On Aug 14, 2018, at 3:16 PM, jamespetts via Groups.Io <jamespetts@...> wrote:

I am finding it very difficult to get detailed information on what abstractions that JMRI is capable of internally and what needs to be done by way of scripting - and I think that I am correct in concluding that scripting is not really suitable for large-scale abstraction logic, although if somebody has achieved this successfully, please do let me know, as this would be most interesting to observe. It looks like "AutoDispatcher 2" is perhaps the closest that anyone has come to this, but I cannot find any documentation on its capabilities, so it is very difficult to understand what this is really able to do (and this is already a very substantial piece of software in itself).
--
Bob Jacobsen
rgj1927@...


Locked Re: How to terminate python script

 

¡°f¡± is the thing you need to keep. It¡¯s the JFrame object that you create in your setup(..) method. ¡°f¡± is a local variable now, you have to save it somehow. You can either put it in a global variable, or you can put it in the object you create by referring to it as ¡°self.f¡± everywhere, and the using a.f to refer to it.

Bob

On Aug 14, 2018, at 3:13 PM, Fred Miller via Groups.Io <tractionfan@...> wrote:

Bob, thanks for the quick response.
However I am not quite sure I know how to establish a reference to the window.
Below is a brief skeleton of my script. Is "f" the window reference?

class ThrottleA(jmri.jmrit.automat.AbstractAutomaton) :
.... followed by a bunch of listener classes, e.g.
class F0Listener(javax.swing.event.ChangeListener) :
def stateChanged(self,event) :
... etc
def init(self):
....
return
def relThrottle(self,event):
self.throttle.release()
print("Release")
***>>>> here's where I would like to close the window
return
.... followed by a bunch of other defs, then...
def setup(self):
.... establish buttons, panels and the JFrame, e.g.
f = javax.swing.JFrame("CAB 41",preferredSize = (250,250))
.... layout the panels, e.g.
f.contentPane.add(self.panel1)
f.pack()
f.show()
self.start()
return
a = ThrottleA()
a.setName("ThrottleA Code")
a.setup()

Appreciate your help
Fred Miller
--
Bob Jacobsen
rgj1927@...


Locked Re: Layout editor turnout control issue

 

Thanks Dave, some progress, but still not there! I set the turnouts to BSTURNOUT and I also tried BSOUTPUT. The feedback changed from unknown to inconsistent when clicked. I got the animation on the panel but it still only clicks the one way... Is it a DCC++ problem I wonder?


Locked Re: Full timetable automation - AutoDispatcher 2 - abstraction - documentation - scripting

 

James,

Dispatcher already has the logic for working out how to allocate sections to
trains. To it, a train follows a route of a series of sections. So when you
tell it to start a train, it will work along allocating and releasing
sections.

-Ken Cameron, Member JMRI Dev Team
www.jmri.org
www.fingerlakeslivesteamers.org
www.cnymod.com
www.syracusemodelrr.org


Locked Re: Full timetable automation - AutoDispatcher 2 - abstraction - documentation - scripting

 

Ken,

thank you for your reply. In very general terms, that is what I had already understdood to be the case. However, what I am not clear on is quite what abstraction capabilities are built in and what have to be scripted.

Take transits, for instance. There is no way of permitting more than one train to be travelling the same transit at once, so I imagine that the way of acheiving something similar to this would be a higher level class (scripted) concatenating lots of very short transits. In this case, the whole abstraction for this, all the variables, the UI and the logic would have to be scripted, I presume, and then several layers more abstraction on top would also have to be scripted to deal with actual timetabled working - is this correct?

I am finding it very difficult to get detailed information on what abstractions that JMRI is capable of internally and what needs to be done by way of scripting - and I think that I am correct in concluding that scripting is not really suitable for large-scale abstraction logic, although if somebody has achieved this successfully, please do let me know, as this would be most interesting to observe. It looks like "AutoDispatcher 2" is perhaps the closest that anyone has come to this, but I cannot find any documentation on its capabilities, so it is very difficult to understand what this is really able to do (and this is already a very substantial piece of software in itself).