Skip to content
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

Vehicle Groups: parent group should count total number of vehicles in subgroups #6189

Closed
DorpsGek opened this issue Dec 26, 2014 · 6 comments
Labels
bug Something isn't working component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) stale Stale issues

Comments

@DorpsGek
Copy link
Member

2006TTD opened the ticket and wrote:

For ease of discussion I attached a screenshot showing a sample multi-level vehicle group.

First, I understand that in "Level 2" the grayed out entries are those that belong to the subgroups, this has no problem.

However, the number of vehicles shown on the left panel (i.e. the column at which the yellow arrow is pointing) may be confusing.
"Level 2" is displaying the figure of 1 - one vehicle which is in the group, but not in any of the subgroups, but some may be thinking it should be displaying 1+1+3+4+0 = 9

A similar problem is also seen in "2A", it may be debatable on whether it should be 1 or 1+3+4 = 8

To tackle this problem, there may be three solutions:
(1) Leave it as it is and add to the documentation that the numbers are meant for the vehicles that belong to that group at that level exclusively, but that is not very reasonable as many would expect a sum of the group and the subgroups from a mathematical perspective.

(2) Display the total number of vehicles in that group and subgroups
i.e. Level 1 would show 0+2+1+2 = 5; Level 2 showing 9; 2A showing 8 and so on.

(3) Display both figures in the form
(Number of vehicles in group only) / (Total number of vehicles in group and subgroups)
i.e. Level 1 would show 0/5; Level 2 showing 1/9; 2A showing 1/8 and so on.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6189
@DorpsGek
Copy link
Member Author

andythenorth wrote:

In my experience (YMMV), hierarchies like the group hierarchy show a total per node based on the contents of all child nodes, not just on the contents of the node.

TL:DR; it should sum the subgroups.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6189#comment14541

@DorpsGek
Copy link
Member Author

3298 wrote:

Ah, you found the correct ticket for that preparatory patch I posted over at #6053. I must've missed it. Thanks, Andy! :)

The patch implements solution 2 - with collapsed subgroups solution 1 is even more counterintuitive than now.
Solution 3 never occurred to me, but reading it now I find it intriguing. Though I'd change the format to "only_this_group (+sum_of_subgroups)" to avoid ambiguity. Opinions?


This comment was imported from FlySpray: https://bugs.openttd.org/task/6189#comment14542

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 5, 2017

2006TTD wrote:

Just caught up with this today. I would agree that using parentheses is clearer than the / symbol proposed previously.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6189#comment14778

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 7, 2018
@andythenorth
Copy link
Contributor

andythenorth commented Apr 13, 2018

3298 has stopped working on this. https://www.tt-forums.net/viewtopic.php?f=33&t=83025

I do think it's a legit improvement.

@TrueBrain
Copy link
Member

I even consider this a bug; it is very not-what-you-expect!

@stale
Copy link

stale bot commented Mar 25, 2019

This issue has been automatically marked as stale because it has not had any activity in the last two months.
If you believe the issue is still relevant, please test on the latest nightly and report back.
It will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@stale stale bot added the stale Stale issues label Mar 25, 2019
LordAro added a commit to LordAro/OpenTTD that referenced this issue Mar 26, 2019
LordAro added a commit to LordAro/OpenTTD that referenced this issue Mar 26, 2019
LordAro added a commit to LordAro/OpenTTD that referenced this issue Mar 26, 2019
douiwby pushed a commit to douiwby/OpenTTD that referenced this issue Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) stale Stale issues
Projects
None yet
Development

No branches or pull requests

3 participants