JWally / jsLPSolver

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

Make the process asynchronous #82

Closed aihornmac closed 5 years ago

aihornmac commented 5 years ago

When running in browser, it happens every now and then that the process freezes. I am not sure if this is about the model to solve, or the code that solves it. Anyway, I was wondering an asynchronous process as fail safe will be nice, better if it is stoppable and callbacks per progress, in order to vet the progress data. I am not sure if this is too much to ask for, thank you for your work anyway!

JWally commented 5 years ago

I like the idea of status updates.

I've implemented a timeout option which might help with the Integer Programs.

In your model, add an options attribute, with a "timeout" attribute (like this:)

{
    "optimize": "stuff",
    "options": {
        "timeout": 3000,
    }
}
...

Feel free to re-open if this doesn't solve it... Thanks! -JWW