Skip to content

Add scaling#817

Draft
davide-f wants to merge 4 commits into
PyPSA:masterfrom
davide-f:add_scaling
Draft

Add scaling#817
davide-f wants to merge 4 commits into
PyPSA:masterfrom
davide-f:add_scaling

Conversation

@davide-f

@davide-f davide-f commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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

  • AI-generated content is marked (see AGENTS.md).
  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • Unit tests for new features were added (if applicable).
  • A note for the release notes doc/release_notes.rst of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant