¿ªÔÆÌåÓý

Date

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


Locked Re: How to terminate python script

 

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


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

 

James,

Some of what you want would be a script or user interface that in turn is
driving Dispatcher. So the start and termination of the trains would be in
the upper level and it treats all of Dispatcher as the lower level.

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


Locked Re: NCE POWER PRO

 

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. It's great when things go the right way. When I retired they gave this HP Stream and I said that would be great to use on the layout?with JMRI and now I'm a happy railroader.
Bob


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

 

Thank you for your response - that is helpful. I do not think that a procedural system is really suitable for full timetable based automation of a large layout, as I need to be able to amend the timetable without having to reprogram (and debug) a script - for anything non-trivial, it is important that data be separated from code.

Is there no means of achieving timetabling in JMRI with a higher level of abstraction?


Locked Re: How to terminate python script

 

To close a window, you keep a reference to that window (i.e. called myFrame) and then do either:

myFrame.setVisible(False)
myFrame.dispose()

_or__

myFrame.dispatchEvent(java.awt.AWTEvent.WindowEvent(myFrame, java.awt.AWTEvent.WindowEvent.WINDOW_CLOSING))

(I haven¡¯t checked that these are exactly Jython syntax; they¡¯re copied from Java and adjusted) The first one is simpler, but doesn¡¯t __quite_ do exactly what the close button does. The second is exactly the same as clicking the button.

Bob

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

I have a python script which runs a nice throttle. It builds a window with necessary buttons, etc. However I am trying to figure a way of closing the window (terminating the script) from within the script but in the same way as clicking on the red title bar close button. I have tried "exit()" but that closes down PanelPro altogether. I have tried "f.dispose()" as in one of the example scripts but since I have my script in a Class, I am apparently not getting the f.dispose() at the right level. within the code. I wanted to execute it from a defined function called from a button click.
--
Bob Jacobsen
rgj1927@...


Locked Re: XML code question: panel size

 

¿ªÔÆÌåÓý

In my panel's xml file, <LayoutEditor, what is the difference between?

height="676" width="1893" windowheight="364" windowwidth="951" panelheight="676" panelwidth="1893"

I'm trying to reduce the size of the panel by eliminating the extra space. (Maybe I don't really need to, but...) Also sometimes, especially now after I've mucked with these setting, the panel opens without all the layout pieces shown. I have to zoom out and then back in to get everything to display.

Those values are ignored because they're now stored per-machine (not per-layout).

The "zoom to fit" re-calculates those values; You just need to re-save your layout and then use the Options menu, "Save Location and Size" item.

--?
Enjoy,
George Warner
eMail, Message, or FaceTime:?<geowar1@...>




Locked Re: 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: Full timetable automation - AutoDispatcher 2 - abstraction - documentation - scripting

 

James,

YAAT is procedural oriented but flexible. As such, it is as you described. Set turnout, move at this speed, wait for something to change, etc.

YAAT evolved while helping a guy in England automate trains without block detection. He uses IR detectors at the stations.

The first part of the script has the documentation.

The zip file has a demo panel and text files that I use for testing. The most complex one has two trains coming from branches to the main station and back again. It uses a sensor group to control which train has access to the shared mainline.

I am working on version 1.7 which adds memory variables. This would the provide access to IMCURRENTTIME. That would still be procedural but would allow actions based on time.


Dave Sand

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

David,

thank you for your response. I had heard of YAAT, but the description gave me the impression that it was really only a template for simple procedural scripts of the "set throttle on train no. 21 to 60%, then throw turnouts nos. 7 and 8" sort rather than a system using a higher level of abstraction.

If this impression was incorrect, may I ask where I can find documentation on this and in particular its use in non-trivial instances of timetabled automation?

James.


Locked Re: Scripts

 

Dear Paul,

Thank you for your reply. It is kind of you that you are going to look into the matter further.
Can you get me a log of how the railcom detection messages are showing up from the Roco 10808 sections?
Unfortunately I don't know how to get such a log.? There is a program called "Z21 Maintenance Tool" that can be used to make the Roco10808 emulate R-Bus and/or LocoNet and/or Lissy/Marco detection.

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


Locked Re: Entering New Loco's in DEcoder Pro

 

??? I agree with you that decoders are becoming more sophisticated, but applying more (up to the safe limit)?voltage has been recommended by just about everyone who uses digital devices. I learned this as an auto tech, we couldn't get the express up feature on Mercedes without starting the car or using a battery charger. Car batteries are 12.5 volts but run at 14.5+. I have worked at many dealers where a battery charger had to be installed to do most reprogramming. Just my 2 cents.?????? Jim


Locked Re: NCE POWER PRO

 

¿ªÔÆÌåÓý

Many of us use an ESU cable (has a genuine FTDI chipset) for our Power Pro. Another one only costs ~$30 from an ESU dealer and doesn't need an M-F extender cable to fit.

The?UN8-BE from RRCirKits is similar and also works well with the Power Pro.

More economical than the Keyspan and work every bit as well. We use the ESU ones with an active 10metre USB extender as well at times.

--?
Dave in Australia

The New England Convention 2018

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

AIU is set default not enable.
I solve the problem but further testing will go on. The Belkin Serial to USB that I have been using for serval years does not like Window's 10. I switch out the cable for the serial to usb cable that came with my ESU programmer and things are working fine now. Was able to monitor the cabs, backup, add marcos. set clock etc. So I guess I have to buy the Keyspan Serial to usb now. Thanks for all the help.
Bob


Locked Re: Inconsistent behaviour with the dispatcher

 

Thank you for that. I have now enabled this. With the debug level enabled, the output logging for a single train is now as follows:
2018-08-14 18:21:53,714 util.Log4JUtil??????????????????????? INFO? - * JMRI log ** [main]
2018-08-14 18:21:53,733 util.Log4JUtil??????????????????????? INFO? - This log is appended to file: C:\Users\James\JMRI\log\messages.log [main]
2018-08-14 18:21:53,734 util.Log4JUtil??????????????????????? INFO? - This log is stored in file: C:\Users\James\JMRI\log\session.log [main]
2018-08-14 18:21:53,745 apps.Apps???????????????????????????? INFO? - PanelPro version 4.12+Rb6a9bb1 starts under Java 1.8.0_181 on Windows 7 amd64 v6.1 at Tue Aug 14 18:21:53 BST 2018 [main]
2018-08-14 18:21:58,097 apps.Apps???????????????????????????? INFO? - Starting with profile Automation_test_layout.3f6acf02 [main]
2018-08-14 18:21:58,454 node.NodeIdentity???????????????????? INFO? - Using jmri-dG1h9cpHGhNiaahg7KpNdQ-3f6acf02 as the JMRI Node identity [AWT-EventQueue-0]
2018-08-14 18:21:58,691 xml.AbstractSerialConnectionConfigXml INFO? - Starting to connect for "LocoNet" [main]
2018-08-14 18:21:59,186 locobufferusb.LocoBufferUsbAdapter??? INFO? - LocoBuffer-USB adapter set hardware flow control, mode=2 RTSCTS_OUT=2 RTSCTS_IN=1 [main]
2018-08-14 18:21:59,188 locobuffer.LocoBufferAdapter????????? INFO? - COM8 port opened at 57600 baud with DTR: true RTS: true DSR: true CTS: true? CD: true [main]
2018-08-14 18:21:59,268 loconet.LnPacketizer????????????????? INFO? - lnPacketizer Started [main]
2018-08-14 18:21:59,786 util.FileUtilSupport????????????????? INFO? - File path program: is C:\Program Files (x86)\JMRI\ [main]
2018-08-14 18:21:59,789 util.FileUtilSupport????????????????? INFO? - File path preference: is C:\Users\James\JMRI\Automation_test_layout\ [main]
2018-08-14 18:21:59,789 util.FileUtilSupport????????????????? INFO? - File path profile: is C:\Users\James\JMRI\Automation_test_layout\ [main]
2018-08-14 18:21:59,789 util.FileUtilSupport????????????????? INFO? - File path settings: is C:\Users\James\JMRI\ [main]
2018-08-14 18:21:59,789 util.FileUtilSupport????????????????? INFO? - File path home: is C:\Users\James\ [main]
2018-08-14 18:21:59,790 util.FileUtilSupport????????????????? INFO? - File path scripts: is C:\Program Files (x86)\JMRI\jython\ [main]
2018-08-14 18:22:01,117 PanelPro.PanelPro???????????????????? INFO? - Main initialization done [main]
2018-08-14 18:22:08,398 dispatcher.OptionsFile??????????????? DEBUG - Reading Dispatcher options from file C:\Users\James\JMRI\Automation_test_layout\dispatcheroptions.xml [AWT-EventQueue-0]
2018-08-14 18:22:08,484 dispatcher.DispatcherFrame??????????? DEBUG - Loading saved trains flagged as LoadAtStartup [AWT-EventQueue-0]
2018-08-14 18:22:08,485 dispatcher.TrainInfoFile????????????? DEBUG - directory of TrainInfoFiles is C:\Users\James\JMRI\Automation_test_layout\dispatcher\traininfo\ [AWT-EventQueue-0]
2018-08-14 18:22:08,485 dispatcher.DispatcherFrame??????????? DEBUG - initializing block paths early [AWT-EventQueue-0]
2018-08-14 18:22:43,505 dispatcher.DispatcherFrame??????????? DEBUG - trainID:47573 "The London STANDARD", tSource:1, startBlockName:IB1, startBlockSectionSequenceNumber:1, endBlockName:IB1, endBlockSectionSequenceNumber:5 [AWT-EventQueue-0]
2018-08-14 18:22:43,532 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": requesting throttle address=4573 [AWT-EventQueue-0]
2018-08-14 18:22:43,534 dispatcher.AutoTrainsFrame??????????? INFO? - No Throttle[47573 "The London STANDARD"/IZ6(Full circle from rear)] [AWT-EventQueue-0]
2018-08-14 18:22:43,538 dispatcher.AutoAllocate?????????????? DEBUG - Allocating Train [47573 "The London STANDARD"/IZ6(Full circle from rear)] section [IY:AUTO:0001(Rear)] [AWT-EventQueue-0]
2018-08-14 18:22:43,539 dispatcher.AutoAllocate?????????????? DEBUG - Using Regular [AWT-EventQueue-0]
2018-08-14 18:22:43,541 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": new current signalmast Top right(Danger) for section IY:AUTO:0001(Rear) [AWT-EventQueue-0]
2018-08-14 18:22:43,542 dispatcher.AutoAllocate?????????????? DEBUG - Allocating Train [47573 "The London STANDARD"/IZ6(Full circle from rear)] section [IY:AUTO:0002(Right)] [AWT-EventQueue-0]
2018-08-14 18:22:43,542 dispatcher.AutoAllocate?????????????? DEBUG - Using Regular [AWT-EventQueue-0]
2018-08-14 18:22:43,542 dispatcher.AutoAllocate?????????????? DEBUG - 47573 "The London STANDARD": auto allocating Section IY:AUTO:0002(Right) [AWT-EventQueue-0]
2018-08-14 18:22:43,543 dispatcher.AutoAllocate?????????????? DEBUG - Allocating Train [47573 "The London STANDARD"/IZ6(Full circle from rear)] section [IY:AUTO:0003(Front)] [AWT-EventQueue-0]
2018-08-14 18:22:43,543 dispatcher.AutoAllocate?????????????? DEBUG - Using Regular [AWT-EventQueue-0]
2018-08-14 18:22:43,543 dispatcher.AutoAllocate?????????????? DEBUG - 47573 "The London STANDARD": auto allocating Section IY:AUTO:0003(Front) [AWT-EventQueue-0]
2018-08-14 18:22:43,544 dispatcher.AutoAllocate?????????????? DEBUG - Allocating Train [47573 "The London STANDARD"/IZ6(Full circle from rear)] section [IY:AUTO:0004(Left)] [AWT-EventQueue-0]
2018-08-14 18:22:43,544 dispatcher.AutoAllocate?????????????? DEBUG - Using Regular [AWT-EventQueue-0]
2018-08-14 18:22:43,544 dispatcher.AutoAllocate?????????????? DEBUG - 47573 "The London STANDARD": auto allocating Section IY:AUTO:0004(Left) [AWT-EventQueue-0]
2018-08-14 18:22:43,545 dispatcher.AutoAllocate?????????????? DEBUG - Allocating Train [47573 "The London STANDARD"/IZ6(Full circle from rear)] section [IY:AUTO:0001(Rear)] [AWT-EventQueue-0]
2018-08-14 18:22:43,545 dispatcher.AutoAllocate?????????????? DEBUG - Using Regular [AWT-EventQueue-0]
2018-08-14 18:22:43,545 dispatcher.AutoAllocate?????????????? DEBUG - Allocating Train [47573 "The London STANDARD"/IZ6(Full circle from rear)] section [IY:AUTO:0001(Rear)] [AWT-EventQueue-0]
2018-08-14 18:22:43,545 dispatcher.AutoAllocate?????????????? DEBUG - Using Regular [AWT-EventQueue-0]
2018-08-14 18:22:43,546 dispatcher.AutoAllocate?????????????? DEBUG - Allocating Train [47573 "The London STANDARD"/IZ6(Full circle from rear)] section [IY:AUTO:0001(Rear)] [AWT-EventQueue-0]
2018-08-14 18:22:43,546 dispatcher.AutoAllocate?????????????? DEBUG - Using Regular [AWT-EventQueue-0]
2018-08-14 18:22:43,546 dispatcher.AutoAllocate?????????????? DEBUG - Allocating Train [47573 "The London STANDARD"/IZ6(Full circle from rear)] section [IY:AUTO:0001(Rear)] [AWT-EventQueue-0]
2018-08-14 18:22:43,546 dispatcher.AutoAllocate?????????????? DEBUG - Using Regular [AWT-EventQueue-0]
2018-08-14 18:22:43,547 dispatcher.AutoAllocate?????????????? DEBUG - Allocating Train [47573 "The London STANDARD"/IZ6(Full circle from rear)] section [IY:AUTO:0001(Rear)] [AWT-EventQueue-0]
2018-08-14 18:22:43,547 dispatcher.AutoAllocate?????????????? DEBUG - Using Regular [AWT-EventQueue-0]
2018-08-14 18:22:43,672 loconet.LnThrottleManager???????????? WARN? - slot 1 address 4573 is already in-use. [AWT-EventQueue-0]
2018-08-14 18:22:43,674 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": New AutoEngineer, address=4573(L), length=65.7, factor=1.0 [AWT-EventQueue-0]
2018-08-14 18:22:43,678 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": Signal Top right at Held or Danger so Stop [AWT-EventQueue-0]
2018-08-14 18:22:43,678 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": StopInCurrentSection called for IY:AUTO:0001(Rear) [AWT-EventQueue-0]
2018-08-14 18:22:43,679 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": train is already stopped or stopping. [AWT-EventQueue-0]
2018-08-14 18:22:43,679 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": _speedIncrement=0.0033333334 [Auto Engineer 4573]
2018-08-14 18:22:43,683 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": AutoEngineer.setIsForward(true) [Auto Engineer 4573]
2018-08-14 18:22:44,294 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": Top right(Caution) Slow(30), Dest: Bottom right, path max: 100 [AWT-EventQueue-0]
2018-08-14 18:22:44,295 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": Signal Top right setting speed to 30.0 for next [AWT-EventQueue-0]
2018-08-14 18:22:44,295 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD":setTargetSpeedValue: Speed[30.0] [AWT-EventQueue-0]
2018-08-14 18:22:44,295 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD":setTargetSpeedByProfile: SpeedState[0.3] [AWT-EventQueue-0]
2018-08-14 18:22:44,412 dispatcher.AutoTrainAction??????????? DEBUG - 47573 "The London STANDARD": setting light (F0) to On [Monitor Train Transit Action 4573]
2018-08-14 18:22:44,567 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": Top right(Proceed) Normal(100), Dest: Bottom right, path max: 100 [AWT-EventQueue-0]
2018-08-14 18:22:44,567 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": Signal Top right setting speed to 100.0 for previous [AWT-EventQueue-0]
2018-08-14 18:22:44,567 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD":setTargetSpeedValue: Speed[30.0] [AWT-EventQueue-0]
2018-08-14 18:22:44,568 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD":setTargetSpeedByProfile: SpeedState[0.3] [AWT-EventQueue-0]
2018-08-14 18:22:51,680 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": new current signalmast Bottom right(Proceed) for section IY:AUTO:0002(Right) [Allocated Section Block Change on Right curve]
2018-08-14 18:22:51,680 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": Bottom right(Proceed) Normal(100), Dest: Bottom left, path max: 100 [Allocated Section Block Change on Right curve]
2018-08-14 18:22:51,680 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": Signal Bottom right setting speed to 100.0 for previous [Allocated Section Block Change on Right curve]
2018-08-14 18:22:51,681 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD":setTargetSpeedValue: Speed[100.0] [Allocated Section Block Change on Right curve]
2018-08-14 18:22:51,681 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD":setTargetSpeedByProfile: SpeedState[1.0] [Allocated Section Block Change on Right curve]
2018-08-14 18:22:55,385 dispatcher.DispatcherFrame??????????? DEBUG - 47573 "The London STANDARD": releasing IY:AUTO:0001(Rear) [AWT-EventQueue-0]
2018-08-14 18:22:55,385 dispatcher.AutoAllocate?????????????? DEBUG - Allocating Train [47573 "The London STANDARD"/IZ6(Full circle from rear)] section [IY:AUTO:0001(Rear)] [AWT-EventQueue-0]
2018-08-14 18:22:55,385 dispatcher.AutoAllocate?????????????? DEBUG - Using Regular [AWT-EventQueue-0]
2018-08-14 18:22:55,386 dispatcher.AutoAllocate?????????????? DEBUG - 47573 "The London STANDARD": auto allocating Section IY:AUTO:0001(Rear) [AWT-EventQueue-0]
2018-08-14 18:22:57,807 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": new current signalmast Bottom left(Proceed) for section IY:AUTO:0003(Front) [Allocated Section Block Change on Front loop]
2018-08-14 18:22:57,808 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": Bottom left(Proceed) Normal(100), Dest: Top left, path max: 100 [Allocated Section Block Change on Front loop]
2018-08-14 18:22:57,808 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": Signal Bottom left setting speed to 100.0 for previous [Allocated Section Block Change on Front loop]
2018-08-14 18:22:57,809 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD":setTargetSpeedValue: Speed[100.0] [Allocated Section Block Change on Front loop]
2018-08-14 18:22:57,809 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD":setTargetSpeedByProfile: SpeedState[1.0] [Allocated Section Block Change on Front loop]
2018-08-14 18:23:00,107 dispatcher.DispatcherFrame??????????? DEBUG - 47573 "The London STANDARD": releasing IY:AUTO:0002(Right) [AWT-EventQueue-0]
2018-08-14 18:23:00,225 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": new current signalmast Top left(Caution) for section IY:AUTO:0004(Left) [Allocated Section Block Change on Left curve]
2018-08-14 18:23:00,225 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": Top left(Caution) Slow(30), Dest: Top right, path max: 100 [Allocated Section Block Change on Left curve]
2018-08-14 18:23:00,226 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": Signal Top left setting speed to 30.0 for next [Allocated Section Block Change on Left curve]
2018-08-14 18:23:00,226 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD":setTargetSpeedValue: Speed[30.0] [Allocated Section Block Change on Left curve]
2018-08-14 18:23:00,226 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD":setTargetSpeedByProfile: SpeedState[0.3] [Allocated Section Block Change on Left curve]
2018-08-14 18:23:01,906 dispatcher.DispatcherFrame??????????? DEBUG - 47573 "The London STANDARD": releasing IY:AUTO:0003(Front) [AWT-EventQueue-0]
2018-08-14 18:23:03,370 dispatcher.AutoActiveTrain??????????? DEBUG - 47573 "The London STANDARD": StopInCurrentSection called for IY:AUTO:0001(Rear) [Allocated Section Block Change on Rear loop]
2018-08-14 18:23:03,404 roster.RosterSpeedProfile???????????? ERROR - Speed not available to compute distance travelled [Auto Engineer 4573]
2018-08-14 18:23:07,024 dispatcher.DispatcherFrame??????????? DEBUG - 47573 "The London STANDARD": releasing IY:AUTO:0004(Left) [AWT-EventQueue-0]
2018-08-14 18:23:12,816 dispatcher.AutoTrainAction??????????? DEBUG - 47573 "The London STANDARD": setting light (F0) to Off [Monitor Train Transit Action 4573]
2018-08-14 18:23:12,824 dispatcher.AutoActiveTrain??????????? DEBUG - executing task[0] [Wait for stop 47573 "The London STANDARD"/IZ6(Full circle from rear)]
I hope that this assists.


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

 

David,

thank you for your response. I had heard of YAAT, but the description gave me the impression that it was really only a template for simple procedural scripts of the "set throttle on train no. 21 to 60%, then throw turnouts nos. 7 and 8" sort rather than a system using a higher level of abstraction.

If this impression was incorrect, may I ask where I can find documentation on this and in particular its use in non-trivial instances of timetabled automation?

James.


Locked How to terminate python script

 

I have a python script which runs a nice throttle.? It builds a window with necessary buttons, etc.? However I am trying to figure a way of closing the window (terminating the script) from within the script but in the same way as clicking on the?red title bar close button.? I have tried "exit()" but that closes down PanelPro altogether.? I have tried "f.dispose()" as?in one of the example scripts but?since I have my script in a Class, I am apparently not getting the f.dispose()?at the right level. within the code.? I wanted to execute it from a defined function called from a button click.?


Locked Re: Z21 and POM

 

¿ªÔÆÌåÓý

Moreno,


On Aug 9, 2018, at 11:31 PM, Paul Bender <paul.bender@...> wrote:
This is going to take a little time to sort out, but I should get it done within the next couple of days.

I have the write in POM mode working correctly now. ?You can download a daily build of JMRI that includes the update here:
?

Paul


Locked Re: Scripts

 

¿ªÔÆÌåÓý




On Aug 13, 2018, at 3:28 PM, halasz <halasz.gabor@...> wrote:
Both sensors watching the sections (channels of a Roco 10808 current detector connected to a Z21 command station), as well as the loco decoder are capable of RailCom, hence they can provide the feed-back needed.

Can you get me a log of how the railcom detection messages are showing up from the Roco 10808 sections?

I know how the railcom detector built into the Z21 command station provides information to us, but it looks like the Roco 10808 might report things in different ways based on how it is configured.

I am not familiar with Python (Jython) and know even less about the way RailCom feed-back is made use of. Can anybody tell me how to modify the code and, possibly, change the setting?

Railcom detection is provided via a reporter object. ?It is not quite the same as a sensor, though there is a sensor associated with it.

The example script:

Shows generally how to work with reporters in a script. ?This is a bit LocoNet specific in handling the reporter output. ?I may have an example that can be used with the railcom objects provided by the Z21 command station¡¯s internal railcom detector. Let me look into that later today.

Paul