PyPSA / PyPSA/linopy

Deprecation in xpress Python interface

Open
#533 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug solver interface
Dominant language
Python
Stars
257
Forks
87
Avg merge
1d 3h
Merged PRs (30d)
29

Description

Deprecation for getObjVal

According to the FICO Xpress Python Interface available here, the method problem.getObjVal will be deprecated. The documentation suggests to perform the following substitution.

problem.getObjVal() 

with

problem.attributes.objval

We use the method in linopy here.

Deprecation for getProbStatusString

According to the FICO Xpress Python Interface available here, the method problem.getProbStatusString will be deprecated. The documentation suggests to perform the following substitution.

problem.getProbStatusString()

with

roblem.attributes.solvestatus and problem.attributes.solstatus

We use the method in linopy here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in linopy/solvers.py at the linked uses around lines 1599 and 1605, then check the Xpress Python Interface deprecation guidance for the replacement attributes. Update both deprecated calls while preserving the existing objective-value and status handling, and verify the Xpress solver path still reports the same results.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.