-
Notifications
You must be signed in to change notification settings - Fork 5
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
Equal ratio allocation objective #1366
Conversation
Explanation of this formula: Since |
@jarsarasty thanks for your comment. |
Indeed, the result is counterintuitive at first sight. However, if we consider that there is a capacity in the total flow (maximum flow), the original formulation of the objective function tends to favour the demands that are easier to satisfy (i.e. the demands with a lower value) to the detriment of the other demands. This is because in the objective function all By including the demands as weighting factors in the objective function, each unit of demand (e.g. m3/s) is given the same weight, and because the objective is quadratic, the optimal solution tends to allocate the same fraction to all demands (users). However, the fractions cannot be expected to be equal in a more general case, as other constraints may come into play. For example, in the case with demands 10, 10, and 100, and a maximum flow of 100, optimizing the original objective function yields the following results:
whereas for the second case, we have:
Clearly, in the first case, the large demand gets a smaller allocation than in the second case (80.39 vs. 83.33), but the sum of the quadratic fractions in the first case is much smaller than in the second case ((0.039 vs. 0.083), where the solution is optimized for the weighted sum of the quadratic terms. |
Hi @jarsarasty, thanks a lot for your in depth reply. There a some things that I do not yet fully understand, maybe you can elaborate:
Before the added weight, the quadratic terms look like
Is this true? Would this indeed incentivize the equal fraction allocation? |
Thanks @jarsarasty! |
Hi @SouthEndMusic, These are very good questions. I realized that I need to make some clarifications
I was referring to the
By multiplying the
The factor
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! The discontinuity across demands of 1e-5 m3/s feels a little uneasy:
Add an objective term
demand * (1 - flow/demand)^2
. If the absolute
value of the demand is very small, this would lead to huge coefficients,
so in that case a term of the form(flow - demand)^2
is used.
Though this is less than 1 m3/day, so it shouldn't be an issue except in exceptional cases.
TLDR: I found my proof 👌 Objective function: Used flow: The used flow defines a Here the Writing the error in terms of the coefficients where from which we conclude that all allocated fractions |
Great, @SouthEndMusic! It's worh mentioning the assumptions: i) arc capacities are not binding ii) By the way, a proof can also be derived using the KKT optimality conditions. |
Fixes #1348.
The objective function I found that leads to equal fraction allocation has terms of the form
I can't explain yet why this works.