Skip to content

Comments

Update Python, RTC-Tools and Casadi versions#294

Draft
jarsarasty wants to merge 13 commits intomainfrom
update-python-and-rtc-tools-version
Draft

Update Python, RTC-Tools and Casadi versions#294
jarsarasty wants to merge 13 commits intomainfrom
update-python-and-rtc-tools-version

Conversation

@jarsarasty
Copy link
Collaborator

Update the following versions: Python (3.9-3.13), RTC-Tools (2.7.0), and Casadi (3.7), which includes Highs (v1.10).
The updates have been implemented in the requirements, GitHub workflows, documentation and tox configurations.

Please note that Python 3.8 has reached its end of life and is no longer supported.

Update requirements in Setup. Python 3.13 is now
used in Github workflows
Update the autogenereted versioneer.py and
_version.py files with the latest versioneer
package. This makes versioneer compatible with
python 3.12.
Remove gitlab CI/CD yaml file,
since the repository has moved to Github
@jarsarasty jarsarasty marked this pull request as draft May 27, 2025 15:25
@jarsarasty jarsarasty marked this pull request as ready for review May 27, 2025 15:26
@jarsarasty jarsarasty marked this pull request as draft May 30, 2025 13:00
@jarsarasty
Copy link
Collaborator Author

Changes were implemented to update the supported Python versions, as well as the Casadi and RTC-Tools dependencies.
After these changes, some infeasibilities appeared in certain cases. An investigation showed that Highs declares some problems as infeasible, whereas more mature solvers were able to find an optimal solution.
A minimal, reproducible problem should be obtained and shared with Highs' developers for further investigation.
Please note that these changes mean Python 3.8 is no longer supported.

@jarsarasty
Copy link
Collaborator Author

jarsarasty commented May 30, 2025

Update: An optimal solution is found with Highs 1.7.0, but Highs v1.10.0 declares infeasibility for the same model
cplex_results.txt
highs_170.txt
HeatPython.txt

@jarsarasty
Copy link
Collaborator Author

A minimal reproducible example was created, and the issue has been reported to HiGHS developers.

@jarsarasty
Copy link
Collaborator Author

The issue has been resolved in Highs, but a new Casadi release with this bug fix is not yet available.

@KobusVanRooyen
Copy link
Collaborator

@jarsarasty was there a need to upgrade the python version as well in this PR? Why not just update rtctools and Casadi version first? Because now this PR is a mixture of many things. Also since we had this issuer already in the past, did you have a look at #183. Here you could see that presolve was the issue.

@jarsarasty
Copy link
Collaborator Author

jarsarasty commented Jun 18, 2025

Hi @KobusVanRooyen,

Thank you for your feedback!

Python 3.8 has officially reached the end of its life cycle and is no longer supported by the latest version of RTC-Tools. Because of this, we need to update the minimum Python version for Mesido to 3.9 before updating RTC-Tools.

I agree that this PR could be split:

  • Update minimum Python version (and pipelines)
  • Update RTC-Tools and Casadi

However, the minimum Python version update must be merged first due to the dependency.

Given the current issue with Casadi and solver compatibility, I suggest we put this PR on hold until:

  • Casadi includes a more recent version of Highs in a new release, or
  • We find a way to use a different solver version within Casadi

Regarding pull request #183, I did not look into it, but I am aware of the option to deactivate presolve. However, presolve can offer significant speedups when dealing with MILPs, and the incorrect behavior of Highs seems to occur only in very specific cases. Therefore, for now, I would advise against deactivating presolve by default, but rather consider it as a fallback option in case of infeasibilities. We can discuss this or other alternatives.

Let me know if you have any other suggestions!

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