The International Simutrans Forum

 

Author Topic: Possible bug: over 100% of passengers transported  (Read 1797 times)

0 Members and 1 Guest are viewing this topic.

Offline Carl

  • Devotee
  • *
  • Posts: 1599
    • Website
  • Languages: EN
Possible bug: over 100% of passengers transported
« on: August 10, 2011, 10:03:13 AM »
I've a few questions about possible bugs regarding passengers.

On more than one map now I've found that some cities send and receive disproportionate passenger traffic for their size -- for reasons that are very difficult to pin down. Some cities (but by no means all cities) display the following odd properties:



As you can see, "passengers transported" from this city is far, far above the number of available passengers. At first I thought this might be something to do with (a) city placement and how it interacts with the local/mid-range/long-distance distinction or (b) the "alternative destinations" setting. But this doesn't sit right, because two cities next to each other with equal size can, on occasion, behave very differently in this regard -- one might have huge amounts of passengers and the other a normal amount.

What's more, this seems to correspond to a general trend across the map:



That is, I'm currently transporting 141% of available passengers on the map -- which, I assume, should be impossible. Even if I had zero "no-route" and zero "too slow" passengers (which I do not) this figure shouldn't go above 100%, right?

There's another odd (and possibly related) phenomenon. Some cities say that hardly any of their passengers are being transported:



However, this city (and others like it) is definitely providing many passengers which end up being transported to their destinations.

Perhaps these are bugs; perhaps they aren't -- can anybody shed any light on the situation?

Here's the savegame in question: http://dl.dropbox.com/u/61716/balkanspassengers.sve
And the addons folder it requires: http://dl.dropbox.com/u/61716/carladdons3.rar
The "problem cities" are typically those with stations which "glow" when you select "origin" or "destination" on the minimap window.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Possible bug: over 100% of passengers transported
« Reply #1 on: August 10, 2011, 09:29:14 PM »
Thank you for reporting this. I confirm that I can reproduce this, albeit with the 10.x branch, the extent to which the numbers are > 100% are lower. There seems to be some element of double counting somewhere, I should venture, but I cannot for the life of me find where at present. Any assistance in tracking this one down would be welcome.

Offline Carl

  • Devotee
  • *
  • Posts: 1599
    • Website
  • Languages: EN
Re: Possible bug: over 100% of passengers transported
« Reply #2 on: August 10, 2011, 09:35:51 PM »
Thank you for the reply. Here's one other quick data point that I've noticed today. Altering the "alternative destinations" setting changes some of the above behaviour. In the examples above the setting is at 4. If I reduce it to 1, then the overall % of passengers transported falls -- although it stays above 100%. Similarly, at some affected cities this will reduce the transported/available passengers ratio, though in most of the worst cases this ratio will remain above 1. However, at other affected cities the transported/available passengers ratio will increase.

It may be that this is unrelated to the bugs and simply reflective the normal behaviour of the "alternate destinations" setting. I thought I should mention it, however, just in case it turns out to be useful.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Possible bug: over 100% of passengers transported
« Reply #3 on: August 10, 2011, 11:12:09 PM »
Carl,

thank you for that. If the percentage remains over 100%, then it is not likely related to the bug (unless, highly improbably, there are two independent causes). One would ordinarily expect that reducing the number of alternative destinations would reduce the number of people transported, since, with fewer alternative destinations, the imperative to transport passengers to their initially preferred destination is greater, and any inability to do so will result in passengers not being transported at all.

Offline Carl

  • Devotee
  • *
  • Posts: 1599
    • Website
  • Languages: EN
Re: Possible bug: over 100% of passengers transported
« Reply #4 on: February 03, 2012, 11:35:07 AM »
Six months on, I think I might have some insight into the cause of this "double-counting" bug.

I suspect that the bug is related to "tourists" -- that is, passengers whose destinations are tourist attractions. If one turns the tourist_percentage down to zero, then the proportion of passengers transported on the map drops below 100% (from the levels reported in earlier posts).

Beyond this, I have a further tentative hypothesis about what may have caused this. Back in the 9.x days there was a bug relating to tourist attractions whereby stops which only served attractions would not generate any passengers (even though they would *demand* passengers). (See here: http://forum.simutrans.com/index.php?topic=6675.msg67359#msg67359)  This bug has been fixed for a long time, but my tentative conjecture is that the double-counting bug here arose from the fix to that bug.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Possible bug: over 100% of passengers transported
« Reply #5 on: February 04, 2012, 03:48:16 PM »
I think that I have found and fixed this on my 10.x Github branch - although it was not directly related to tourists. Can you re-test, if you can compile?

Offline Carl

  • Devotee
  • *
  • Posts: 1599
    • Website
  • Languages: EN
Re: Possible bug: over 100% of passengers transported
« Reply #6 on: February 04, 2012, 05:39:08 PM »
On first glance this appears to have done the trick. Thanks! I'll let you know if I run into any snags with further testing.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Possible bug: over 100% of passengers transported
« Reply #7 on: February 04, 2012, 06:54:44 PM »
Excellent!