Add scaling#817
Conversation
|
@davide-f Great work here! This is a long wanted feature! |
Thanks for the comment! This was a prototype that needs finalization if you and Fabian see it relevant. |
|
@davide-f great, I will take a look at this in the coming days. #524 already implemented scaling but in another fashion. it follows the idea of auto-scaling by a certain method. this pr requires the user to insert the scaling parameters by themselves. Since this pr gives the user more control I am closing #524. We might want to think about how to extent this later by an auto-scaling mechanism. |
|
@davide-f I agree with @FabianHofmann. But having such an auto scale feature (and building it in a way to easily extend it to new sscaling trategies) should be a follow up and non blocking to this I think. |
Closes # (if applicable).
Changes proposed in this Pull Request
This PR aims to showcase a possible implementation of scaling into linopy.
Scaling of mathematical problems is complex and different solvers adopt different standards (if any). Generally, it is up to the modeller to cast the problem within adeguate ranges. This PR may give an intermediate tool to answer this problem.
The idea is to add a scaling parameter to each variable, constraint and objective term that will be used to scale the problem accordingly.
Scaling applied to each variable divides all coefficients of the variable column-wise, while scaling applied to constraints or the objective apply the scaling row-wise.
This PR is being used for testing the role of scaling and showcase a possible implementation.
Checklist
AGENTS.md).doc.doc/release_notes.rstof the upcoming release is included.