Generalisering vekting av sekundærmål#4
Open
simen-barnes wants to merge 1 commit intomainfrom
Hidden character warning
The head ref may contain hidden characters: "3-generalisering-vekting-av-sekund\u00e6rm\u00e5l"
Open
Conversation
…ests for availability scenarios
Contributor
There was a problem hiding this comment.
Trenger vi å ha med denne endringen? Hva er greien?
| # n^2*x + n*x + h, der n er antall intervjuer, x er en konstant. | ||
| def calculate_secondary_objective_weights(num_interviews: int) -> dict[str, float]: | ||
| # Vekten for clustering øker kvadratisk med antall intervjuer, for å prioritere det mer når det er mange intervjuer. | ||
| clustering_weight = 0.001 * (num_interviews ** 2) |
Contributor
There was a problem hiding this comment.
Dette vil vel fort føre til at det prioriteres over antall intervjuer.
Du mener kanskje 1/( num_interviews ** 2)?
Contributor
There was a problem hiding this comment.
Foreslår noe sånt som dette for å generalisere det:
secondary_penalties = [
[...], # listen av variabler for én type
[...] # listen av variabler for neste type
]
mip.xsum(mip.xsum(1/(num_interviews ** i)) * penalities for i, penalties in enumerate(secondary_penalties))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.