Git Product home page Git Product logo

qba-simplex's Introduction

Solving Linear problems using the Simplex Method/Big M Method

This project solves linear programming problems to optimality as taught to us by Prof. Assad El Nidani in the Quantitative Business Analysis course as part of the MBA program. I want to thank him personally for tolerating my endless questions and thoroughly answering them.

Disclaimer

This code is not a clean code, it's just something that I threw together in my spare time because I was bored and curious :D and was tested on very limited cases. so use it at your own risk

Example

Objective function and constraints

image

Entering the problem data

we need to set 3 variables:
m: determines wether our problem is a maximization of a minimization problem
z: used to assign the cooficients of the variables in the objective function
xs: used to define the constraint functions, by entering the cooficients of the variables in each function, then a number that represents the separator between the right hand side and the left hand side of the function, where 0 for <=, 1 for =, and 2 for >= , then the last item is the value of the right hand side
image

Result

image image image

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.