News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

[PR#646] Direction of cargo waiting for the line at station

Started by Ranran(retired), March 24, 2024, 10:04:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

I have made further updates to the line operation status monitor.

The current waiting number at the station shows the number of all cargo waiting for the line.
But in the update, it will be changed to distinguish between waiting directions.



Please check the following image to see what it means.

Current version:


Apply update:



Line schedules may pass through several of the same stations.
In the example above, 2 and 6, and 3 and 5 are the same station.
This means that there are routes going in different directions from that station, and cargo will only be loaded if it goes in the appropriate direction.
Previous representations have been incomplete in this respect.
This patch makes it clear that the proceeding convoy will pick up cargo at the next station.

The image above is of a non-mirrored schedule.
Note that a convoy traveling the reverse route on a non-mirrored schedule will pick up cargo that differs from this rule.
This is a complex problem and unfortunately I haven't come up with the best way to deal with it.



Next, in the case of a mirrored schedule, cargo has a direction in which it waits at stations other than the stations at both ends.
Therefore, the display will be changed like this.



For example, at stop 6, you can see that there are 4 Low passengers heading upwards, 9 Medium passengers, and 3 High passengers heading downwards.
At station number 9, you can only go up, so there is no such distinction.

It would be helpful if you could give us feedback on how this display works and whether the filters are working correctly in complex schedules.
pak.256やpak.nipponのような複数タイル市内建築物があるpakセットはextendedではちゃんと遊べません。それどころかextendedの追い越し機能はバグまみれで修正が難しくなっている。それらをコーディングし周囲の意見を無視し押し付けたひめし@himeshi_hob(THleaderH)はそれを知りつつ5年以上放置して今なおOTRPの開発を続けている。あまりにも身勝手で無責任。日本の人達はそういう事実にちゃんと目を向けるべき(´・ω・`)

jamespetts

Thank you very much for this, and apologies for not having had the chance to look into this sooner. I have found what appears to be an error with this, which is that we appear to get an infinite loop originating in GUI code in this saved game when selecting the line, "!# Strawerdale Crude" belonging to the company "BR Summerisle Region" in the lines dialogue with the "stops" tab open. I had previously clicked on a number of the same company's other lines with the "stops" tab open when this occurred. 

For reference, when I paused the process, I got the following stack trace: void display_fillbox_wh_clip_rgb() < void gui_colored_route_bar_t::draw() < void gui_container_t::draw() (line 262) < void gui_aligned_container_t::draw() (line 587) < void gui_container_t::draw() (line 262) and so on, repeating a number of times moving between lines 587 and 262.

I should be grateful if you could look into this before I merge this. Thank you.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran(retired)

Quote from: jamespetts on April 07, 2024, 07:46:38 PMFor reference, when I paused the process, I got the following stack trace: void display_fillbox_wh_clip_rgb() < void gui_colored_route_bar_t::draw() < void gui_container_t::draw() (line 262) < void gui_aligned_container_t::draw() (line 587) < void gui_container_t::draw() (line 262) and so on, repeating a number of times moving between lines 587 and 262.
Thank you for the testing.
The bb server saves could not be opened in the debug build, but I think I fixed the cause of the problem based on the information given.
It would be helpful if you could test it again.
pak.256やpak.nipponのような複数タイル市内建築物があるpakセットはextendedではちゃんと遊べません。それどころかextendedの追い越し機能はバグまみれで修正が難しくなっている。それらをコーディングし周囲の意見を無視し押し付けたひめし@himeshi_hob(THleaderH)はそれを知りつつ5年以上放置して今なおOTRPの開発を続けている。あまりにも身勝手で無責任。日本の人達はそういう事実にちゃんと目を向けるべき(´・ω・`)

jamespetts

Quote from: Ranran(retired) on April 08, 2024, 11:34:21 AMThank you for the testing.
The bb server saves could not be opened in the debug build, but I think I fixed the cause of the problem based on the information given.
It would be helpful if you could test it again.

Thank you for this. Apologies for not having had a chance to look at this sooner: I have been very busy with house refurbishments over the past few weeks.

Unfortunately, the problem still seems to occur - but it is extremely difficult to reproduce predictably. I cannot reproduce it in the Pak128.Britain-Ex demo save, and can only reproduce it in the Bridgewater-Brunel save. I have tried many, many times and cannot find a single set of things that will cause this to occur. Rather, it will seemingly occur at random after clicking on several different lines (sometimes as few as 3, sometimes after tens or hundreds) with the stops tab open.

If you want to load the Bridgewater-Brunel saved game in debug mode, the best thing to do is use the optimised debug build mode in the Visual Studio project that should be in the Github repository.

Thank you again for your work on this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran(retired)

I think you may have been testing the wrong branch. But it's possible that I caused confusion. Thread title PR#646 does not contain a fix.
Could you please test PR#651, which contains a commit of the fix?
pak.256やpak.nipponのような複数タイル市内建築物があるpakセットはextendedではちゃんと遊べません。それどころかextendedの追い越し機能はバグまみれで修正が難しくなっている。それらをコーディングし周囲の意見を無視し押し付けたひめし@himeshi_hob(THleaderH)はそれを知りつつ5年以上放置して今なおOTRPの開発を続けている。あまりにも身勝手で無責任。日本の人達はそういう事実にちゃんと目を向けるべき(´・ω・`)