Skip to content

Expose the knitro context#600

Merged
FabianHofmann merged 3 commits intomasterfrom
expose_knitro_context
Mar 4, 2026
Merged

Expose the knitro context#600
FabianHofmann merged 3 commits intomasterfrom
expose_knitro_context

Conversation

@finozzifa
Copy link
Collaborator

Closes # (if applicable).

Changes proposed in this Pull Request

As part of the ACER project for OET, we need to calculate several metrics which require the Knitro context object.

These metrics are project specific and should therefore not be returned by linopy.

This pull request therefore:

  • exposes the knitro context as part of the output of linopy
  • does not free the knitro context (otherwise it could not be returned and it would just return a null pointer)

On top, the pull request also provides a small change to the static method _extract_values.

Checklist

  • 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.

@FabianHofmann FabianHofmann merged commit a90f1e6 into master Mar 4, 2026
18 of 20 checks passed
@FabianHofmann FabianHofmann deleted the expose_knitro_context branch March 4, 2026 06:52
FabianHofmann pushed a commit that referenced this pull request Mar 4, 2026
* code: expose knitro context and modify _extract_values

* doc: update release_notes.rst

* code: include pre-commit checks
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.

2 participants