Override group discomfort #197

Closed
opened 2024-12-25 17:45:31 +00:00 by bustikiller · 1 comment
Owner

The current implementation of the discomfort calculator uses two concepts related to group relationships:

  • Distance between two groups, which is nil for unrelated groups (we can think of it as infinity), or the maximum distance to a common ancestor otherwise.
  • Discomfort between two groups, which is a number between 0 (no discomfort) and 1 (total discomfort), calculated as a function of the distance. For example, the discomfort of a group with itself is zero, and the discomfort of two completely unrelated groups is 1.

Calculating the discomfort as a function of the distance is fine for an initial approach, but users should be able to override that behavior. For example, say you have a group Work with three subgroups per department, say Accounting, Sales, and Finance. Since all three groups have the same parent, the distance between them is 1, and the discomfort is (1/2). However, we are assuming that the three groups are equally comfortable with each other, which may not be the case. Maybe Sales and Finance are super close, and their discomfort would be zero, or Sales and Accounting are long-time enemies and their discomfort would go beyond 1 if that was possible.

We need to allow users configure the discomfort between groups, not as a function, but as an arbitrary value. In this issue we are suggesting the following criteria:

  • Discomfort 0 means the groups get on well with each other, friction is minimum.
  • Discomfort 1 means the groups are unrelated with each other.
  • Discomfort 2 means the groups are enemies, so the arrangement of tables should avoid putting them in the same table as much as possible.

All decimal numbers between 0 and 2 are allowed to represent different levels of affinity between groups. It is OK that the software suggests a value by default (calculated using the existing formulas), but these should be editable with a UI.

Having N groups in a wedding, the maximum number of affinities to store will be N(N-1) / 2. However, the matrix of affinities may not be dense, as there may be many groups that are unrelated, and thus have neutral affinity with each other (discomfort 1). Therefore, we may choose to implement affinities in a way the value is only stored if it's not equal to 1, and assume the value is 1 if not overriden.

The current implementation of the discomfort calculator uses two concepts related to group relationships: - Distance between two groups, which is `nil` for unrelated groups (we can think of it as infinity), or the maximum distance to a common ancestor otherwise. - Discomfort between two groups, which is a number between 0 (no discomfort) and 1 (total discomfort), calculated as a function of the distance. For example, the discomfort of a group with itself is zero, and the discomfort of two completely unrelated groups is 1. Calculating the discomfort as a function of the distance is fine for an initial approach, but users should be able to override that behavior. For example, say you have a group _Work_ with three subgroups per department, say _Accounting_, _Sales_, and _Finance_. Since all three groups have the same parent, the distance between them is 1, and the discomfort is (1/2). However, we are assuming that the three groups are equally comfortable with each other, which may not be the case. Maybe _Sales_ and _Finance_ are super close, and their discomfort would be zero, or _Sales_ and _Accounting_ are long-time enemies and their discomfort would go beyond 1 if that was possible. We need to allow users configure the discomfort between groups, not as a function, but as an arbitrary value. In this issue we are suggesting the following criteria: - Discomfort 0 means the groups get on well with each other, friction is minimum. - Discomfort 1 means the groups are unrelated with each other. - Discomfort 2 means the groups are enemies, so the arrangement of tables should avoid putting them in the same table as much as possible. All decimal numbers between 0 and 2 are allowed to represent different levels of affinity between groups. It is OK that the software suggests a value by default (calculated using the existing formulas), but these should be editable with a UI. Having N groups in a wedding, the maximum number of affinities to store will be `N(N-1) / 2`. However, the matrix of affinities may not be dense, as there may be many groups that are unrelated, and thus have neutral affinity with each other (discomfort 1). Therefore, we may choose to implement affinities in a way the value is only stored if it's not equal to 1, and assume the value is 1 if not overriden.
bustikiller changed title from Override group distance to Override group discomfort 2024-12-26 18:29:38 +00:00
Author
Owner

Implemented in #215

Implemented in https://gitea.bustikiller.com/bustikiller/wedding-planner/pulls/215
Sign in to join this conversation.
No Label
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bustikiller/wedding-planner#197
No description provided.