Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gretz-Armainvilliers #3

Open
npiganeau opened this issue Sep 16, 2015 · 14 comments
Open

Gretz-Armainvilliers #3

npiganeau opened this issue Sep 16, 2015 · 14 comments

Comments

@npiganeau
Copy link
Contributor

@Sharpe49 I'm opening this issue to discuss on your simulation.

I've just created a whole new set of French BAL signals that you can use. They are defined in the FR.tsl file inside the data directory.

Demo simulation "signal-test.ts2" (in the data directory of the main repository too) shows example of usage of these different signals.

Quick guide to these signals

There are 4 signal types you can choose from :

FR_BAL_CARRE

This signal shows a double red when no route is set from it, a single red if a route is set, but a train occupies the block, a yellow if next is red or double red, and green otherwise. For now trains stop to red and double red aspects. In a later release I plan to have train stop at single red and then start again at slow speed (but I need first to implement sight running of trains, which is also the lacking feature to enable shunting of trains).

FR_BAL_SEMAPHORE_AUTO

This signal is an automatic signal (new feature !): you don't need to set a route (nor even to define a route) from this signal to work. It will just look at the next signal and whether there is a train in the block to display its aspect in accordance. Don't put automatic signals before a junction or you may be surprised by the way it behaves !

It includes the classical aspects: green if next is yellow, yellow if next is red or double red, single red if train is ahead.

But also includes: horizontal double yellow (R30) if next is vertical double yellow (RR30)

FR_BAL_RR30

This is a FR_BAL_CARRE which can also show two extra aspects:

  • vertical double yellow (RR30) if at least on of the routes given in the "route set params" is active (which does not have to be starting from this signal).
  • vertical double yellow + single yellow (A+RR30) if we have the conditions as RR30 + next signal is red, double red or RR30.

Note that the route set params are only taken into account for RR30 and A+RR30 aspects. Other aspects behave as usual and drop silently any "route set params" defined on them.

FR_BAL_SEMAPHORE_TP

Behaves exactly the same as UK_3_ASPECTS_TP but compatible with other FR_BAL signals. That is aspect is shown if no train is present on any of the items given as "no train params".

This type of signal is used for last signal before the train exits the area.

@npiganeau
Copy link
Contributor Author

@Sharpe49 Nice sim really, varied with normal operation, shunting, many different types of signals...
I use it to check my coding !

Just one point, I think you should add text to label the tracks, because that is not obvious when you try to route the trains.

Also, I would be interested in your feedback when using CSV imports for services. I used it a long time ago to import liverpool-street services but that was a "dead end" simulation, and I wonder if it works for 3 ways simulations as yours.

@Sharpe49
Copy link
Contributor

I have just tested the CSV importation.
There's an error when I try it :
Traceback (most recent call last):
File "C:\Users\Cedric\Desktop\ts2\ts2\editor\editorwindow.py", line 850, in importServicesBtnClicked
self.editor.importServicesFromFile(fileName)
File "C:\Users\Cedric\Desktop\ts2\ts2\editor\editor.py", line 435, in importServicesFromFile
self.services[serviceCode] = trains.Service(serviceParameters)
File "C:\Users\Cedric\Desktop\ts2\ts2\trains\service.py", line 476, in init
self._serviceCode = parameters["serviceCode"]
KeyError: 'serviceCode'

@npiganeau
Copy link
Contributor Author

Can you attach your CSV file please ?

@Sharpe49
Copy link
Contributor

I had to change the extension of the file so that Github could accept it.
gtz.txt

@npiganeau
Copy link
Contributor Author

Ok, it's a problem of camelCasing vs fulllowercase.

I'll fix it. In the meantime, you can try to change the header with camelCase (serviceCode instead of servicecode, etc.) if you want.

@npiganeau
Copy link
Contributor Author

This is fixed. Headers have changed, so if you need to use it, make an export first to get the correct format.

@Sharpe49
Copy link
Contributor

Sharpe49 commented Oct 8, 2015

I have some issues with the current version of TS2.
It doesn't accept my latest modifications whereas a more ancient one accepts them.

Also, since the simulation is automatically loaded at the start of the program, since TS2 doesn't accept the simulation (with the latest version), it crashes instantly and it's no longer possible to go to the editor to correct the file.
Perhaps putting the editor into a separate application would be better.

@pedromorgan
Copy link
Contributor

Hi @Sharpe49 its pedro and were hacking away in devel.. as we speak..

So are u using develop branch.. cos this is the active one.. and I note its kinda dodgy..

So if u can help and explain what platform u on, and if your on version 0.6 = latest

0.5 is maybe broken in places, indeed v.06 is what want can can u help with debug etc ????

am knocking out the docs of the source, at http://docs-ts2.rhcloud.com/

Helpfull is..

  • can u chackout latest stuff
  • can comfirn ther is bug and make a lot of noise
    -- fix bug

and
``What u expect..

Describe here how u want it to go...

We want all sort's of music and harmonies as we all kinda attempt to get there..


@pedromorgan
Copy link
Contributor

U havea point of putting editor into seperate app..

I kinda like that idea and agree.. not sure how to do that et all..

@Sharpe49
Copy link
Contributor

Sharpe49 commented Oct 8, 2015

For me latest version is revision 9bd9fd7, which crashes.
Since I couldn't start I went back to revision 5157f2c, which works perfectly.

Here's the log :
Exception ignored in: <bound method LineItem.del of <ts2.scenery.lineitem.LineItem object at 0x0000000006095A68>>
Traceback (most recent call last):
File "C:\Users\Cedric\Desktop\ts2\ts2\scenery\lineitem.py", line 72, in del
File "C:\Users\Cedric\Desktop\ts2\ts2\scenery\abstract.py", line 125, in del
File "C:\Users\Cedric\Desktop\ts2\ts2\scenery\abstract.py", line 466, in removeAllGraphicsItems
AttributeError: 'NoneType' object has no attribute 'scene'
Exception ignored in: <bound method LineItem.del of <ts2.scenery.lineitem.LineItem object at 0x0000000006095B88>>
Traceback (most recent call last):
File "C:\Users\Cedric\Desktop\ts2\ts2\scenery\lineitem.py", line 72, in del
File "C:\Users\Cedric\Desktop\ts2\ts2\scenery\abstract.py", line 125, in del
File "C:\Users\Cedric\Desktop\ts2\ts2\scenery\abstract.py", line 466, in removeAllGraphicsItems
AttributeError: 'NoneType' object has no attribute 'scene'
Exception ignored in: <bound method LineItem.del of <ts2.scenery.lineitem.LineItem object at 0x0000000006095CA8>>

Repeted several times

@npiganeau
Copy link
Contributor Author

@Sharpe49 just copy FR_BAL.tsl from ts2-data in the data directory. It happens because I moved tsl files to ts2-data.

I will add an exception catching here.

@Sharpe49
Copy link
Contributor

Now, the trains that are supposed to be at Tournan at the beginning of the simulation no longer appear.
I have this error that occurs regularly :
Traceback (most recent call last):
File "C:\Users\Cedric\Desktop\ts2\ts2\trains\train.py", line 805, in activate
signalAhead = self.findNextSignal()
File "C:\Users\Cedric\Desktop\ts2\ts2\trains\train.py", line 1073, in findNextSignal
nsp, nsd = self.getNextSignalInfo(pos)
File "C:\Users\Cedric\Desktop\ts2\ts2\trains\train.py", line 1051, in getNextSignalInfo
if pos == None:
File "C:\Users\Cedric\Desktop\ts2\ts2\routing\position.py", line 321, in eq
return (self._trackItem == p.trackItem and
AttributeError: 'NoneType' object has no attribute 'trackItem'

@Sharpe49 Sharpe49 mentioned this issue Oct 16, 2015
@pedromorgan
Copy link
Contributor

@Sharpe49 or @npiganeau

And chance u guys can help, mainly cos I aint go into the editor yet (time time). so I can help with debug..

What I'd llike is s simple line, with 3 stations on a single like and a single train.. and maybe 4 signals between each station
So I can at least start figuring out the "voodoo magic" of npi...

Maybe we can sticj thins ts2-data under "tests" or even "tutorial".. would be better

npiganeau added a commit to ts2/ts2 that referenced this issue Oct 16, 2015
@npiganeau
Copy link
Contributor Author

Fixed by the commit above. @Sharpe49 Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants