JWally / jsLPSolver

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

solver freeze/infinite loop with examples #91

Closed ChenhuaWANG22 closed 5 years ago

ChenhuaWANG22 commented 5 years ago

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:

import 'react-native-console-time-polyfill';
const solver = require("javascript-lp-solver/src/solver");

modelLP = { /* one example*/ }

console.log('solver start');
console.time("solver");
resultLP = solver.Solve(modelLP);
console.timeEnd("solver");
console.log('solver end');

Below are 1 working example and 5 breaking examples:

let modelLP;

// this one is working
// it costs around 5ms to solve
modelLP = {
    "optimize": "constraintA",
    "opType": "min",
    "constraints": {
        "constraintA": { "max": 8.600000000000001 },
        "constraintB": { "max": 36 },
        "constraintC": { "max": 20 },
        "constraintD": { "max": 20 },
        "constraintE": {
            "min": 1234.8,
            "max": 1509.2
        },
        "constraintF": {
            "min": 1234.8,
            "max": 1509.2
        },
        "constraintG": {
            "min": 169.78500000000003,
            "max": 200.65500000000003
        },
        "constraintH": {
            "min": 37.730000000000004,
            "max": 108.045
        },
        "constraintI": { "min": 13.2055 },
        "constraintJ": {
            "min": 33.537777777777784,
            "max": 48.02
        },
        "constraintK": {
            "min": 15.092,
            "max": 49.391999999999996
        },
        "fb6e9be7-21fd-512b-b9c9-9d26a59a0dc0": {
            "min": 114.33333333333333,
            "max": 686
        },
        "67f4572f-13b1-5b87-b6ed-d61343b3fd60": {
            "min": 114.33333333333333,
            "max": 686
        },
        "7e6eb8b6-f092-5465-b5c9-b124c628668f": {
            "min": 228.66666666666666,
            "max": 457.3333333333333
        },
        "bc23fc84-5dde-5ae3-97a1-ffe5af06f5b0": {
            "min": 228.66666666666666,
            "max": 571.6666666666666
        }
    },
    "variables": {
        "fb6e9be7-21fd-512b-b9c9-9d26a59a0dc0": {
            "fb6e9be7-21fd-512b-b9c9-9d26a59a0dc0": 1,
            "constraintA": 0.0003529411764705882,
            "constraintB": 0.001176470588235294,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.5682352941176471,
            "constraintF": 1,
            "constraintG": 0.12552941176470586,
            "constraintH": 0.013941176470588235,
            "constraintI": 0,
            "constraintJ": 0.0017058823529411764,
            "constraintK": 0.002352941176470588
        },
        "67f4572f-13b1-5b87-b6ed-d61343b3fd60": {
            "67f4572f-13b1-5b87-b6ed-d61343b3fd60": 1,
            "constraintA": 0.0003,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 3.4656,
            "constraintF": 1,
            "constraintG": 0.383,
            "constraintH": 0.057,
            "constraintI": 0,
            "constraintJ": 0.171,
            "constraintK": 0
        },
        "7e6eb8b6-f092-5465-b5c9-b124c628668f": {
            "7e6eb8b6-f092-5465-b5c9-b124c628668f": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.15999999999999998,
            "constraintF": 1,
            "constraintG": 0.028999999999999995,
            "constraintH": 0.008,
            "constraintI": 0,
            "constraintJ": 0.002,
            "constraintK": 0.004999999999999999
        },
        "bc23fc84-5dde-5ae3-97a1-ffe5af06f5b0": {
            "bc23fc84-5dde-5ae3-97a1-ffe5af06f5b0": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.54,
            "constraintF": 1,
            "constraintG": 0.034,
            "constraintH": 0.03,
            "constraintI": 0.03,
            "constraintJ": 0.032,
            "constraintK": 0
        }
    }
}

// below 5 examples will make solver freeze / infinite loop
modelLP = {
    "optimize": "constraintA",
    "opType": "min",
    "constraints": {
        "constraintA": { "max": -1.1999999999999993 },
        "constraintB": { "max": 26 },
        "constraintC": { "max": 14 },
        "constraintD": { "max": 20 },
        "constraintE": {
            "min": 1234.8,
            "max": 1509.2
        },
        "constraintF": {
            "min": 1234.8,
            "max": 1509.2
        },
        "constraintG": {
            "min": 169.78500000000003,
            "max": 200.65500000000003
        },
        "constraintH": {
            "min": 37.730000000000004,
            "max": 108.045
        },
        "constraintI": { "min": 13.2055 },
        "constraintJ": {
            "min": 33.537777777777784,
            "max": 48.02
        },
        "constraintK": {
            "min": 15.092,
            "max": 49.391999999999996
        },
        "9294aa97-f5ed-5339-90d3-24d6d608c2e4": {
            "min": 228.66666666666666,
            "max": 686
        },
        "1f9b0482-dacc-5571-b172-358fee6992fb": {
            "min": 114.33333333333333,
            "max": 686
        },
        "50d09a60-e29b-59e2-9d1e-6681b1018cbf": {
            "min": 114.33333333333333,
            "max": 686
        },
        "ec71e9fa-4d06-5d32-915b-2de72a4cbc1b": {
            "min": 228.66666666666666,
            "max": 457.3333333333333
        },
        "5c9cc1f4-bc18-5f92-8378-284dc03986b1": {
            "min": 34.3,
            "max": 80.03333333333333
        },
        "bc23fc84-5dde-5ae3-97a1-ffe5af06f5b0": {
            "min": 228.66666666666666,
            "max": 571.6666666666666
        }
    },
    "variables": {
        "9294aa97-f5ed-5339-90d3-24d6d608c2e4": {
            "9294aa97-f5ed-5339-90d3-24d6d608c2e4": 1,
            "constraintA": 0.0017857142857142854,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.81,
            "constraintF": 1,
            "constraintG": 0.181,
            "constraintH": 0.022000000000000002,
            "constraintI": 0,
            "constraintJ": 0.002,
            "constraintK": 0.01
        },
        "1f9b0482-dacc-5571-b172-358fee6992fb": {
            "1f9b0482-dacc-5571-b172-358fee6992fb": 1,
            "constraintA": 0.0032774945375091042,
            "constraintB": 0.0024277737314882253,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 1.2348579752367081,
            "constraintF": 1,
            "constraintG": 0.23233940276766202,
            "constraintH": 0.033625637290604526,
            "constraintI": 0,
            "constraintJ": 0.021042971595047342,
            "constraintK": 0.00828259286234523
        },
        "50d09a60-e29b-59e2-9d1e-6681b1018cbf": {
            "50d09a60-e29b-59e2-9d1e-6681b1018cbf": 1,
            "constraintA": 0.0011009174311926604,
            "constraintB": 0.0013761467889908258,
            "constraintC": 0.0013761467889908258,
            "constraintD": 0,
            "constraintE": 2.246,
            "constraintF": 1,
            "constraintG": 0.2425724770642202,
            "constraintH": 0.07101467889908257,
            "constraintI": 0,
            "constraintJ": 0.12378165137614679,
            "constraintK": 0.03012844036697248
        },
        "ec71e9fa-4d06-5d32-915b-2de72a4cbc1b": {
            "ec71e9fa-4d06-5d32-915b-2de72a4cbc1b": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.57,
            "constraintF": 1,
            "constraintG": 0.138,
            "constraintH": 0.016999999999999998,
            "constraintI": 0,
            "constraintJ": 0.004,
            "constraintK": 0.041
        },
        "5c9cc1f4-bc18-5f92-8378-284dc03986b1": {
            "5c9cc1f4-bc18-5f92-8378-284dc03986b1": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 6.46,
            "constraintF": 1,
            "constraintG": 0.19100000000000003,
            "constraintH": 0.149,
            "constraintI": 0,
            "constraintJ": 0.5880000000000001,
            "constraintK": 0.095
        },
        "bc23fc84-5dde-5ae3-97a1-ffe5af06f5b0": {
            "bc23fc84-5dde-5ae3-97a1-ffe5af06f5b0": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.54,
            "constraintF": 1,
            "constraintG": 0.034,
            "constraintH": 0.03,
            "constraintI": 0.03,
            "constraintJ": 0.032,
            "constraintK": 0
        }
    }
}

modelLP = {
    "optimize": "constraintA",
    "opType": "min",
    "constraints": {
        "constraintA": { "max": 7.8999999999999995 },
        "constraintB": { "max": 32 },
        "constraintC": { "max": 20 },
        "constraintD": { "max": 20 },
        "constraintE": {
            "min": 1234.8,
            "max": 1509.2
        },
        "constraintF": {
            "min": 1234.8,
            "max": 1509.2
        },
        "constraintG": {
            "min": 169.78500000000003,
            "max": 200.65500000000003
        },
        "constraintH": {
            "min": 37.730000000000004,
            "max": 108.045
        },
        "constraintI": { "min": 13.2055 },
        "constraintJ": {
            "min": 33.537777777777784,
            "max": 48.02
        },
        "constraintK": {
            "min": 15.092,
            "max": 49.391999999999996
        },
        "e5c5490b-377e-5ffc-ac18-f7cbab88a3c1": {
            "min": 228.66666666666666,
            "max": 686
        },
        "2feed0de-f960-544c-933c-fac5eeb987d2": {
            "min": 114.33333333333333,
            "max": 686
        },
        "e74091ee-a4b9-58b0-a192-f4fcaaa20382": {
            "min": 114.33333333333333,
            "max": 686
        },
        "cc1fcb00-7f1e-5eec-837f-16cb3c39e74a": {
            "min": 228.66666666666666,
            "max": 457.3333333333333
        },
        "5c9cc1f4-bc18-5f92-8378-284dc03986b1": {
            "min": 34.3,
            "max": 80.03333333333333
        },
        "bc23fc84-5dde-5ae3-97a1-ffe5af06f5b0": {
            "min": 228.66666666666666,
            "max": 571.6666666666666
        }
    },
    "variables": {
        "e5c5490b-377e-5ffc-ac18-f7cbab88a3c1": {
            "e5c5490b-377e-5ffc-ac18-f7cbab88a3c1": 1,
            "constraintA": 0.0011627906976744186,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 1.06,
            "constraintF": 1,
            "constraintG": 0.252,
            "constraintH": 0.013999999999999999,
            "constraintI": 0,
            "constraintJ": 0.002,
            "constraintK": 0.01
        },
        "2feed0de-f960-544c-933c-fac5eeb987d2": {
            "2feed0de-f960-544c-933c-fac5eeb987d2": 1,
            "constraintA": 0.0018939393939393938,
            "constraintB": 0.012626262626262626,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 1.44,
            "constraintF": 1,
            "constraintG": 0.028,
            "constraintH": 0.133,
            "constraintI": 0.133,
            "constraintJ": 0.08800000000000001,
            "constraintK": 0
        },
        "e74091ee-a4b9-58b0-a192-f4fcaaa20382": {
            "e74091ee-a4b9-58b0-a192-f4fcaaa20382": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 3.13,
            "constraintF": 1,
            "constraintG": 0.5860000000000001,
            "constraintH": 0.083,
            "constraintI": 0,
            "constraintJ": 0.051,
            "constraintK": 0.005
        },
        "cc1fcb00-7f1e-5eec-837f-16cb3c39e74a": {
            "cc1fcb00-7f1e-5eec-837f-16cb3c39e74a": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.51,
            "constraintF": 1,
            "constraintG": 0.122,
            "constraintH": 0.009000000000000001,
            "constraintI": 0,
            "constraintJ": 0.001,
            "constraintK": 0.013000000000000001
        },
        "5c9cc1f4-bc18-5f92-8378-284dc03986b1": {
            "5c9cc1f4-bc18-5f92-8378-284dc03986b1": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 6.46,
            "constraintF": 1,
            "constraintG": 0.19100000000000003,
            "constraintH": 0.149,
            "constraintI": 0,
            "constraintJ": 0.5880000000000001,
            "constraintK": 0.095
        },
        "bc23fc84-5dde-5ae3-97a1-ffe5af06f5b0": {
            "bc23fc84-5dde-5ae3-97a1-ffe5af06f5b0": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.54,
            "constraintF": 1,
            "constraintG": 0.034,
            "constraintH": 0.03,
            "constraintI": 0.03,
            "constraintJ": 0.032,
            "constraintK": 0
        }
    }
}

modelLP = {
    "optimize": "constraintA",
    "opType": "min",
    "constraints": {
        "constraintA": { "max": 7.9 },
        "constraintB": { "max": 40 },
        "constraintC": { "max": 20 },
        "constraintD": { "max": 20 },
        "constraintE": {
            "min": 1234.8,
            "max": 1509.2
        },
        "constraintF": {
            "min": 1234.8,
            "max": 1509.2
        },
        "constraintG": {
            "min": 169.78500000000003,
            "max": 200.65500000000003
        },
        "constraintH": {
            "min": 37.730000000000004,
            "max": 108.045
        },
        "constraintI": { "min": 13.2055 },
        "constraintJ": {
            "min": 33.537777777777784,
            "max": 48.02
        },
        "constraintK": {
            "min": 15.092,
            "max": 49.391999999999996
        },
        "61a1913b-dab3-5ee8-a435-5c9a5f344445": {
            "min": 228.66666666666666,
            "max": 686
        },
        "ed3e246a-977e-52b6-a7da-a72020e034ca": {
            "min": 114.33333333333333,
            "max": 686
        },
        "83a0b565-5e6e-54a5-b07b-249c4c620d28": {
            "min": 228.66666666666666,
            "max": 457.3333333333333
        },
        "805aa787-815e-50a7-925b-dcde62131797": {
            "min": 34.3,
            "max": 80.03333333333333
        },
        "bc23fc84-5dde-5ae3-97a1-ffe5af06f5b0": {
            "min": 228.66666666666666,
            "max": 571.6666666666666
        }
    },
    "variables": {
        "61a1913b-dab3-5ee8-a435-5c9a5f344445": {
            "61a1913b-dab3-5ee8-a435-5c9a5f344445": 1,
            "constraintA": 0.0010638297872340424,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.7700000000000001,
            "constraintF": 1,
            "constraintG": 0.17200000000000001,
            "constraintH": 0.02,
            "constraintI": 0,
            "constraintJ": 0.002,
            "constraintK": 0.007000000000000001
        },
        "ed3e246a-977e-52b6-a7da-a72020e034ca": {
            "ed3e246a-977e-52b6-a7da-a72020e034ca": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 4.35,
            "constraintF": 1,
            "constraintG": 0.7170000000000001,
            "constraintH": 0.09,
            "constraintI": 0,
            "constraintJ": 0.12699999999999997,
            "constraintK": 0.011000000000000001
        },
        "83a0b565-5e6e-54a5-b07b-249c4c620d28": {
            "83a0b565-5e6e-54a5-b07b-249c4c620d28": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.37999999999999995,
            "constraintF": 1,
            "constraintG": 0.091,
            "constraintH": 0.009,
            "constraintI": 0,
            "constraintJ": 0.001,
            "constraintK": 0.013000000000000001
        },
        "805aa787-815e-50a7-925b-dcde62131797": {
            "805aa787-815e-50a7-925b-dcde62131797": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 6.44,
            "constraintF": 1,
            "constraintG": 0.21400000000000002,
            "constraintH": 0.141,
            "constraintI": 0,
            "constraintJ": 0.585,
            "constraintK": 0.12400000000000001
        },
        "bc23fc84-5dde-5ae3-97a1-ffe5af06f5b0": {
            "bc23fc84-5dde-5ae3-97a1-ffe5af06f5b0": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.54,
            "constraintF": 1,
            "constraintG": 0.034,
            "constraintH": 0.03,
            "constraintI": 0.03,
            "constraintJ": 0.032,
            "constraintK": 0
        }
    }
}

modelLP = {
    "optimize": "constraintA",
    "opType": "min",
    "constraints": {
        "constraintA": { "max": 7.9 },
        "constraintB": { "max": 40 },
        "constraintC": { "max": 20 },
        "constraintD": { "max": 20 },
        "constraintE": {
            "min": 1234.8,
            "max": 1509.2
        },
        "constraintF": {
            "min": 1234.8,
            "max": 1509.2
        },
        "constraintG": {
            "min": 169.78500000000003,
            "max": 200.65500000000003
        },
        "constraintH": {
            "min": 37.730000000000004,
            "max": 108.045
        },
        "constraintI": { "min": 13.2055 },
        "constraintJ": {
            "min": 33.537777777777784,
            "max": 48.02
        },
        "constraintK": {
            "min": 15.092,
            "max": 49.391999999999996
        },
        "9294aa97-f5ed-5339-90d3-24d6d608c2e4": {
            "min": 228.66666666666666,
            "max": 686
        },
        "81643f97-8fde-57c9-ad68-353ed214b379": {
            "min": 228.66666666666666,
            "max": 457.3333333333333
        },
        "590424c2-a4a6-5e85-a4fe-1471691384a7": {
            "min": 34.3,
            "max": 80.03333333333333
        },
        "e46964b8-0917-50a9-a799-9f5025321af6": {
            "min": 228.66666666666666,
            "max": 571.6666666666666
        }
    },
    "variables": {
        "9294aa97-f5ed-5339-90d3-24d6d608c2e4": {
            "9294aa97-f5ed-5339-90d3-24d6d608c2e4": 1,
            "constraintA": 0.0017857142857142854,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.81,
            "constraintF": 1,
            "constraintG": 0.181,
            "constraintH": 0.022000000000000002,
            "constraintI": 0,
            "constraintJ": 0.002,
            "constraintK": 0.01
        },
        "81643f97-8fde-57c9-ad68-353ed214b379": {
            "81643f97-8fde-57c9-ad68-353ed214b379": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.9299999999999999,
            "constraintF": 1,
            "constraintG": 0.21999999999999997,
            "constraintH": 0.013999999999999999,
            "constraintI": 0,
            "constraintJ": 0.002,
            "constraintK": 0.011999999999999999
        },
        "590424c2-a4a6-5e85-a4fe-1471691384a7": {
            "590424c2-a4a6-5e85-a4fe-1471691384a7": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 5.78,
            "constraintF": 1,
            "constraintG": 0.23899999999999996,
            "constraintH": 0.225,
            "constraintI": 0,
            "constraintJ": 0.45399999999999996,
            "constraintK": 0.08
        },
        "e46964b8-0917-50a9-a799-9f5025321af6": {
            "e46964b8-0917-50a9-a799-9f5025321af6": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.72,
            "constraintF": 1,
            "constraintG": 0.093,
            "constraintH": 0.025,
            "constraintI": 0.025,
            "constraintJ": 0.027,
            "constraintK": 0
        }
    }
}

modelLP = {
    "optimize": "constraintA",
    "opType": "min",
    "constraints": {
        "constraintA": { "max": 1.6000000000000005 },
        "constraintB": { "max": 32 },
        "constraintC": { "max": 20 },
        "constraintD": { "max": 20 },
        "constraintE": {
            "min": 1234.8,
            "max": 1509.2
        },
        "constraintF": {
            "min": 1234.8,
            "max": 1509.2
        },
        "constraintG": {
            "min": 169.78500000000003,
            "max": 200.65500000000003
        },
        "constraintH": {
            "min": 37.730000000000004,
            "max": 108.045
        },
        "constraintI": { "min": 13.2055 },
        "constraintJ": {
            "min": 33.537777777777784,
            "max": 48.02
        },
        "constraintK": {
            "min": 15.092,
            "max": 49.391999999999996
        },
        "590fa88a-856f-59e7-8eae-83b366efeaf7": {
            "min": 228.66666666666666,
            "max": 686
        },
        "1f9b0482-dacc-5571-b172-358fee6992fb": {
            "min": 114.33333333333333,
            "max": 686
        },
        "d3c05c8c-312f-5426-a7e7-09ca048ba905": {
            "min": 228.66666666666666,
            "max": 457.3333333333333
        },
        "805aa787-815e-50a7-925b-dcde62131797": {
            "min": 34.3,
            "max": 80.03333333333333
        },
        "e46964b8-0917-50a9-a799-9f5025321af6": {
            "min": 228.66666666666666,
            "max": 571.6666666666666
        }
    },
    "variables": {
        "590fa88a-856f-59e7-8eae-83b366efeaf7": {
            "590fa88a-856f-59e7-8eae-83b366efeaf7": 1,
            "constraintA": 0.0016304347826086956,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 1.12,
            "constraintF": 1,
            "constraintG": 0.22799999999999998,
            "constraintH": 0.039999999999999994,
            "constraintI": 0,
            "constraintJ": 0.012,
            "constraintK": 0.028999999999999998
        },
        "1f9b0482-dacc-5571-b172-358fee6992fb": {
            "1f9b0482-dacc-5571-b172-358fee6992fb": 1,
            "constraintA": 0.0032774945375091042,
            "constraintB": 0.0024277737314882253,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 1.2348579752367081,
            "constraintF": 1,
            "constraintG": 0.23233940276766202,
            "constraintH": 0.033625637290604526,
            "constraintI": 0,
            "constraintJ": 0.021042971595047342,
            "constraintK": 0.00828259286234523
        },
        "d3c05c8c-312f-5426-a7e7-09ca048ba905": {
            "d3c05c8c-312f-5426-a7e7-09ca048ba905": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.71,
            "constraintF": 1,
            "constraintG": 0.166,
            "constraintH": 0.011999999999999999,
            "constraintI": 0,
            "constraintJ": 0.001,
            "constraintK": 0.004
        },
        "805aa787-815e-50a7-925b-dcde62131797": {
            "805aa787-815e-50a7-925b-dcde62131797": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 6.44,
            "constraintF": 1,
            "constraintG": 0.21400000000000002,
            "constraintH": 0.141,
            "constraintI": 0,
            "constraintJ": 0.585,
            "constraintK": 0.12400000000000001
        },
        "e46964b8-0917-50a9-a799-9f5025321af6": {
            "e46964b8-0917-50a9-a799-9f5025321af6": 1,
            "constraintA": 0,
            "constraintB": 0,
            "constraintC": 0,
            "constraintD": 0,
            "constraintE": 0.72,
            "constraintF": 1,
            "constraintG": 0.093,
            "constraintH": 0.025,
            "constraintI": 0.025,
            "constraintJ": 0.027,
            "constraintK": 0
        }
    }
}
JWally commented 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.

ChenhuaWANG22 commented 5 years ago

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.

JWally commented 5 years ago

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 .