Closed ChenhuaWANG22 closed 5 years ago
So I think I have this one under control. @bchevalier (I think) built an option in to have it throw an error once it detected that it was cycling. I tweaked it so that it just returns the model as infeasible, and is on by default.
Hopefully this clears up the issue for what you're running across.
I'm gonna close assuming I captured it; but if not, feel free to re-open.
After testing, I confirm it's fixed after updating javascript-lp-solver from version 0.4.5 to latest 0.4.15.
@JWally Thank you for your help ! It does relieve me a lot.
Awesome!
Thank you for identifying the enhancement opportunity and providing more testing scenarios.
On Thu, Oct 3, 2019 at 11:48 PM chenhua notifications@github.com wrote:
After testing, I confirm it's fixed after updating javascript-lp-solver from version 0.4.5 to latest 0.4.15.
@JWally https://github.com/JWally Thank you for your help ! It does relieve me a lot.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JWally/jsLPSolver/issues/91?email_source=notifications&email_token=AAS6F52EASWZKJVVV2FTNWLQM3DKVA5CNFSM4I5DGIW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAKMHGI#issuecomment-538231705, or mute the thread https://github.com/notifications/unsubscribe-auth/AAS6F5ZNIOQUGNMZYONC2JTQM3DKVANCNFSM4I5DGIWQ .
This solver is used to fix some randomly generated solutions in my React Native project. As this randomly generations will repeat enormous times (target repeating times is around 2e6), I find the solver freezes or is stuck in infinite loop frequently which cause the whole program being stuck. Super terrible situation :(
Below are some example cases I collect. If more example are needed to analyse, please inform me (I have managed to collect the solver model every time it's stuck). And if additional test is needed, I am glad to help.
This freezing/infinite loop problem has really bothered me for several weeks and today finally locate the problem, big step ! :)
It will be really nice if this freezing/infinite loop problem can be solved or at least have a method to stop the solver.Solve function after an indicated timeout (as the normal solving time is very stable which is around several ms).
Many thanks by advance.
Below is the code I use to test in React Native:
Below are 1 working example and 5 breaking examples: