Coder Social home page Coder Social logo

ediloaz / simplex-algorithm Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 1.4 MB

Resolves linear programming problems (LP) with the simplex algorithm showing all the intermediate steps. With a basic interface (Glade & GTK+) input and Latex (beamer) Output.

C 58.60% Makefile 8.68% TeX 15.01% Shell 2.03% C++ 6.49% PHP 0.11% Objective-C 9.07%
simplex linear-programming simplex-algorithm latex latex-beamer interface-glade gtk3 linux c

simplex-algorithm's Introduction

Simplex Algorithm

This program was created as part of an evaluation of a bachelor course in engineering. Using the Simplex Algorithm (programmed in C on Linux) it resolves linear programming problems (LP problems).

Input

Is a Glade and GTK interface (using C) the user can enter the data of the model problem, that is:

  • Name of the problems
  • Name of the variables (maximum 8 variables)
  • Objective function (Maximize/Minimize and the equation)
  • Constraints (Maximum 10, and can be “≤”, “≥” or “=”)

When the data is complete the "Execute" button can be pressed.

Screenshot of the interface without data Screenshot of the interface without data

Screenshot of the interface with example data Screenshot of the interface with example data

Output

In a latex presentation is showed the result of this. The information is the following:

  • Cover (of the University)
  • Short explain about the Algorithm Simplex
  • Problem with math representation
  • Initial table
  • Intermediate tables
  • Final table
  • Solution
  • Special cases

A .tex file is created and convert to pdf with pdflatex command and is opened with evince command. All these files are saved in Salida folder.

Screenshot of the intermediate tables in the Output Screenshot of the intermediate tables in the Output

Also, detected and explained if the problem had the following special cases:

  1. Not Limited Problem
  2. Not Feasible Problem
  3. Degenerated Problem
  4. Problem with multiple solutions

Prerequisites

It is necessary to have installed latex (including pdflatex), pkg-config and evince in your linux. You can install it with the following commands:

sudo apt-get install texlive-full
sudo apt-get install evince
sudo apt install pkg-config

Running

First is necessary compile the main file (main.c) with the command

 gcc -o gladewin main.c -Wall `pkg-config --cflags --libs gtk+-3.0` -export-dynamic -w

and then it can be opened

./interface

Built With

Authors

  • Edisson López - Main developer - ediloaz
  • Alonso Rivas - Complementary developer
  • Daniel Herrera - Tester

See also the list of repositories who I participated/created.

simplex-algorithm's People

Contributors

ediloaz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.