Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iteration count method for SolverModel #18

Closed
wants to merge 3 commits into from

Conversation

nunzioono
Copy link

As mentioned in this discussion, there was not a direct method to get the iteration count of the model. I made a very simple method to get it, as it happens also for the status of the model implemented in the same struct SolverModel i think it would be nice to have a function to have the iteration count without dealing with the unsafe code either cause there already an interface written to deal with the c bindings.

@nunzioono
Copy link
Author

@lovasoa hope this solves my problem and also helps future users of highs

@nunzioono nunzioono closed this by deleting the head repository Sep 28, 2024
Copy link
Collaborator

@jajhall jajhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Highs_getIterationCount is deprecated so will disappear in v2.0. This is because there are now four solvers that yield iteration counts (simplex, interior point, PDLP and QP), so it is ambiguous. When the method was created, we only had the simplex solver.

Please use Highs_getIntInfoValue(const void* highs, const char* info, HighsInt* value) using info="simplex_iteration_count", as I suggested originally.

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