ts2 / ts2-data

Experimental repos for sharing json data files of ts2 sims
https://ts2.github.io/
GNU General Public License v2.0
6 stars 2 forks source link

Gretz-Armainvilliers #3

Open npiganeau opened 9 years ago

npiganeau commented 9 years ago

@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:

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 commented 8 years ago

@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 commented 8 years ago

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 commented 8 years ago

Can you attach your CSV file please ?

Sharpe49 commented 8 years ago

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

npiganeau commented 8 years ago

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 commented 8 years ago

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

Sharpe49 commented 8 years ago

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 commented 8 years ago

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

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

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'

pedromorgan commented 8 years ago

@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 commented 8 years ago

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