The International Simutrans Forum

 

Author Topic: [Fixed] Problem with goods list revenue calc  (Read 3765 times)

0 Members and 1 Guest are viewing this topic.

Offline tick tock

  • *
  • Posts: 52
[Fixed] Problem with goods list revenue calc
« on: April 29, 2009, 08:42:58 PM »
It looks like the goods list window now provides base revenue per unit for an entire distance, as opposed to ST Standard where it's per km, correct?

(As a minor aside, it'd be nice to have the ability to type in the dist/comfort values, similar to the entry boxes found on the Create a New Game menu.  I realize that by holding down the inc/dec buttons it's possible to speed up the adjustment, but it's faster to just type if you've got large changes to make.)

The revenue listed for passengers (I've not checked other goods yet) seems to have some errors in calculation at larger distances.  Note: I'm testing this in pak128 & pak128.Britain with speedbonuses reduced by half.  If you use the original speedbonuses all the following distances will be doubled.  Comfort set at 50.  Here are just a couple examples where revenue rises fairly steadily and then calculation goes awry:

Using "Ship, distance 86" revenue is 2.70 Cr, but at dist 87 it jumps to 3.87 Cr, then at dist 88 it falls to 3.11
Rail, dist 226=7.09, dist 227=10.09, dist 228=10.13, dist 229=8.10

I see the same type of discrepancies with other types of transport as well, just at different distances and revenues obviously.

Let me know if you need more info.  Thanks 

EDIT:  problem fixed in v3.3

« Last Edit: May 02, 2009, 10:26:14 PM by tick tock »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18422
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with goods list revenue calc
« Reply #1 on: April 29, 2009, 11:10:25 PM »
Tick Tock,

thank you very much for the report. Unfortunately, I cannot reproduce this one at the moment. Could you try the new version (3.0 - just out), including the configuration files that I have included with it (which includes provision for reducing the speed bonus to 45% of the default values in order to make it compatible with the default speedbonus.tab), and see whether you still get the same results? I did try a number of different settings, but could not get the same perverse results as you produced.

And you do correctly surmise that the calculation is for the whole distance, rather than per kilometre: the reason for this is that, in Simutrans-Experimental, the effect of speed and comfort vary with distance, so it is not possible to have a display that is entirely distance neutral (conceivably I could have done it per kilometre in any event for the total distance, but I thought it easier to give the whole amount, since it is a useful feature in any event to be able to see the total revenue over a distance).

Offline tick tock

  • *
  • Posts: 52
Re: Problem with goods list revenue calc
« Reply #2 on: April 29, 2009, 11:34:06 PM »
(conceivably I could have done it per kilometre in any event for the total distance, but I thought it easier to give the whole amount, since it is a useful feature in any event to be able to see the total revenue over a distance).

Yes, very useful.

I'll download the new files and give it a go shortly.  Thank you.

Offline tick tock

  • *
  • Posts: 52
Re: Problem with goods list revenue calc
« Reply #3 on: May 02, 2009, 01:30:23 AM »
James -

Okay, now that v3.1 is out and speedbonus numbers are back...I'm still seeing errors in the revenue calculations. 

For the following example, I'll use pak128.Britain and your speedbonus.tab from here, as you probably have them handy.  Not using timeline.

So with comfort set at 50, type set to "Ship", and distance set to 99, you should have a passenger revenue of 3.13.  Yes? I hope. Then if you increment to 100, revenue is 3.14, which is probably as you intended.  However, at 101 it jumps to 3.57 and rises slowly from there until, at dist 121, total revenue starts falling with increasing distance.

As before, the same discrepancies show up with all waytypes, just at different distances.  I haven't looked at any goods yet.

I hope you can replicate these results!  Thanks

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18422
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with goods list revenue calc
« Reply #4 on: May 02, 2009, 05:34:00 PM »
Tick Tock,

thank you for your further feedback - your testing is most helpful. I am having trouble reproducing your issue, though, and I am not sure why. Using PakBritain (the speedbonus.tab does not do anything if the timeline is turned off), with comfort at 50, distance at 99, and the speed bonus at 0, I get passenger revenue of $4.47. At 100, it is $4.49. At 101, it is $4.53. At 102, it is $4.56. At 120, it is $5.15. At 121, it is $5.16. At 122, it is $5.21, and at 123, it is $5.22.

Offline tick tock

  • *
  • Posts: 52
Re: Problem with goods list revenue calc
« Reply #5 on: May 02, 2009, 07:08:37 PM »
Using PakBritain (the speedbonus.tab does not do anything if the timeline is turned off), with comfort at 50, distance at 99, and the speed bonus at 0, I get passenger revenue of $4.47. At 100, it is $4.49. At 101, it is $4.53. At 102, it is $4.56. At 120, it is $5.15. At 121, it is $5.16. At 122, it is $5.21, and at 123, it is $5.22.

James -

From looking at your revenue values, I think you have waytype set to "Rail".  Please try the same comfort/dist settings, but switch to "Ship".  You should see the same results I got.   (Or if you stay with rail, at dist 233 revenue is 7.31, at 234 it's 10.40)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18422
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with goods list revenue calc
« Reply #6 on: May 02, 2009, 08:24:06 PM »
Tick Tock,

aha - found it! For some reason, I was getting the same figures with "ship" as you were getting with "rail" (that might be an issue in itself - may I ask: what platform are you using - Windows or Linux?). This was an error relating to the calculation of passengers' tolerable comfort level that had been present since version 2.0. Thank you for finding it! :-)  It is now fixed in version 3.3.

Offline tick tock

  • *
  • Posts: 52
Re: Problem with goods list revenue calc
« Reply #7 on: May 02, 2009, 08:29:34 PM »
Glad you found it!  I'm using Windows Vista Home Premium.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18422
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with goods list revenue calc
« Reply #8 on: May 02, 2009, 08:33:41 PM »
Hmm, I don't have Vista, and test with XP. I wonder why the types are different? Have you tried 3.3 yet?

Offline tick tock

  • *
  • Posts: 52
Re: Problem with goods list revenue calc
« Reply #9 on: May 02, 2009, 08:46:58 PM »
Yes, I'm trying 3.3 now. 

If it helps track down the source of the variation, here are the base rev values for passenger that I get for each type at dist 100 (comfort 50):

road 5.01
rail 5.24
ship 4.47
monorail 5.24
maglev 5.65
tram 5.01
narrow gauge 5.01
air 5.75



The change in revenue with increasing distance does not always go up steadily.  It's relatively minor, but I just want to mention it to make sure it's what you intended.  For example (and hopefully you can figure out how to match up with my "Ship" type if necessary):

Ship, comfort 50, Passengers revenue

dist 130, revenue 4.31
dist 131, revenue 4.31 (+.00 increase from previous distance)
dist 132, revenue 4.35 (+.04)
dist 133, revenue 4.35 (+.00)
dist 134, revenue 4.38 (+.03)



There are some instances in which total revenue per passenger decreases slightly with increased distance. Example:

Ship, comfort 50, Passengers

dist 168 revenue 5.01
dist 169 revenue 5.00 (-.01 from previous distance)
dist 170 revenue 5.03 (+.03)
dist 171 revenue 5.02 (-.01)
dist 172 revenue 5.05 (+.03)
dist 173 revenue 5.08 (+.03)
dist 174 revenue 5.07 (-.01)
and so on...


« Last Edit: May 02, 2009, 09:20:59 PM by tick tock »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18422
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with goods list revenue calc
« Reply #10 on: May 02, 2009, 09:40:44 PM »
Tick Tock,

thank you for your reply - I am glad that the numbers are less erratic now. That the revenue can decrease slightly with an increase in distance is consistent with what I intend (provided that the overall trend is for it to increase), as, as the distance increases, so does the tolerable comfort level. The further below the tolerable comfort level that the transport drops, the lower the revenue, which might, in some instances, more than counterbalance the increase in revenue from the distance.

As to the various types, my readings are:

Road: 5.59
Rail: 5.69
Ship: 5.31
Monorail: 5.69
Maglev: 5.86
Tram: 5.59
Narrow gauge: 5.59
Air: 5.90

It seems as if there might be different default speed values for when there is no speedbonus.tab, or when the timeline is off.

Offline tick tock

  • *
  • Posts: 52
Re: Problem with goods list revenue calc
« Reply #11 on: May 02, 2009, 10:23:08 PM »
Are you saying that our displayed speed values must be different?  So, would two users with otherwise identical settings have the same revenue figures as long as they make sure their speed values are identical for a particular waytype?  In other words, let's say the two users want to take a look at revenue for "Road" at a given distance; so they make sure they have the same distance and comfort values, and then if they adjust their displayed speed for Road to the same value, their revenues should match up?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18422
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with goods list revenue calc
« Reply #12 on: May 02, 2009, 10:27:01 PM »
No, they wouldn't necessarily match up, because what counts is the relationship between the actual average speed and the expected average speed (speed bonus setting of 0).