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 missing tests for integer control parameters #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nelsonuhan
Copy link
Contributor

I implemented tests for the LP_solver_integer control parameters I added in #10.

Including: sr_heur, fp_heur, ps_heur, ps_tim_lim, cov_cuts, clq_cuts, mip_gap, presolve, binarize.
Copy link
Owner

@bradfordboyle bradfordboyle left a comment

Choose a reason for hiding this comment

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

Thanks for adding these tests. It seems like what is being tested is whether or not an error is raised when different parameters are toggled. Is there any way to check the state of the LPX object after calling integer() to test if the control parameter had the intended effect?

def testSimpleRoundingHeuristic(self):
"""Test the sr_heur parameter."""
if env.version<(4,57): return
legals=True, False
Copy link
Owner

Choose a reason for hiding this comment

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

Looking at 'src/lp.c', the argument sr_heur is declared to be an integer and not a boolean. Should 0, 1 be included in the list of legal values? Is there anything that can be checked after calling integer() with this argument to check if it was actually used?

@nelsonuhan
Copy link
Contributor Author

Is there any way to check the state of the LPX object after calling integer() to test if the control parameter had the intended effect?

That's a good point - I'll look into it.

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