JWally / jsLPSolver

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

Not equals constraint #103

Open jaw187 opened 4 years ago

jaw187 commented 4 years ago

I'm clicking around in the codebase a bunch, sorry if I missed something, but is there anyway to implement a not equals constraint?

JWally commented 4 years ago

Spitballing: Would it work if you said something is gte (x+smallAmount) and lte (x-smallAmount) ?

x + y != 5 —————

x + y < 4.999 x - y > 5.001

On Fri, Nov 29, 2019 at 9:57 AM James Weston notifications@github.com wrote:

I'm clicking around in the codebase a bunch, sorry if I missed something, but is there anyway to implement a not equals constraint?

— 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/103?email_source=notifications&email_token=AAS6F5ZTVDHVX22H5VVZ7YLQWE3YFA5CNFSM4JTBG7A2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H45N22Q, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS6F55IE27Y7YWPB3JXENDQWE3YFANCNFSM4JTBG7AQ .

JWally commented 4 years ago

Sorry, rushed that first answer.

Not sure if it’s possible; but I’ll keep looking.

On Fri, Nov 29, 2019 at 12:18 PM Justin Wolcott justin.w.wolcott@gmail.com wrote:

Spitballing: Would it work if you said something is gte (x+smallAmount) and lte (x-smallAmount) ?

x + y != 5 —————

x + y < 4.999 x - y > 5.001

On Fri, Nov 29, 2019 at 9:57 AM James Weston notifications@github.com wrote:

I'm clicking around in the codebase a bunch, sorry if I missed something, but is there anyway to implement a not equals constraint?

— 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/103?email_source=notifications&email_token=AAS6F5ZTVDHVX22H5VVZ7YLQWE3YFA5CNFSM4JTBG7A2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H45N22Q, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS6F55IE27Y7YWPB3JXENDQWE3YFANCNFSM4JTBG7AQ .

jaw187 commented 4 years ago

Can you present your idea as a model constraint?