News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

[Fixed] Problem with goods list revenue calc

Started by tick tock, April 29, 2009, 08:42:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tick tock

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


jamespetts

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).
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.

tick tock

Quote from: jamespetts on April 29, 2009, 11:10:25 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.

tick tock

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 <a href="http://forum.simutrans.com/index.php?topic=982.0">here</a>, 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

jamespetts

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.
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.

tick tock

Quote from: jamespetts on May 02, 2009, 05:34:00 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)

jamespetts

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.
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.

tick tock

Glad you found it!  I'm using Windows Vista Home Premium.

jamespetts

Hmm, I don't have Vista, and test with XP. I wonder why the types are different? Have you tried 3.3 yet?
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.

tick tock

#9
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...



jamespetts

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.
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.

tick tock

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?

jamespetts

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).
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.