Code Monkey home page Code Monkey logo

Comments (1)

JWally avatar JWally commented on June 20, 2024

Sorry for the late response.

At the moment, the re-format functionality needs to be cleaned up and updated.
The library itself handles binary variables; however ReformatLP doesn't (yet).

In the mean time, would this hacky solution work?:

var problem = [ 
    "max: 21x11 22.5x21 22.5x12 24.5x22 23x13 25.5x23 1500y1 2000y2 3000y3", 
    "1x11 1x21 <= 425", 
    "1x12 1x22 >= 400", 
    "1x13 1x23 >= 750", 
    "1x11 1x12 1x13 >= 550", 
    "1x21 1x22 1x23 >= 450", 
    "1x11 1x21 -425y1 <= 0", 
    "1x12 1x22 -400y2 <= 0", 
    "1x13 1x23 -750y3 <= 0", 
    // I think these are redundant
    "1x11 >= 0", 
    "1x12 >= 0",
    "1x13 >= 0", 
    "1x21 >= 0", 
    "1x22 >= 0", 
    "1x23 >= 0", 
    "int x11", 
    "int x21", 
    "int x12", 
    "int x22", 
    "int x13", 
    "int x23",
    // AKA CHEATING
    "int y1",
    "int y2",
    "int y3",
    "1y1 <= 1",
    "1y2 <= 1",
    "1y3 <= 1"
    ];

from jslpsolver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.