jsLPSolver icon indicating copy to clipboard operation
jsLPSolver copied to clipboard

Feasibility Analysis

Open cphthomas opened this issue 4 years ago • 4 comments

Thanks for a great LP solver, its very fast and reliable, you've done a super job :O) I am new to javascript, but am creating a solver for students, as an alternative to Excel Solver, but I would like to include some kind of feasibility analysis. I was wondering if there are some nice way to retrieve: Lower and upper bounds for RHS and Objective coefficients shadow prices contribution margins.

Can I get more information, than the output from solver.Solve(model) in your README.md?

cphthomas avatar Jan 02 '21 21:01 cphthomas

I can find the shadow price by solving the DUAL problem with solver.Solve(modelDUAL), but still I would like to find bounds etc. :O)

cphthomas avatar Jan 03 '21 00:01 cphthomas

Hey Thomas,

Not sure if this helps or not, but try this:

var solver = require("./src/solver"),
  results,
  model = {
    "optimize": "capacity",
    "opType": "max",
    "constraints": {
        "plane": {"max": 44},
        "person": {"max": 512},
        "cost": {"max": 300000}
    },
    "variables": {
        "brit": {
            "capacity": 20000,
            "plane": 1,
            "person": 8,
            "cost": 5000
        },
        "yank": {
            "capacity": 30000,
            "plane": 1,
            "person": 16,
            "cost": 9000
        }
    },
};

results = solver.Solve(model,0.0000001, true);
console.log(results);

On Sat, Jan 2, 2021 at 6:01 PM Thomas Petersen [email protected] wrote:

I can find the shadow price by solving the DUAL problem with solver.Solve(modelDUAL), but still I would like to find bounds etc. :O)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JWally/jsLPSolver/issues/114#issuecomment-753545974, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS6F52MATPYQO3YSOLWUYDSX6XULANCNFSM4VRKUN3A .

JWally avatar Jan 03 '21 16:01 JWally

Hi JWally thank you so much for your quick reply :O) solver.Solve(model,0.0000001, true); tableu contains shadowprices and reduced costs :O) Allowable decrease and increase for the current solution for the constraints and objective coefficients are not in the console, maybe Excel Solver is slow since it has to calculate these bounds. Do you know where I can find more info regarding the arguments for solver.Solve(model,0.0000001, true)?

cphthomas avatar Jan 03 '21 23:01 cphthomas

Hi guys... I'm studying the possibility of using this library on a new project and the allowable decrease and increase for the current solution is something very important. Is there a way to do this with this library?

jgbranco avatar Jan 11 '21 12:01 jgbranco