Coder Social home page Coder Social logo

vam-method's Introduction

Vogel Approximation Method (VAM)

Open In Colab

View these instructions in Turkish

vogel_result

Overview

The example transportation problem for the output above is as follows

                            ------------------------------------------------------------
                                      | Store 1 | Store 2 | Store 3 | Store 4 | Supply  
                            ------------------------------------------------------------
                            Factory 1 |   10    |   19   |   5    |   7     |   22    
                            Factory 2 |   13    |   2    |   7    |   8     |   25  
                            Factory 3 |   15    |   18   |   6    |   14    |   10  
                            ------------------------------------------------------------ 
                            Demand    |   8     |   8    |   12   |   29    |   57     
                            ------------------------------------------------------------

Introduction

Vogel's Approximation Method (VAM) is an algorithm used for solving transportation problems in linear programming. A transportation problem involves minimizing the cost of transporting goods from multiple suppliers to multiple consumers. Vogel's method provides an iterative approach to find an initial feasible solution, which can then be improved using other optimization techniques.

Reference:
BYJU's. (n.d.). Vogel's Approximation Method. BYJU's. https://byjus.com/maths/vogels-approximation-method/

Here is the project structure:

vam-method/
|-- img/
|-- modules/
|   |-- vam.py          # VAM algorithm
|   |-- utils.py        # utility outside VAM & styling
|-- main_script.py      # running VAM
|-- vogels_am.ipynb     # explanation of the method
└── README.md   

Installation

This project using numpy library assuming you have got pip installed on your system. Install numpy on your repository

# Installing NumPy
pip install numpy

# Installing Pandas
pip install pandas

Output

You can check the implementation of algorithm using scenario and styling on vogels_am.ipynb here

Output example on jupyter notebook:

Pandas Output

or by

Running main_script.py by this command

python main_script.py

Here is the output from previous example:

// Iteration and process will be shown here ...

Total Cost (Optimized): 386 units

Transportation Plan:
[[ 8  0  2 12]
 [ 0  8  0 17]
 [ 0  0 10  0]]

vam-method's People

Contributors

faridnec avatar tea01 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

faridnec

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.