News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Massively negative "distance" and corresponding costs

Started by Carl, July 01, 2010, 07:54:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Carl

I've been playing a map (pak64) for a few (in-game) years, and have noticed an odd pattern in some of my lines. Some of my lines (mostly bus lines, but some trains too) fluctuate wildly in the profit they deliver, despite the fact that their passenger numbers, revenue and running costs stay constant. We're talking some months a profit of -5,000 for a city bus route which runs vehicles with cheap maintenance costs. And this despite the fact that each individual convoy on the line shows a profit.

I was baffled for a while, until I noticed that the readings in the "Distance" graph in the line management box showed very odd figures which correlated with the profit and loss of these vehicles. Specifically, the "distance" value is often very, very far below zero -- in one case, -1,639,241. This seems confusing to me -- doesn't the "distance" value record how far convoys on that line have travelled? If not, how does "distance" end up negative, and how can I prevent this from happening?

Thanks in advance!

sdog

Those extremely high costs are likely refunds for money spent at a long distance line. This is an effect of too high travel times. The passengers time out in your buses and then incur the cost at that line. This is a bit in-transparent at the moment. As soon as the refund plot for convois is functional this will be easier to spot. (btw James, i think a global refunds diagram, would be necessary)

The way to cure it is to streamline your local transport and create some overcapacity. Second step create fast long range links.

Carl

Ok, thanks. On the lines in question, "refunds" are always at zero, so that seems rather strange. Also, how does this explain the odd values in "distance"?

Also -- what makes a travel time "too high"? Is it set by the limits in simuconf.tab?

sdog

maximum travel times are limited in experimental, the values are in simuconfig indeed.

i don't know how recent the files is in your install, you can compare and perhaps try it with the one from the development branch for example: http://github.com/jamespetts/simutrans-experimental/tree/devel. Alternatively you can play around with the values. The 8.2 file should be ok already. 8.0 had way too low values.

With 8.2 it's challenging, but it is doable with pak britain. I'm constantly fighting with delays all of the time, a single stuck side line can bring down my profits from +50k$  to -50k$


# Passengers have a maximum tolerance level for how long that they will
# spend travelling. The further that the passengers want to go, the more
# time that they will be prepared to spend travelling. The number is
# expressed in minutes. For each packet of passengers, the number of
# minutes travelling time (including waiting time) that they are prepared
# to tolerate is randomised between the minimum and maximum amount. The
# local, mid-range and long-distance passenger groups correspond to those
# above.

min_local_tolerance = 35
max_local_tolerance = 90
min_midrange_tolerance = 60
max_midrange_tolerance = 240
min_longdistance_tolerance = 150
max_longdistance_tolerance = 2160

Carl

Thanks!

So am I to understand that, if someone arrives at a destination and it's taken too long, that they receive a refund for their whole journey (all legs)? This would explain why the loss levels of some lines are so much higher than the revenues of those lines taken by themselves.

However, if this is the case, then the data in "Line Management" appears to be broken, since my charts display no refunds and instead seem to record this data in the "Distance" chart -- and even then, it's not clear what the metric is.


sdog

As i understood, yes. I think the refund graph is not functional yet.

The negative way traveled, is striking indeed. It could very well be an artifact from the refund system though.

This would happen if the route to the passengers origin is checked when it is deleted after timeout. The refund would be based on this route then, and the negative distance would be visible at the line. This is just a guess however, i don't know how james implemented the refund system.

jamespetts

Jha4ceb,

thank you for your post. This seems to me like a bug (integer overflow), not an artefact of the refund system. The refund system and graph is indeed fully functional in 8.x. Do you think that you could upload your saved game so that I could try to reproduce and fix the bug?
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.

sdog

Looking at the symptoms, there might be a refund display related problem:

Firstly the refunds are always for any line 0 for me, even when i artificially cause massive delays and witness passengers disappear.
The massive negative distance happens mostly at slow lines, at the fringes. I never have this at the efficient tram lines inside the directly linked large cities.
The losses in the balance would fit well to the refunds, they correspond directly to the profit of my network, and get more severe if some parts are stuck.

I can try to play with the refunds factor (now 1.5, earlier 2, to see if it influences the loss or the distance chart.)

The values in the negative distance chart are way to high to be the distance back to the origin, the refund is based on. Perhaps the values are overwritten by refunds?

jamespetts

Sdog,

thank you for the analysis. It is possible, I suppose, that there is a bug whereby, as you suggest, distance values are over-written with refund values. Does this occur only after saving/loading, or all the time?
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.

Carl

Here's my saved game:

http://www.mediafire.com/file/njmiiezyly2/Third.sve

You should be able to observe the phenomenon on any of the lines that aren't making a profit.

grainwatsky

Hi guys,
I'm a newbie and I have noticed exactely the same phenomenon occurring in my game (SimutransEx8.2 with PakGermanExp), as described by jha4ceb in this thread. Now the discussion abruptly ended...
Has it moved to somewhere else?
What could be done to make the game playable? sorry, in developing and solution finding i'm not gonna be of great help, as i'm not into informatics or design... i just love to play with trains and buses and stuff =)
Thanks and cheers!

ps. in my first post i also want to notice that i had terrible fun playing simutrans standard with different paksets... and simutrans experimental from the idea promises so much! jamespetts did an amazing job and implemented exactly the changes i had wished for, when i was still unaware of the experimental brach... and generally thanks for your work!

Carl

I've solved this problem by simply serving the lines with more frequent vehicles. Once the service is frequent enough, the distance will return to positive figures.

grainwatsky

Hi, thanks for the advice.

I tried out just having more vehicles for the routes that show such tremendous negative distance and profit values, however I'm not happy with it:
Often the lines that show this behaviour are very small train or smaller bus lines (with up to -6000 monthly profit). At the point where values of distance turn to positive when I buy more vehicles for that line, the vehicles are sometimes less than 5% filled, in average, and the resulting deficit is quite impressive for that reason (up to -2000 monthly with 7 buses on a small line).
Also, this behaviour seeems very difficult to anticipate, as profit changes drastically from month to month even without changes in game.
Secondly, to alleviate the problem with the idea of making passengers more tolerant to fine me for delays, I changed the following code in simuconf tab:
min_local_tolerance = 35
max_local_tolerance = 90
min_midrange_tolerance = 60
max_midrange_tolerance = 240
min_longdistance_tolerance = 150
max_longdistance_tolerance = 2160
to
min_local_tolerance = 35
max_local_tolerance = 200
min_midrange_tolerance = 60
max_midrange_tolerance = 500
min_longdistance_tolerance = 150
max_longdistance_tolerance = 4000

so doubling the maximal tolerance.
It did however only have an effect on some lines with negative distance and profit. On the other hand, profits and revenue of my (more or less fast but quite profitable) main lines dropped considerably down to ca. 50% which in turn is quite an unexpected and problematic behaviour to me.

So in the end, I wish just to turn down the level of fines. In previous posts in other threads I red that the value is set to 1.5 currently and I want to set it down, to see the behaviour of this change. Probably with Value=1 the fining shouldn't work, so I'll try that out first.

But: Where can I find and change this value? I didn't find it in simuconf.tab...
Probably others have already tried that out... did it work?

Thanks again and cheers!
grainwatsky

Carl

That's interesting. I've found a similar effect as you describe -- if I saturate lines with buses, then it's difficult to make the line break even. But the loss is usually small and far less than the previous fines, and I usually chalk it up to the philosophy that almost every transport system will have a few loss-making lines which exist for the purpose of feeding the profit-making ones.

However, I think that this feature reflects two problems with the game:

1) In Experimental, passengers are very intolerant of lines that are not *very* frequent. I find that on almost every train line I am forced to run a "subway"-style service -- a train every few minutes (or the equivalent of) -- or my passengers will start to become unhappy and fine me. But this often results in running almost empty trains on some routes. This seems unrealistic: many real-life minor lines have a less-than-hourly service. It seems to me that such a service would be impossible to run profitably on Simutrans Experimental. To my mind, passengers need to be more tolerant of waits. I know that this can be adjusted to a certain degree in simuconf -- but it seems to me that there is a more fundamental problem here than simply tampering with the variables.

2) As you note, the fines are very extravagant by default, resulting in huge losses for very small lines.

One more note on your use of the "tolerance" parameters to alter this. I was under the impression that those lines control whether a passenger will embark on a journey at all -- i.e. if a local journey will take more than 90 mins then they won't even bother. Have I got this wrong?

inkelyad

Quote from: jha4ceb on October 16, 2010, 02:31:50 PM
but it seems to me that there is a more fundamental problem here than simply tampering with the variables.
Well, simutrans passengers can't predict 'there will be fast train in 30min, let's go to bus', they want travel 'right now'. As I understand, it can't be easily fixed.

Carl

Exactly. What I should have said, then, is that the way the game is set up means it will necessarily be unrealistic in this way. I guess that in playing we just have to work around it.

vdel

I am playing Simutrans 102.3 Experimental 8.2 - pak128.Britain-Ex 0.7 and noticed the same behaviour as described by jha4ceb (high negative profit values along with negative distace values). I understand the ways you described to work around it, but still, it the negative distance a bug or it it intended to be that way?

jamespetts

This is a known issue in 8.2, which will be fixed in the next release, which will be made available once I have finished fixing all the other bugs in it, which will be soon, hopefully.
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.

grainwatsky

hi vdel, hi james,
(fantastic work, james!)
i've been playing simutrans experimental for quite some hours but i have no idea about the programming. So, as a layman, i can add the following to the question of vdel:

As James said, the graphical displays of "distance" and "refunds" do not work properly yet. This however does only make the game a little less clearly laid out, as it is more difficult for the player to assess the true profit of specific lines. However in the background, the game should work properly (i guess...)!

However, i susptect certain problems that lie deeper within the function that calculates "refunds" and especially the function that regulates passenger behaviour (well, sorry, no idea how that is programmed):

fistly, the solution to simply employ more convoys to a line with negative distance (which means with high refunds, as i red earlier in this thread) works very well for simple systems.
However this of course has massive implications on the choice of vehicles you normally make, namely you choose as much small vehicles with small capacities as possible on the lines. Therefore, it is a bit unrealistic, as to run the game profitably you sometimes have just one choice among the different vehicles of your pakset. that is to say, e.g. you will never use faster locomotives with many kilowatts and high mileage costs , if there is a version with less mileage costs that is profitable with less carriages (as with large convoys you either get to pay refunds, if too few convoys, or you have unprofitably empty convoys).

secondly, passenger behaviour is too easily influenced by minor changes in the whole game, and this in my opinion is the really difficult point: from my experience in playing, augmenting the rate (but not capacity) of a line can have more influence than e.g. building a new line that goes more directly to a certain destination. With e.g. one convoy more on one line, sometimes up to 100% of the passengers travelling to a certain destination change their routes. This is highly unrealistic and difficult to handle. The capacity on that line of course is not taken in consideration by passengers and stations and vehicles fill up, often until the end of the month or until the end of the next month or so. Then, the line with too few capacity suddenly gets abandoned completely and the "fill up" starts with the alternative line. The function that calculates passenger behaviour seems to be too easily influenced by the number of vehicles on a line (which probably means by even very small differences in journey time incl. waiting time, but not at all by the mileage). Consequently, the game only works properly after hours and hours of careful balancing of capacities and convoy numbers.

sorry, that's my experience, and i didn't do any real statistics...
vdal have fun anyway (I really do)! And james, thanks a lot: it's already so much more interesting than the standard version!

jamespetts

Grainwatsky,

the algorithm used for calculating routes in Simutrans-Experimental is simple in principle: passengers and goods will always take the route with the lowest overall journey time (being a sum of all waiting and travelling times). From Simutrans-Experimental 9.0 onwards, the minimum waiting time at any stop will be increased from 1 to 4 minutes in order to eliminate some of the potentially more perverse transfers that have been reported in the current release. Also, in the latest release of Pak128.Britain-Ex, the waiting time tolerance has been substantially increased, so there are far fewer passengers/goods that generate refunds if they are kept waiting for a while: now, only a very, very long wait indeed will lead to an aborted journey and a refund.

In any event, I am glad that you like Simutrans-Experimental; hopefully, the next release will refine the experience even more for 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.