Giter VIP home page Giter VIP logo

ford-fulkerson-disaster-relief's Introduction

Ford-Fulkerson Disaster Relief Optimization

This is a Python implementation of the Ford-Fulkerson algorithm for optimizing disaster relief supply chain allocation. The code is written for a Graduation Project at Ankara University and can be used as a starting point for similar optimization problems.

Algorithm

The Ford-Fulkerson algorithm is a classic algorithm for finding the maximum flow in a flow network. In this problem, we represent the disaster relief supply chain as a flow network and use the algorithm to optimize the allocation of resources to the affected areas.

Usage

The code defines three classes: Node, Edge, and Truck. It also defines a Graph class, which is used to represent the flow network.

To use the code, create instances of the Node, Edge, and Truck classes to represent the nodes, edges, and trucks in the supply chain, respectively. Then, create an instance of the Graph class and add the edges to the graph using the add_edge method.

Finally, call the ford_fulkerson method on the Graph object, passing in the source and sink nodes as arguments. The method returns the maximum flow in the network.

The code includes an example usage, which can be modified as needed to suit the specific problem being solved.

ILP Optimization

It is worth noting that this algorithm can be extended with Integer Linear Programming (ILP) optimization to allocate resources in trucks. This can be done by introducing binary variables to represent which resources are assigned to which trucks, and adding constraints to ensure that each truck does not exceed its capacity and that each affected area receives the required resources.

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.