New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Measure vehicle capacity utilisation efficiency #7353
base: master
Are you sure you want to change the base?
Conversation
This pull request has been automatically marked as stale because it has not had any activity in the last month. |
I don't think this should sink. It could be a nice goal for players and highscores / goals. It also gives increased purpose to versatile, refittable vehicles / wagons. |
Here's a rebase to current master for now. I think I'll take out the company rating stuff for now and just make the efficiency measurement something you can view and sort by, but not affecting the scoring. I'll rather address company ratings in a separate patch that could then also add GS custom ratings. |
That sounds actually like a good plan. It's two different things. |
Should penalty for waiting for load (without receiving cargo) and penalty for waiting at signals (and maybe also whatever road vehicles can wait at) be controlled by separate settings? |
I'm marking this ready for review as I believe it's feature complete and basically correct. I'm still unsure about several of the GUI changes, and there may be some balancing required on the penalty for waiting. |
28a2c33
to
c7e772f
Compare
This should address all the points. I intend to clean up all the small commits later, leaving them in for now for review purposes. |
I'm not sure if this should be merged before 1.10 branches. My original idea with this was to also change the performance rating calculation so the (often impossible) "all vehicles have >£10k profit" item could be replaced with something like "all vehicles have >40% efficiency", but I removed the performance rating change from the branch again. The new plan is to make a GS interface for performance rating overrides instead, and I think this PR is not quite worth releasing without also having GS performance ratings. (And I haven't gone much further than ideas stage for that part.) |
Rebase needed |
This is calculated as the ratio of "ton-miles delivered" over "ton-miles travelled". The former is calculated as amount of cargo delivered multiplied by Manhattan-distance between pick-up and delivery station, and the latter is total cargo capacity multiplied by actual distance driven. This rating favours vehicles running at close to capacity, with more direct (less winding) routes.
I found a funny issue, I think: if a vehicle takes more than a year to do a round-trip, the values get non-useful. For example, I have a train with 300% efficiency! And the next year 0%. I need some more thinking about this myself, but just wanted to leave it here. I did rebase this PR, but it was not as clean as I would like, so I had to modify some things .. hopefully I did it correct :D |
Test save attached for demo purposes. Only uses grfs from bananas. |
Measure the capacity utilisation efficiency of vehicles by measuring the actual distance traveled, and multiplying by capacity. When deliveries are made, accumulate the cargo-distance delivered. (Distance delivered is the Manhattan-distance between source and destination.) Dividing cargo-distance delivered over capacity-distance traveled gives a utilisation efficiency.
A vehicle traveling full everywhere, by the shortest possible route, would have (near) 100% efficiency, while a vehicle traveling empty half the time (e.g. minerals train from mine to smelter) and going by a winding route might only hit 30% efficiency.
Vehicles waiting for their turn to load cargo are also counted as wasting potential capacity.
Overall the intention of this patch is to calculate a figure that might better indicate the economic viability of a vehicle than the simple profit-last-year figure. ("Is this vehicle actually doing something useful?") Part of the intention is as an alternative to the "false" profit sharing algorithm for feeder routes, especially the large negative profits it can apply to e.g. buses making the last leg from a long-haul air route, despite the buses actually being vital.
In addition to this (and this part should probably at the very least be split into a separate commit), the patch adds a new element to the company performance rating calculation, but with a switch so the performance rating uses either lowest vehicle profit, or lowest vehicle efficiency, as a measure for the rating, but not both.
To do: