• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Integer constraints in solver

Klev

New Member
Hi,

I have a setup on solver with one of the constraints given an "integer" constraint. Also, it is limited between min-max values(positive) from two other cells. I have a display cell that shows the current value of the constraint when solver is running and I noticed that certain values are showing are non-integers. Meaning solver is using non-integer values to create a solution population. Though at the end of solver run, the solution meets all constraints. Is there a way to make solver to not consider non-integer values even when creating the population. I figure it will run faster.
 
Hi Klev,

Could you provide a screenshot of your solver setup? (can just paste directly into the reply field) I have a feeling that we just need to tweak one of the settings, but would need to see the setup to be sure.
 
Hmm, looks pretty good. I would hazard a guess at changing "Integer optimality" in the 2nd pic to 100 (%) might make a difference but not sure. It might be too that it's an inherent part of Solver, that it iterates over a range of Real numbers and then checks that against constraints, rather than using constraints to limit the range it iterates over.
 
  • The Integer Optimality (%) option, sometimes called the “MIP gap”, allows Solver to stop if it finds an integer solution that is within the specified percentage of the best known bound on the optimal solution. The default value is 1%; if you want a proven optimal solution (which may take considerable extra time), set this option to 0.
 
In my case setting it to zero, gave a couple seconds advantage. However, I wasnt able to see the output change dynamically, could just be my computer.
In one of the cases, the integer solution was 42, but solver returned 42.0044. This was because integer optimality was set to 1% and 42.004 is within 1% of 42. Setting if to zero always returns integer solutions.

However, Im still not sure if solver is calculating non-integers or not. If my variable is constrained to be an integer, it technically should not.
 
Back
Top