Rails icon indicating copy to clipboard operation
Rails copied to clipboard

1835 - train may not run from Berlin to Berlin

Open peter-de-boer opened this issue 5 years ago • 5 comments

According to the german rules, trains may not run from Berlin to Berlin. Rule 5.5.3.5: "Zudem darf eine Strecke nicht vonBerlin nach Berlin führen".

Rails 2.0RC3 does allow that though. See the attached example, where M2 just ran from Berlin to Berlin. 1835_20200702_1034_d.zip

peter-de-boer avatar Jul 02 '20 10:07 peter-de-boer

For some reason that is beyond me, it shows a route, but it does not really let a train run that route: the revenue scored is zero. Apparently the route calculation only takes such exclusions into account when it really matters.

erik-vos avatar Jul 02 '20 14:07 erik-vos

Why do you think the revenue scored is zero? The log shows:

M2 (a) operates. 
M2 earns 60M 
M2 splits dividend of 60M 
M2 receives 30M from the split of the revenue. 
a receives 30M for 1 100% shares

peter-de-boer avatar Jul 02 '20 15:07 peter-de-boer

Hmm, I did a few undos, repeated the run, and it said 0, both in the window and the Game report. That means, that the version you play probably does not include my recent update on loop prevention. I used my current master branch, which I thought would be identical with the one in the central repository, but apparently it is not. It looks like I have to do another PR. The missing commits are "Stop access parameters overhauled" and "Finishing touches to new Access info processing". So I presume these are not included in your version.

erik-vos avatar Jul 02 '20 16:07 erik-vos

I'm puzzled. When I look at the Git commit tree of upstream/master, IntelliJ says my commits are not in there, but when I try to make a PR from my origin/master to upstream/master is says they're identical. I'm lost too.

erik-vos avatar Jul 02 '20 16:07 erik-vos

About the 1835 Berlin loop: I don't know if the latest release includes the loop prevention code, but the current master branch is correct in the sense that the calculated and reported revenue over a direct M2-M5 connection is 0M. The map still displays the incorrect loop run, but that does no harm: run display and revenue calculation are separate processes. Not sure if the display bug is easy to fix; I'm not very familiar with the rather complex routing code.

erik-vos avatar Nov 27 '20 23:11 erik-vos