[Mod] Advanced Trains [advtrains] [2.4.3]

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by yw05 » Post

56independent_actual wrote:
Sun Oct 24, 2021 13:57
yw05 wrote:
Sun Oct 24, 2021 11:54
I posted a summary of the conference on the wiki (please complement it as well). Hopefully it's useful for those who were not invited.
Thank you very much. When you consider the next meeting, please, through whatever edits you can, make a video of it in full and put it online. Maybe you hire a lecture hall, and use cameras to help record/stream the meeting.
The conference was held online, and I don't think the organizers (gpcf and orwell) are particularly happy about being recorded.
I would love to have a text interface. Then i can push in my feedback. This almost certanlyimplies a lvie stream. However, if you do not wish to show the faces, you could just use microphones and mumble. I live in the UK, and it is hard to get to Germany as a 15 year old with little in their bank account.
The (web-based) interface used for the conference supports text messages as well.

On a less technical note, while there are discussions on making the next conference more open (in terms of sending the invitation to more people), some level of respect (including respect toward privacy) is expected.

gpcf
Member
Posts: 382
Joined: Fri May 27, 2016 10:48
GitHub: gpcf
In-game: gabriel

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by gpcf » Post

Yeah, this conference was basically just composed of past contributors of advtrains, to discuss the roadmap for the next months. I think the next conference will be open towards the general public.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by 56independent_actual » Post

gpcf wrote:
Sun Oct 24, 2021 16:19
Yeah, this conference was basically just composed of past contributors of advtrains, to discuss the roadmap for the next months. I think the next conference will be open towards the general public.
Thank you very much. For a few short hours (i hope), i will have the chance to talk directly to the developers of AdvTrains, without the lag of the mailing list (typing, sending, reciving) holding me down.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
Codesound
Member
Posts: 365
Joined: Thu Jun 09, 2016 14:56

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by Codesound » Post

56independent_actual wrote:
Sun Oct 24, 2021 08:24
Codesound wrote:
Sun Oct 24, 2021 05:35
Hi all,

these days I will try to understand this mod more deeply, to create a more complex structure in the world of my children, but it is very complicated... I have seen some tutorials found on youtube and wiki but I understand only a few basic things.
I felt the same when I learnt how to interlock. My suggestion to you is to persevere and read the guide and follow by example.

You have done well so far, but here are some tips for you:

* You should have chosen side A, as that is the section the "traffic light" (please refer it to as "signal") controls.

* When making a route (found when you right-click a signal, you will be flooded by options. Chose the "new route" button), punch the TCB next to the signal and press "end route at next section" (the bottom option if I misremembered the text). This only works when you are on a section with no splits or merges (in any case if more than two TCBs are denoting a section).

* At the ends of tracks, do the same as the above. I suggest you make ballon loops instead, to make it simpler. As you progress with your ability, you can begin to make more complex setups, like my railyard. My railyard however does not work, so I have taken it off the network.

* Always put an asterisk in "ARS rules". Click Save. Unless you have junctions where trains need to go specific directions (which require you to lock points and set routes on different TCBs (in my railyard, I used routing codes based on train length to find whether trains should go in, and it was a lot of pain)), this is fine.

* On single-track sections, put a signal on entry and exit to the section. Please just press "enable ARS" or whatever it is in the signal main menu. However, if you have more than one train, you may end up locking up. I suggest splitting at stations and making a single big section (as in my example. But this is complex. I suggest you only make dual-track networks, like what is in my server. However, if your single track network is a big monodirectional circle, then you have a dual-track with balloon loops at each end.

* When you finally learn the basics and have trains running in a big circle in your network, you can begin experimenting with y junctions (My explanation) (Wikipedia's explanation), and then move onto stuff like t-junctions, and eventually, after much suffering, a junction equivalent to the sprawling railway junction on my server (mostly, it's two separate junctions. One reverses and sends NX1 trains back east, and then the INV trains going south get reversed and sent north, and another just combines IPR and NX2 trains north, but splits them coming south). But it took me half a year to learn how to do this on my server. I started with dual track and began learning how to make cargo terminals.

* If any of my advice stops you from following the guide (linked above), disregard my advice.
Thanks.... This mod needs a loro of tutorials ........

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by 56independent_actual » Post

Codesound wrote:
Tue Oct 26, 2021 16:13
Thanks.... This mod needs a loro of tutorials ........
There is a growing trend between open source developers of not making adequete documentation.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by 56independent_actual » Post

<This message was a duplicate of above, text removed to stop me looking likea spammer>
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Clarification of "The Conference"

by orwell » Post

Hi all,
to anyone wondering: On last Saturday (Sunday in Australia), we organized a closed developer conference (online). It was closed in a sense that only active advtrains contributors were invited.

This conference was held to update each other on what we are working and coordinate the current and future development efforts. Currently the advtrains repo contains a few stale branches, and we wanted to sort out what the state of these is. Also, we wanted to discuss the next features that we are going to work on, and determine priorities.

The next official advtrains developer conference will be a public format, where we can also collect further ideas from the interested public, and possibly introduce new contributors. The latest conference also served as a study of the feasibility of such a meeting, as we have never had a developer conference before and first wanted to collect experiences with it.

Please stay tuned for an official announcement here on the forum.

- orwell
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

meise21
Member
Posts: 30
Joined: Sun Feb 03, 2019 13:33

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by meise21 » Post

Hi all,
first of all thanks for the cool mod and all your combined effort!
We managed to gt our first short train up an running an it works like a treat. Now i tartd to venture into LuaAutomation territory and have a (possibly complete noob) question.

I managed to:
- build a luaAutomation ATC Rail
- create an environment
- put a function in the environment init
- called the function from the ATC Rail

The code I had in my environment init was:

function F.station(station_name)
if event.train then
atc_send("B0WOL")
atc_set_text_inside(station_name)
end
end


When I drove my train over the ATC Rail the train stopped as expected. However I was unable to get the train back to manual control to get it going again. Is there a way to gt th train out of ATC control again?
Bye and thanks in advance!

p.s.: Initially I ued the init function code exactly as in the docs ("\advtrains_luaautomation\README.md")


function F.station(station_name)
if event.train then
atc_send("B0WOL")
atc_set_text_inside(station_name)
interrupt(10,"depart")
end
if event.int and event.message="depart" then
atc_set_text_inside("") --an empty string clears the displayed text
atc_send("OCD1SM")
end
end

But with this I got a syntax error in line 7 (the 2nd if statement) saying "then expected near =")

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by 56independent_actual » Post

meise21 wrote:
Sun Oct 31, 2021 09:05
When I drove my train over the ATC Rail the train stopped as expected. However I was unable to get the train back to manual control to get it going again. Is there a way to gt th train out of ATC control again?
Bye and thanks in advance!


if (event.int and event.message="depart") then


But with this I got a syntax error in line 7 (the 2nd if statement) saying "then expected near =")
Hi! I have changed your code and it might work. It's a step in the right direction.

Assuming you have default keybinds, you can use the space key to get out of ATC. Then you can control the train how you like. However, in laggy conditions such as multiplayer servers, it can take 10 or more seconds for any command you give to the train to work. This frequently happened on my server before i abandoned the 10-year-old webbook in lieu of a new, shiny laptop.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by yw05 » Post

meise21 wrote:
Sun Oct 31, 2021 09:05
Hi all,
first of all thanks for the cool m
The code I had in my environment init was:
When I drove my train over the ATC Rail the train stopped as expected. However I was unable to get the train back to manual control to get it going again. Is there a way to gt th train out of ATC control again?
Use the "jump" key (usually the space key)
Initially I ued the init function code exactly as in the docs ("\advtrains_luaautomation\README.md")


function F.station(station_name)
if event.train then
atc_send("B0WOL")
atc_set_text_inside(station_name)
interrupt(10,"depart")
end
if event.int and event.message="depart" then
atc_set_text_inside("") --an empty string clears the displayed text
atc_send("OCD1SM")
end
end

But with this I got a syntax error in line 7 (the 2nd if statement) saying "then expected near =")
In line 7, use if event.int and event.message == "depart" then (Note that there are two equal signs)

Lua's = operator is only for assignment and does not return the value assigned to the variable. Compare this with the following C code, where the variable is assigned a value that is also compared with a constant:

Code: Select all

while ((c = getchar()) != EOF) {
	/* whatever ... */
}
I double-checked the README.md file to make sure it was correct, except it isn't ... (please, proofread the docs before pushing the changes upstream, also see the end of this post)

For record, you can also use the RWT scheduler from advtrains_lineautomation and the approach callback, in which case you could write a station function like this (I have not tested it yet):

Code: Select all

function F.station(name)
	__approach_callback_mode = 1
	if event.approach then
		atc_set_lzb_tsr(2)
	elseif event.train and atc_id then
		atc_send("B0A0WOR")
		atc_set_text_inside(name)
		schedule_in(10, atc_id)
	elseif event.schedule and event.msg then
		if event.msg == atc_id then
			-- The atc_id == event.msg check is in place in case the previous train overruns so far that it allows another train onto the track
			atc_set_text_inside("")
		end
		-- Use atc_send_to_train in case the aproach callback fails and the train overruns
		atc_send_to_train(event.msg, "OCD1A1SM")
	end
end
The RWT scheduler can be set to sync with real-life time, which solves the problem with ATC's "D" command being dtime-clipped (that can happen when there is a lot of lag).

(By the way, while looking through the ATLATC doc, it seems like line 236 - `atc_set_text_inside(text) / atc_set_text_outside(text)` needs correction.)
Last edited by yw05 on Mon Nov 01, 2021 15:42, edited 1 time in total.

meise21
Member
Posts: 30
Joined: Sun Feb 03, 2019 13:33

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by meise21 » Post

Thanks for your quick replies! Space Bar did the job.
Regarding the code. My brain was in copy/paste mode so I did not notice that subtlety:-) Thanks for pointing that out!

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by 56independent_actual » Post

Why does AdvTrains®©™ seemingly litter my track sections with ghost trains? It causes much pain and much queueing on my network. When i reset the section, the queue begins to move but then suddenly, in another area, another queue forms.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by yw05 » Post

56independent_actual wrote:
Mon Nov 01, 2021 15:20
Why does AdvTrains®©™ seemingly litter my track sections with ghost trains? It causes much pain and much queueing on my network. When i reset the section, the queue begins to move but then suddenly, in another area, another queue forms.
Can you show us your setup (and, if you are using something other than the master branch, tell us which branch you are using)? I myself have experienced ghost trains occupying track sections, but these are mostly caused by erroneous setups (e.g. flipped TCBs). I remember a weird case with ghost trains in a (IIRC) curved track section, but I do not remember the details.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by 56independent_actual » Post

yw05 wrote:
Mon Nov 01, 2021 15:40
56independent_actual wrote:
Mon Nov 01, 2021 15:20
Why does AdvTrains®©™ seemingly litter my track sections with ghost trains? It causes much pain and much queueing on my network. When i reset the section, the queue begins to move but then suddenly, in another area, another queue forms.
Can you show us your setup (and, if you are using something other than the master branch, tell us which branch you are using)? I myself have experienced ghost trains occupying track sections, but these are mostly caused by erroneous setups (e.g. flipped TCBs). I remember a weird case with ghost trains in a (IIRC) curved track section, but I do not remember the details.
Hi. I am using your Distant Signals branch. I have some screenshots created just for you. I am using Ubuntu server, with the newest version of commercial minetest (not the dev version).
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by yw05 » Post

56independent_actual wrote:
Mon Nov 01, 2021 15:54
Hi. I am using your Distant Signals branch. I have some screenshots created just for you.
Could you please attach the screenshots to your post? I currently have trouble accessing imgur.com at the moment.

As for the new-ks branch, what you described is quite weird, as I have simply removed the distant signaling code from the branch after it was discussed at the conference about a week ago.

Edit: I looked at the output of git diff e5b053c0d824543116d322634d2cf1019d6754bc..new-ks and couldn't find any changes that could caused what you described.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by 56independent_actual » Post

yw05 wrote:
Mon Nov 01, 2021 16:11
Could you please attach the screenshots to your post? I currently have trouble accessing imgur.com at the moment.

As for the new-ks branch, what you described is quite weird, as I have simply removed the distant signaling code from the branch after it was discussed at the conference about a week ago.

Edit: I looked at the output of git diff e5b053c0d824543116d322634d2cf1019d6754bc..new-ks and couldn't find any changes that could caused what you described.
I'm sorry, i forgot to mention, this problem has followed me ever since i started interlocking (using a test world and the standard branch). If i were to migrate my server to the default branch, i am pretty sure this problem will still occur. I have given a late response as my fluctuating internet connection was forcing the uploads to take a long time.
Spoiler
I am unable to add more than 3 images; please mention an alternative image sharing service. I have no space for the formspec screenshots.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by yw05 » Post

56independent_actual wrote:
Mon Nov 01, 2021 17:44
I'm sorry, i forgot to mention, this problem has followed me ever since i started interlocking (using a test world and the standard branch). If i were to migrate my server to the default branch, i am pretty sure this problem will still occur. I have given a late response as my fluctuating internet connection was forcing the uploads to take a long time.
Can you reproduce the problem in a new world using the master branch?
I am unable to add more than 3 images; please mention an alternative image sharing service. I have no space for the formspec screenshots.
You can add them in separate posts. Alternatively dump the base64 of the images or just describe the problem.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by 56independent_actual » Post

yw05 wrote:
Mon Nov 01, 2021 17:57
Can you reproduce the problem in a new world using the master branch?
To do so may
You can add them in separate posts. Alternatively, dump the base64 of the images or just describe the problem.
I have taken the files, put them into an SVG, then i have uploaded it to Google LLC™'s server at
my unused Google Drive
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by yw05 » Post

@56independent_actual: in your screenshots, section 788310 only includes (-109,20,-45)/B, but the track section itself does not appear to lead to a dead end. Where is the other end of the track section? Or does it lead into a non-interlocked area? Also, how is the route set up? (In the signaling formspec, click on the route and then "Edit")

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.3.1]

by 56independent_actual » Post

yw05 wrote:
Tue Nov 02, 2021 18:50
@56independent_actual: in your screenshots, section 788310 only includes (-109,20,-45)/B, but the track section itself does not appear to lead to a dead end. Where is the other end of the track section? Or does it lead into a non-interlocked area? Also, how is the route set up? (In the signaling formspec, click on the route and then "Edit")
I have fixed the issue thanks to the questions.They have hinted to me that dead-end stations can have their interlocking made vastly easier through the use of TCBs at the end. I have now solved the issue, and ghost trains have stopped interfering with my network.

Again, i am sorry to force you to use Google's services, but this is where the circumstances have brought us. The screenshots are available at my drive, but i doubt i need to give you them since my issue is now solved. Any other place with constant ghost trains can be thoroughly checked.

My lead-on request is a list of things required to diagnose ghost train problems and ways to fix them, which can then be used for the net benifit of the entire AdvTrains community.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

(Discussion) Rework of Speed Limit signs

by orwell » Post

Hi all,

With the advent of speed indicators for Ks signals thanks to ywang, it is time to rethink the way speed limits are currently handled in the interlocking system. This issue was identified in the developer conference.

Real-world railways (especially here in Germany) actually know three types of speed limits:
  • The general maximum permitted speed of the railway line ("line speed", a global speed limit)
  • Permanent local speed restrictions (due to switches, curves, other circumstances - until the end of the dangerous section)
  • Temporary local speed restrictions (due to construction works or track defects, typically the signals for this are not fixed in place)
For reference, the "official" document specifying railway signals in Germany is the Signalbuch.

I want to rework the speed limit signs, so that they are more consistent with the German signal spec. Also, I want to add a way to set the permitted line speed so that it can not be overridden by signalling. Here is my proposal:

Permanent local speed restrictions
All the speed limits in advtrains currently fall in this category.
For the Ks signals (now with speed indicators), they follow the spec pretty well:
Image
Using the new speed indicators, you can now signal different speeds for different routes (such as slower speed for diverging route)

The Speed Limit Signs however do not adhere to the Signalbuch. The correct signal shape would be Zs 3:
Image
and Zs 10 for the "End of speed limit" sign:
Image
I therefore suggest to change the shape of the current 8,10,12,16 speed limit signs to the Zs 3 shape and the shape of the E sign to the Zs 10 shape. This happens without changing the node name so that existing signs are automatically converted.
Together with this, the non-Ks light signals should again have the function of lifting the local speed restriction, as it used to be until about 1 year ago.

Line speed
IRL the line speed is fixed and published by the railway company in operation instructions. The train driver has to look it up or memorize it. This is of course not feasible for advtrains. However I have observed that on some railway lines (e.g. the line Dresden-Görlitz) the "Lf 7" signal is used to tell the permitted line speed (120 km/h):
Image
I suggest to add a new set of signs in the style of Lf 7 (= the current sign model) to set the permitted line speed. The line speed is independent of the local speed restrictions and is not changed by light signals. It is only changed by another Line speed signal, setting a new maximum line speed.

Temporary local speed restrictions (optional)
For construction works, Germany has the "Langsamfahrstellen-Signale". They look like this:
Image
Image
To make adding those temporary speed restrictions possible in advtrains, we might add a set of signs in the style of Lf 1/Lf 3. They would not interfere with the line speed or the permanent speed restrictions.

In summary, the resulting permitted speed would always be the minimum of line speed, permanent local speed and "La" speed.

Please tell me what you think of this proposal, and feel free to discuss it.

- orwell
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: (Discussion) Rework of Speed Limit signs

by 56independent_actual » Post

orwell wrote:
Wed Nov 03, 2021 22:37
Hi all,

With the advent of speed indicators for Ks signals thanks to ywang, it is time to rethink the way speed limits are currently handled in the interlocking system. This issue was identified at the developer conference.

Real-world railways (especially here in Germany) know three types of speed limits:
  • The general maximum permitted speed of the railway line ("line speed", a global speed limit)
  • Permanent local speed restrictions (due to switches, curves, other circumstances - until the end of the dangerous section)
  • Temporary local speed restrictions (due to construction works or track defects, typically the signals for this are not fixed in place)
For reference, the "official" document specifying railway signals in Germany is the Signalbuch.
Thank you very much. I will migrate from the "New Ks" branch to the default one if backwards compatibility is maintained and follows these conditions:
  • None of the nodes that extend Ks are removed, to prevent train crashes from unknown nodes
  • The signals, if in the default branch, should match the names in the Ks branch or at least register aliases so I don't end up with unknown nodes.
  • Distant signalling can be removed (temporarily), but not current signalling.
My migration will allow my server to chase the current branch and speed up my progress to being an Advtrains developer (which benefits us all - I get experience, you get another developer and fewer features asked).

As to clarify, here are links to the branches mentioned:
  • New Ks - This is the branch I am using on my server, and I want to ensure current advtrains is backwards compatible with this.
  • Current branch - I might as well migrate to this branch, but only if it is backwards compatible.
I wish you luck with your project. Everything else is fine, and I would love to see this added.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: (Discussion) Rework of Speed Limit signs

by yw05 » Post

As it turns out, I did not read the Signalbuch that carefully.
orwell wrote:
Wed Nov 03, 2021 22:37
Permanent local speed restrictions
I therefore suggest to change the shape of the current 8,10,12,16 speed limit signs to the Zs 3 shape and the shape of the E sign to the Zs 10 shape. This happens without changing the node name so that existing signs are automatically converted.
Together with this, the non-Ks light signals should again have the function of lifting the local speed restriction, as it used to be until about 1 year ago.
Should I add 4 and 6 for consistency with the existing (mounted) Zs 3 signals?
Line speed
I suggest to add a new set of signs in the style of Lf 7 (= the current sign model) to set the permitted line speed. The line speed is independent of the local speed restrictions and is not changed by light signals. It is only changed by another Line speed signal, setting a new maximum line speed.
When I read the Signalbuch I thought that Zs 3 was only used in combination with Ks signals (and mostly focused on the section on the Langsamfahrsignale), so my idea was to keep the Lf 7 as-is. Your proposal is IMO better though. +1.
Temporary local speed restrictions (optional)
To make adding those temporary speed restrictions possible in advtrains, we might add a set of signs in the style of Lf 1/Lf 3. They would not interfere with the line speed or the permanent speed restrictions.
I was thinking about using the combined Lf 1/2 instead of just Lf 1. I know it is no longer set up on newer sections, but using it instead of separate Lf 1 and Lf 2 could probably save some headache.

I would consider adding it as (IIRC) something similar has been previously requested.
In summary, the resulting permitted speed would always be the minimum of line speed, permanent local speed and "La" speed.
My current idea is to use a table of speed restrictions and updating train.speed_restriction every step. Basically a new entry that looks something like this:

Code: Select all

speed_restrictions_t = {
	main = <speed>,	-- permanent local speed restriction
	line = <speed>,	-- line speed
	temp = <speed>,	-- temporary local speed restriction
}
Also: which category should the PSR rail fall into?

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: (Discussion) Rework of Speed Limit signs

by yw05 » Post

56independent_actual wrote:
Wed Nov 03, 2021 22:52
I will migrate from the "New Ks" branch to the default one if backwards compatibility is maintained and follows these conditions:
The idea is to merge the new-ks branch into the master branch when it's complete. Until then there is no "backward compatibility" provided by the master branch because the maintainers of the master branch do not have any responsibility to keep up with any feature branch. It is up to the maintainers of various feature branches to keep up with the master branch, not vice versa.
  • None of the nodes that extend Ks are removed, to prevent train crashes from unknown nodes
I currently do not intend to remove any nodes from the new-ks branch. The branch itself is designed to make Ks signals (and, hopefully, signaling in general) in advtrains more realistic, and the current additions are IMO something basic.

There is not much to remove anyway. Up to now I have simply added mounted Zs 3(v) indicators and changed the "halt for shunt" signal.
  • The signals, if in the default branch, should match the names in the Ks branch or at least register aliases so I don't end up with unknown nodes.
I currently do not intend to rename anything, and I don't think anything will be renamed when the new-ks branch gets merged.
  • Distant signalling can be removed (temporarily), but not current signalling.
I have removed distant signaling because it is way to complicated. It will be implemented when someone figures out how to do it properly.

Does "current signaling" refer to the signaling mechanism in the master branch? That will obviously not be removed.
My migration will allow my server to chase the current branch and speed up my progress to being an Advtrains developer (which benefits us all - I get experience, you get another developer and fewer features asked).
I fail to see how.

To start with, you should not run a production server off a feature branch for obvious reasons (things being unstable or broken). Use feature branches on a testing server instead - if you mess up anything, you can simply copy data over from the production server or from a backup.

To become a developer, you need to at least have some understanding of the internals of advtrains, and I do not see how git checkout master; git pull will help you know better about advtrains. You can encounter problems, of course, but unless you are willing to look into these problems yourself, you are unlikely to learn much (if anything at all) that can help you become an advtrains developer.

IMO what we need that benefits advtrains is that the ideas/requests are implemented and (hopefully) unittests for more parts of advtrains get written, which is not implied by the number of people writing code for a project (although I do have to say that the example I chose is a bit extreme - so far we have not really had problems with people trying to inject malicious code into advtrains, at least as far as I am aware of)

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: (Discussion) Rework of Speed Limit signs

by 56independent_actual » Post

yw05 wrote:
Fri Nov 05, 2021 15:26
The idea is to merge the new-ks branch into the master branch when it's complete. Until then there is no "backward compatibility" provided by the master branch because the maintainers of the master branch do not have any responsibility to keep up with any feature branch. It is up to the maintainers of various feature branches to keep up with the master branch, not vice versa.
Thank you for the information.
I currently do not intend to remove any nodes from the new-ks branch. The branch itself is designed to make Ks signals (and, hopefully, signaling in general) in advtrains more realistic, and the current additions are IMO something basic.

There is not much to remove anyway. Up to now I have simply added mounted Zs 3(v) indicators and changed the "halt for shunt" signal.
Makes sense.
I currently do not intend to rename anything, and I don't think anything will be renamed when the new-ks branch gets merged.
Thank you for the information.
I have removed distant signaling because it is way to (too) complicated. It will be implemented when someone figures out how to do it properly.

Does "current signaling" refer to the signaling mechanism in the master branch? That will obviously not be removed.
I mean speed limit signalling for the track ahead by "current signalling". I hope the removal of distant signalling nods to real life, like an error message on all distant speed signals for "distant speed not found due to missing code" or equivelent.
To start with, you should not run a production server off a feature branch for obvious reasons (things being unstable or broken). Use feature branches on a testing server instead - if you mess up anything, you can simply copy data over from the production server or from a backup.
Oh, that makes sense. I am a stupid sysadmin. But i did really want those features, and I regularly use them on my server. I never knew it was for testing; i merely thought it was a good idea and featureset, one i loved.
To become a developer, you need to at least have some understanding of the internals of advtrains, and I do not see how git checkout master; git pull will help you know better about advtrains. You can encounter problems, of course, but unless you are willing to look into these problems yourself, you are unlikely to learn much (if anything at all) that can help you become an advtrains developer.
This is the purpose of the "big read" (in tiddlywiki markup). It will help me to understand advtrains. I will also be able to use my server to test features on an enterprise scale, and this is why the merge would be a good idea.
IMO what we need that benefits advtrains is that the ideas/requests are implemented and (hopefully) unittests for more parts of advtrains get written, which is not implied by the number of people writing code for a project (although I do have to say that the example I chose is a bit extreme - so far we have not really had problems with people trying to inject malicious code into advtrains, at least as far as I am aware of(!))
The HSF will help with that. If we refer to my todo list, you can see that there are lots of changes for me to do and these will help expand my experience. I would be happy to change advtrains for the better, maybe with other devs copying some good code from HSF, or i find a bug and fix it.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 17 guests