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
Closed

Comments

@DorpsGek
Copy link

@DorpsGek DorpsGek commented Dec 26, 2014

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

This comment has been minimized.

Copy link
Author

@DorpsGek DorpsGek commented Aug 17, 2017

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

This comment has been minimized.

Copy link
Author

@DorpsGek DorpsGek commented Aug 17, 2017

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

This comment has been minimized.

Copy link
Author

@DorpsGek 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
@andythenorth

This comment has been minimized.

Copy link
Contributor

@andythenorth 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

This comment has been minimized.

Copy link
Member

@TrueBrain TrueBrain commented Apr 13, 2018

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

@stale

This comment has been minimized.

Copy link

@stale 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 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
@PeterN PeterN closed this in #7417 Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.