JWally / jsLPSolver

Simple OOP javaScript library to solve linear programs, and mixed integer linear programs
The Unlicense
420 stars 69 forks source link

Added a mix integer problem of consequent size #39

Closed bchevalier closed 8 years ago

bchevalier commented 8 years ago

I wanted to add a problem that would be solved in more than 1sec by the solver to measure future improvements.

However, there is one issue. The problem take 2.2secs to be solved on my machine and, when running the command grunt test, it tells me that the solving failed because it took more than 2secs.

@JWally , how to increase this time limit?

This model is an instance of the problem described in issue https://github.com/JWally/jsLPSolver/issues/38

JWally commented 8 years ago

I'll have to play around some with it and see if I can't come up with a solution. You'll probably beat me to a solution, but it'll probably take some tinkering with how the test is set up. It looks like there's a this.timeout(time) option in the tests (https://mochajs.org/#timeouts) that can maybe be set to infinity(?).

bchevalier commented 8 years ago

Thanks for the update. I do not think we should put problems that take more than 5secs to solve in the test suite triggered by a grunt test as we have to run it frequently during development. So what about a timeout of 5 secs?

JWally commented 8 years ago

Just pushed a commit so you can set max time in the model.expects as a "_timeout" attribute. If its not included, 2 seconds is default. I changed the timeout on your vendor selection to 10 seconds.

bchevalier commented 8 years ago

cool, thanks