0% found this document useful (0 votes)
37 views36 pages

Supply Chain Optimization System

The document outlines the project documentation for a Supply Chain Optimization System developed by students at the University of Negros Occidental – Recoletos. It details the algorithms used, including Dijkstra's, Nearest Neighbor, and Ford-Fulkerson, to optimize logistics and improve efficiency in supply chain management. The project aims to provide a user-friendly interface for visualizing and solving logistical challenges while evaluating the time and space complexities of the algorithms implemented.

Uploaded by

Maxil Urocay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views36 pages

Supply Chain Optimization System

The document outlines the project documentation for a Supply Chain Optimization System developed by students at the University of Negros Occidental – Recoletos. It details the algorithms used, including Dijkstra's, Nearest Neighbor, and Ford-Fulkerson, to optimize logistics and improve efficiency in supply chain management. The project aims to provide a user-friendly interface for visualizing and solving logistical challenges while evaluating the time and space complexities of the algorithms implemented.

Uploaded by

Maxil Urocay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS

COLLEGE OF INFORMATION TECHNOLOGY


PAASCU Accredited, CISCO Local Academy,
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

Supply Chain Optimization System

Project Documentation

Algorithms & Complexity

Presented to the Faculty of the

College of Information Technology

University of Negros Occidental – Recoletos

In Partial Fulfillment of the

Requirements for the Course

CSP20843X

By:

Ralph Vincent Jaro

Grefe Entrina

Josh Valenzuela

March 2025

College of Information Technology


UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy,
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

TABLE OF CONTENTS
CHAPTER I .............................................................................................Error! Bookmark not defined.
I. INTRODUCTION............................................................................ Error! Bookmark not defined.
PURPOSE OF THE ALGORITHM PROGRAM ................................................................................. 2
CHAPTER II........................................................................................................................................... 4
II. LITERATURE REVIEW ................................................................................................................ 4
PREVIOUS WORK ............................................................................................................................ 4
RELEVANCE OF CHOSEN TOPICS ................................................................................................. 5
CHAPTER III ......................................................................................................................................... 7
III. Algorithm Design and Complexity, Topics Implemented, and User Interface Design...................... 7
Programming Language and Tools....................................................................................................... 7
Topics Implemented ............................................................................................................................ 7
User Interface Design .......................................................................................................................... 9
CHAPTER IV ....................................................................................................................................... 16
IV. Implementation Details: Algorithm Design and Complexity ......................................................... 16
Code Explanation .............................................................................................................................. 16
Challenges Faced ............................................................................................................................... 18
CHAPTER V ........................................................................................................................................ 20
V. Results and Evaluation: Algorithm Design and Complexity ........................................................... 20
Testing .............................................................................................................................................. 22
Evaluation of Effectiveness................................................................................................................ 25
CHAPTER VI ....................................................................................................................................... 29
VI.Conclusion: Algorithm Design and Complexity ............................................................................ 29
Summary of Findings ........................................................................................................................ 29
Future Improvements ......................................................................................................................... 30
REFERENCES...................................................................................................................................... 32
CURRICULUM VITAE ........................................................................................................................ 34

College of Information Technology


UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy,
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

CHAPTER I

INTRODUCTION

1.1 OVERVIEW OF DISCUSSED AND RESOLVED TOPICS

Supply Chain Optimization Systems involves the use of various topics about algorithms.

Graphs will be used to visualize the road networks where the edges represent the roads and nodes

represent the key points where logistics travel such as the warehouses and distribution centers. It

will use algorithms such as Dijkstra’s Algorithm and Nearest Neighbor Algorithm to find the most

efficient paths and Ford-Fulkerson Algorithm to maximize goods distribution flow. In warehouse

storage, binary search trees will be used for optimizing storing and retrieval of data.

Dijkstra’s algorithm is used to find the shortest path from a node to other nodes in a

weighted graph. The original algorithm ran in O(|V| 2) time where V is the number of nodes but

was further improved by Fredman & Tarjan to O(|E| + |V|log|V|) using Fibonacci heap priority

queue where E is the edges (Schrijver, 2012). The space complexity of Dijkstra’s algorithm is

O(V) (Maqbool etal., 2018).

The Nearest Neighbor algorithm mimics a traveling salesman where the traveler always

goes to the nearest unvisited locations until all locations are visited. The running time was

described to be O(N2) (Johnson et al., 1997). It has the space complexity of O(N) (Chase et al.,

2020).

College of Information Technology

1
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

The Ford-Fulkerson algorithm is used to compute the maximum flow in a flow network.

In a weighted graph where edges have capacities, it finds the maximum flow from a source node

to another node. The time complexity is O(Ef) when using integers as capacities where E is the

edges of the graph and f is the maximum flow in the graph (Biswas et al., 2017). Its space

complexity is O(V + E) (Cormen et al., 2001). and guarantees log(n) lookup time which makes it

a good choice for databases (Petrov, 2018).

1.2 PURPOSE OF THE ALGORITHM PROGRAM

The user will be able to create a graph for the supply chain network using

nodes(warehouses, distribution centers) and edges(roads). The nodes will represent the locations

and the edges have attributes such as time, distance and cost. The user can optimize the routes of

the supply chain network by distance, time or cost. The user will also be able to optimize multiple

ways such as optimizing warehouse storage and retrieval, maximizing goods distribution flow, and

minimizing transport cost.

With our system, we will be dealing with representations of a map typically with roads,

warehouses and distribution centers. This is similar to a graph data structure where roads are edges

and the centers and warehouses are vertices. As such, we are able to perform many algorithms to

solve different problems in the supply chain network. GUI helps visualize the structure and

connections between points in the map as well as the process of selecting the most optimal path in

terms of distance, time and cost.

The program will help students visualize how graph algorithms such as Dijkstra’s

Algorithm apply to real-world scenarios while businesses can analyze and improve logistics by

College of Information Technology

2
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

minimizing transportation costs, reducing delivery times, and optimizing warehouse storage and

retrieval. By simulating real supply chain scenarios, businesses can evaluate different strategies

before implementation to save time and costs. Specifically, the program aims to perform the

following functions:

1) To create a Supply Chain Optimization System that is able to interact with the user and use

different options that apply different algorithms to solve logistical and operational

challenges in a supply chain network.

2) To provide a visualization of the supply chain including warehouses and transportation

routes.

3) To Evaluate the Time and Space Complexities of the algorithms used.

4) To determine the shortest and most efficient routes for transporting goods, considering

factors like distance, time, and cost using Dijkstra’s Algorithm.

5) Plan efficient delivery routes for visiting all warehouses at once, handling capacity and

time constraints using Nearest Neighbor Algorithm.

6) To maximize goods distribution flow using Ford-Fulkerson Algorithm

7) To optimize warehouse to warehouse delivery routes

College of Information Technology

3
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

CHAPTER II

LITERATURE REVIEW

2.1 PREVIOUS WORK

Previous studies have investigated the computational complexities of various pathfinding

algorithms. Notably, Dijkstra's algorithm (Dijkstra, 1959) exhibits a time complexity of O(|E| +

|V|log|V|), while the A* algorithm (Hart et al., 1968) has a time complexity of O(b^d).

Furthermore, the Floyd-Warshall algorithm (Floyd, 1962) has a time complexity of O(|V|^3),

making it a viable solution for finding shortest paths in weighted graphs.

In addition to theoretical analyses, graph traversal algorithms have been applied in various

real-life scenarios. For instance, Google Maps utilizes Dijkstra's algorithm to provide the most

efficient routes (Google, 2020). Moreover, optimization algorithms have been employed in

logistics and supply chain management to minimize costs and maximize efficiency (Wang et al.,

2019).

Our research aims to bridge the gap between existing complex solutions and the need for

simple, user-friendly, and cost-effective implementations. By prioritizing ease of use, simplicity,

and affordability, we aim to develop a supply chain optimization system that streamlines logistics

operations and improves overall efficiency.

College of Information Technology

4
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

2.2 RELEVANCE OF CHOSEN TOPICS

Dijkstra’s Algorithm is one of the primary algorithms utilized in this project, this algorithm

plays a critical role in shortest-path problems. This algorithm is widely utilized in network routing,

logistics, and urban planning. For instance, most modern GPS navigation systems utilizes

Dijkstra’s Algorithm to determine the most efficient travel routes.

In the context of this project, Dijikstra’s Algorithm helps in modeling and optimizing the supply

chain routes, by applying Dijkstra’s Algorithm the system can determine the shortest and most

cost-effect paths between warehouses and distribution centers, reducing transportation time and

costs. Furthermore the use of graphs allows for an intuitive visualization of the supply chain

network.

Another important algorithm in the pathfinding process of our application is a heuristic-

based routing Nearest Neighbor Algorithm which is commonly used in approximate solutions for

the Traveling Salesman Problem(TSP). The computational efficiency of this algorithm is

prioritized over exact solutions. This algorithm is beneficial for quickly generating feasible routes

for delivery scheduling and warehouse dispatching in a supply chain network.

The Ford-Fulkerson Algorithm one of the algorithm that we will use is employed for

maximum flow problems in a network graph. It is an instrumental tool in optimizing logistics and

supply chain operations by identifying the maximum possible flow of goods through a network of

warehouses and distribution points. It is commonly used in real-world applications such as traffic

engineering, water distributions systems, and supply chain logistics, ensuring that the constraints

like bottlenecks and capacity limitations are efficiently managed.

College of Information Technology

5
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

Understanding the time and space complexities of these algorithms is essential for

evaluating an algorithm’s efficiency. By analyzing Big-O notation, users can compare approaches

and select the most optimal solutions for specific problems.

● Nearest Neighbor Algorithm has a complexity of O(n^2) in its basic implementation but

it is efficient for approximate solutions.

● For Fulkerson Algorithm runs in O(E * max flow), making it suitable for network

optimization

These distinctions are crucial in applicating these algorithms in real-world scenarios where

performance optimization is necessary, especially in large-scale networks.

The integration of these algorithms into the program ensures both theoretical depth and practical

applicability, by leveraging graph traversal, and network flow.

College of Information Technology

6
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

CHAPTER III

Algorithm Design and Complexity, Topics Implemented, and User Interface Design

3.1 Programming Language and Tools

Python: Python was chosen as the primary programming language due to its simplicity of use

and its extensive external libraries that facilitate the implementation of algorithms. Libraries such

as NetworkX and Matplotlib are utilized to visualize the supply chain process. These libraries

allows the representation of warehouses as nodes and their connection ass weighted edges in a

graph structure. Additionally, the application’s GUI was developed using Python’s Tkinter

Library, it was selected for its ease of use and its capability to create interactive and user-friendly

desktop applications.

3.2 Topics Implemented

The application integrates several algorithmic concepts that enhances the functionality and

performance of our Supply Chain Optimization System. The system mostly utilizes graph theory,

to solve real-world problems within a supply chain environment. The following algorithms were

implemented to address various aspects of the system.

1. Graph Traversal Algorithm

Graph Traversal Algorithms are essential algorithms that we have used for exploring and

visiting each node and edge within the supply chain network graph. These algorithms

enable the system to traverse through all warehouses(nodes) and routes(edges) to analyze

and compute different operations, such as pathfinding and network flow. Graph Traversal

College of Information Technology

7
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

that is integrated into the system is Dijsktra’s Algorithm and The Nearest Neighbor

Algorithm that depends on traversing the graph to explore the possible routes between

warehouses. Additionally the Ford-Fulkerson Algorithm utilizes graph traversal

techniques to search through the network when calculating the maximum flow. Graph

Traversal algorithms enable our system to dynamically explore the entire supply chain

network and support essential features like route computation, data exploration, and

network flow analysis.

2. Pathfinding Algorithms

Pathfinding algorithms are employed to search for the most optimal routes within our

supply chain network based on defined criteria such as minimum cost or shortest

distance. Algorithms such as Dijkstra’s Algorithm that can calculate the shortest path

between warehouses in the supply chain network and Nearest Neighbor Algorithm that is

used to generate a delivery plan by visiting the nearest unvisited warehouse until all

destinations have been covered. This algorithm enhances the program’s decision-making

capabilities by generating optimized delivery routes and reducing transportation costs

within the network. The results are visualized through graphs using NetworkX and

Matplotlib libraries.

3. Network Flow Algorithm

Network flow algorithms focus entirely on determining the optimal flow of goods

through the supply chain network, considering capacity constraints and resource

allocation. Ford-Fulkerson Algorithm is utilized to calculate the maximum flow of

College of Information Technology

8
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

commodities through the supply chain network. It will iteratively search for augmenting

paths and update the flow until the maximum possible flow is achieved. This algorithm

supports the optimization of resource distribution within our supply chain network,

ensuring that supply chain operations maximize throughput while respecting capacity

limitations.

3.3 User Interface Design

Figure 1.1 Main Window

This is our main user window that hosts the graph frame and the button functions. The button

provided within this main window allow the user to perform specific actions like adding

warehouses, establishing connections, or finding the shortest path between selected

warehouses.The graph frame can dynamically update to the latest changes in the graph such as

College of Information Technology

9
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

new connections or algorithm implementation like shortest path.This window provides a

centralized and user-friendly environment where users can interact with the application, visualize

real-time updates, and apply algorithms within the application.

Figure 1.2 Add Warehouse Window

This window serves as the interface for collecting warehouse details from the user. Initially, the

window is designed to display a simple input field that prompts the user to enter the desired number

of warehouses they want to add. Once the user specifies the number of warehouses, the window

dynamically updates and transitions to another frame within the same window. This new frame is

automatically generated based on the number provided by the user, and it contains multiple input

fields corresponding to the number of warehouses specified. In this section, the user is required to

input the names for each warehouse in the provided fields. This design allows flexibility and

College of Information Technology

10
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

ensures that the interface adapts to the user’s input, making the process of adding warehouse details

more interactive and user-friendly.

Figure 1.3 Add Connection Window

This window allows users to add connections(edges) between the warehouses(nodes) in the

network. Through this interface, users can select two warehouses on the dropdown field and

establish a connection between them, representing a path or link in the supply chain network. These

connections are visually displayed within the graph frame allowing users to see the relationships

between different warehouses. The straightforward design ensures that even users with limited

technical knowledge can effortlessly create connections, making the application accessible and

easy to use.

College of Information Technology

11
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

Figure 1.3 Shortest Path Window

This window is dedicated to finding the shortest path between two warehouses in the supply chain

network. It serves as an interactive tool that guides users through the process of selecting starting

and ending warehouses, calculating the optimal route and visualizing the results. This window

dynamically updates the graph frame with each change to the network, providing a real-time visual

representation of the supply chain and allowing users to easily understand and analyze the results.

College of Information Technology

12
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

Figure 1.4 Map Window

This window provides a real-world representation of the supply chain network. It is an interactive

html map created using leaflet api retrieved by javascript.

Figure 1.5 Max Flow Calculation

In this window the user can select a source warehouse and sink warehouse to implement the max-

flow calculation using Ford-Fulkerson Algorithm.

College of Information Technology

13
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

Figure 1.6 Max Flow Graph

This is a separate graph from the usual graph frame. Since the max-flow algorithm uses a directed

graph in this window the program will initialize a separate directed graph for max flow

implementation after the user has selected a source and sink node.

College of Information Technology

14
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

Figure 1.7 Nearest Neighbor Window

Figure 1.8 Nearest Neighbor Graph

This is the nearest neighbor window in which the user can select where the starting warehouse is.

This window allows the user to plan warehouse to warehouse logistics where they can select a

starting warehouse from a dropdown menu. Once the starting point is chosen, the algorithm will

then calculate an optimized route that visits each warehouse exactly once, minimizing the total

travel cost. The resulting path is then displayed in the graph assisting users in efficiently planning

routes for single-vehicle deliveries.

College of Information Technology

15
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

CHAPTER IV

Implementation Details: Algorithm Design and Complexity

4.1 Code Explanation

openShortestPathWindow(): This function opens a new window for the user where they can

select a starting and ending warehouse from a dropdown menu to calculate the shortest path

between them. If the two warehouse conditions are not met, a warning will be shown and the

function will not proceed. Once both warehouses are selected, clicking the “Find Path” button

triggers the algorithm to compute the shortest route using the find_shortest_path().

openAddWarehouse(): This function checks first if the “Add Warehouse” window is already

open. If it is, it brings the existing window to the front and exits, if it is not however it will create

a new window. Inside the window there is an entry field for the user to input the number of

warehouses they wish to add. A button labeled “Set Warehouses” is provided which when clicked

triggers the create_input method to generate the input field for the warehouse details. The

create_input method will then set up another frame to hold these dynamic input fields, which will

expand to accommodate the warehouse name inputs.

find_shortest_path(): This function is responsible for finding the shortest path between two

selected warehouses using Dijkstra’s Algorithm. It will check first if there are at least two

warehouses available; if not, it shows a warning message. Then, it retrieves the selected start and

end warehouses from the user’s input and verifies if both exist in the current list of warehouses. If

either of the warehouses is invalid, it shows an error message. If valid, it calls the dijkstra function

to compute the shortest path between the two warehouses. If no path is found, it displays an error

College of Information Technology

16
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

message informing the user that there are no connections existing between the selected

warehouses.It then calls the visualize_graph method to display the graph with the shortest path

highlighted in red.

dijkstra(): This function is responsible for finding the shortest path between a starting warehouse

and an ending warehouse using Dijkstra’s Algorithm provided by NetworkX. It tries to compute

the path by calling nx.dijkstra_path on the graph self.G using the given start and end nodes

provided, while considering the edge weights labeled as weight. If a valid path exists, it returns

the list of nodes representing the shortest path. However if there is no available path between the

selected warehouses, it catches the NetworkXNoPath exception and returns an empty list to

indicate that no path was found.

visualize_graph(): This function is responsible for visualizing the supply chain graph in the

program. First it checks if the graph frame exists; if not, it returns. Then it clears any existing

widgets in the graph frame to avoid overlapping or duplication of previous graph drawings. After

that, it calls the function to create a graph, ensuring that all nodes(warehouses) and

edges(connections) are updated. The layout of the graph is set using shell_layout to position the

nodes neatly. The graph is drawn using NetworkX, with nodes displayed in light blue and edges

in gray, while edge labels show the weights or capacities. If a shortest path is provided through

highlight_edges, those specific edges are highlighted in red with a thicker line to emphasize the

path. To prevent memory leaks the matplotlib figure is closed after generating the graph. Finally,

a new canvas is created to display the updated graph in the GUI, replacing the old one to reflect

the latest change or computed shortest path.

College of Information Technology

17
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

4.2 Challenges Faced

During the implementation of the program, several challenges were encountered that required

thoughtful solutions and optimization to ensure the system functioned as intended.

One of the primary challenges we faced during development of the program was

implementing graph algorithms, particularly those involving pathfinding and network flow.

Dijkstra’s algorithm posed difficulties regarding time complexity. As the number of warehouses

and connections increased, the execution time of the algorithm also increased, leading to

performance issues when the graph became too large.To address this, we optimized the graph’s

data structures, ensuring that edge weights were stored efficiently and minimizing redundant

calculations.

Another significant challenge we face is about programming when managing the

dynamically updated graph and visualizing it in real-time. The handling of large graphs posed

memory management concerns and could cause performance bottlenecks, particularly when trying

to visualize the entire network. To mitigate this, we used techniques to optimize memory usage,

such as clearing old widgets and reusing components in the GUI to avoid unnecessary memory

consumption.

For our GUI Design, from a design perspective creating a user-friendly and intuitive

interface that could handle complex visualization while being simple to navigate was another

challenge. The key difficulty here was ensuring that the interface remained responsive and

efficient, even when dealing with large datasets and frequent updates. The graphical representation

College of Information Technology

18
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

of the network, which includes dynamically updating the map and visualizing paths in real-time,

required careful consideration of how to present the information without overwhelming the user.

To overcome this, we incorporated dynamic updates and optimized the layout to provide clear and

concise visual feedback ensuring that the user could follow the algorithmic behavior of the system

without confusion.

College of Information Technology

19
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

CHAPTER V

Results and Evaluation: Algorithm Design and Complexity

5.1 Testing

1. Testing Algorithm Accuracy

To ensure the proper and correct implementation of the algorithms, a two-step verification

approach was conducted: a computer-based calculation and manual calculation. The same

test graphs were used in both methods to compare results and verify if the outputs align

with theoretical expectations

For each algorithm:

● Dijkstra’s Algorithm was tested to confirm whether the shortest path and total cost

between warehouses was correct and had the same results manual and computer-

based calculations.

● Nearest Neighbor Algorithm was checked by manually simulating the sequence of

visits to each warehouse from a selected starting point and comparing it to the

computed tour.

● Ford-Fulkerson Algorithm was validated by solving the flow networks on paper

and matching it to the calculated maximum flow with the computer-based results.

2. Testing Input Types

College of Information Technology

20
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

It is common for user input to be incorrect or invalid. Invalid inputs can lead to

improper or outright broken running of the program. Therefore, there needs to be a way to

handle different input types when a user inputs a value.

A common input problem for our program will be when a user inputs a letter instead

of a numeric for values in path weight. (Show GUI)

Figure 1.7 Invalid User Input

College of Information Technology

21
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

Figure 1.8 Input Error Message

3. Testing Algorithm on Sparse and Large Graphs

The algorithm will be tested on different kinds of graphs. One will be a normal graph that

is made by a user. Another graph will be a graph with a sparse number of nodes and paths

and the other will be a graph with a lot more nodes and paths. The algorithm will be tested

against these and will determine if different graph types have an effect on the algorithm.

(Test Different Graphs)

College of Information Technology

22
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

Figure 1.9 Small Sized Graph

The algorithms were able to calculate normally on a small sized graph. In this example we have

used Dijkstra’s Shortest Path algorithm and it worked perfectly fine.

College of Information Technology

23
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

Figure 1.10 Sparse Graph

Figure 1.11 No Path Error

College of Information Technology

24
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

On a sparse graph the program will issue an error if there are no paths found between two

warehouses. In this image using shortest path between Node A and D will issue an error warning

to inform the user that there are no possible paths that can connect the two nodes.

5.2 Evaluation of Effectiveness

1. Create Supply Chain Network System

The program allows users to create a graph representation of a supply chain network. Users

can input warehouses and paths across each warehouse and their cost of traversal. It also

allows them to perform different algorithms in order to solve logistical and operational

problems.

2. Visualize Supply Chain

Using the GUI library, the users can see the network they have created. Warehouses are

signified using circles and the lines represent the roads or paths. It shows the whole network

and allows the user to plan out routes for transportation.

3. Evaluate Time and Space Complexities

The evaluated time and space complexities of the algorithms were the following:

Dijkstra’s Algorithm

○ Time Complexity: O((V + E) log V)) using a priority queue

○ Space Complexity: O(V), for storing the distances and visited nodes

○ Where:

i. V = number of warehouses

College of Information Technology

25
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

ii. E = number of connections

Nearest Neighbor Algorithm

○ Time Complexity: O(n^2), due to repeated comparisons of distance between all

warehouses

○ Space Complexity: O(n), for tracking visited nodes

○ Where:

i. n = number of warehouses to visit

Ford–Fulkerson Algorithm

○ Time Complexity: O(E x max_flow), where max_flow is the maximum possible

flow in the network.

○ Space Complexity: O(V + E) for storing the residual graph

○ Where:

i. V = number of nodes in the supply chain

ii. E = number of routes with flow capabilities

iii. max_flow = total flow that can be pushed from the source to the sink

4. Determine Efficient Routes using Dijkstra’s Algorithm

Dijkstra’s algorithm will be used to find the lowest cost path from a warehouse to another.

This allows the user to plan routes with the least amount of cost for transportation.

5. Plan Delivery Routes for Visiting all warehouses once using Nearest Neighbor

Algorithm

College of Information Technology

26
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

The system successfully implemented the Nearest Neighbor Algorithm to allow users to

plan delivery routes that visit each warehouse exactly once. Users can select a starting

warehouse, and the algorithm then computes a route by visiting the nearest unvisited

warehouse at each step. This ensures a fast and reasonably efficient path covering all

locations, minimizing the overall transport cost.

6. Maximize Goods Distributing Flow using Ford-Fulkerson Algorithm

The system were able to integrate the Ford-Fulkerson Algorithm to compute the maximum

possible flow of goods between two warehouses (source and sink) in the supply chain

network. This algorithm analyzes all possible paths and iteratively finds the augmenting

path with available capacity until no more such paths exist. By doing so, it then determines

the optimal distribution capacity of the network.

7. Optimize Warehouse to Warehouse Delivery Routes

Users can optimize transportation or delivery routes between warehouses. The algorithms

will calculate for them the most optimal route for their delivery according to different

algorithms.

8. User Feedback or Self-Assessment of Effectiveness.

The Supply Chain Optimization System met the key objectives set out at the start of the

project. Through self-assessment, we evaluated the program in terms of functionality,

usability, and overall effectiveness.

College of Information Technology

27
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

Functionality

The program successfully implement three major algorithms:

○ Dijkstra’s Algorithm for determining the shortest path between warehouses

○ Nearest Neighbor Algorithm for planning routes that visit all warehouses once with

minimal cost

○ Ford-Fulkerson Algorithm for computing the maximum goods that can flow across

the supply chain

Each Algorithm performed as expected on small to medium sized graphs, including sparse

and dense networks.

Usability

The GUI was straightforward and allowed the users to add nodes, connect them, and

visualize the supply chain network. The algorithm windows provided a clear process for

selecting the starting points and viewing the outputs. The overall user interaction

experience was functional and effective for supply chain network decision making.

College of Information Technology

28
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

CHAPTER VI

Conclusion: Algorithm Design and Complexity

6.1 Summary of Findings

Our Supply Chain Optimization System successfully achieved the objectives we have outlined in

our introductory chapter. The system was designed to model and optimize a supply chain networks

of warehouse to warehouse logistics operations through the application of key graph algorithms

such as Dijkstra’s Algorithm for shortest path calculations, the Nearest Neighbor Algorithm for

route planning, and a modified Ford-Fulkerson Algorithm for computing the maximum flow

between our supply chain points.

All chosen algorithms were correctly implemented using Python and NetworkX, ensuring that our

algorithms have accurate computational results across a wide range of input scenarios. The system

demonstrated the following:

● Dijkstra’s Algorithm reliably computed the shortest path between origin and destination

nodes, adapting well to weighted graphs where edge weights represented the transport cost.

● The Ford-Fulkerson Algorithm was successfully modified to handle capacity-limited

edges, allowing users to compute the maximum possible flow from supply sources to

demand points.

● The Nearest Neighbor Algorithm provided efficient though heuristic-based delivery

routing between our warehouses.

Each algorithm was stress-tested under varying graph size and complexity levels to verify the

correctness and efficiency of the algorithms.

College of Information Technology

29
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

The GUI, developed using Tkinter and Matplotlib, provided an intuitive environment for:

● Creating and editing supply chain graphs interactively

● Visualizing the execution of each algorithm

● Simulating delivery paths and capacity-based flows in a visual format.

The project has met its initial goals:

● Functionality: The system offered complete support for graph creation, algorithm

simulation, and visual representation of the network.

● Algorithm Performance: All implemented algorithms performed efficiently and yielded

correct outputs under test scenarios.

● User Interaction: The interactive GUI and visual feedback mechanisms enabled the users

to have meaningful engagement with our program.

Overall, the system functions as a decision-support tool for logistic planning and visualization in

supply chain contexts.

6.2 Future Improvements

While the current version of our Supply Chain Optimization System has successfully meet its core

objectives there are several enhancements that can be made to expand its capabilities, improve the

performance, and provide more operational assistance with the decision making capabilities of its

users.

1. Integration of Additional Algorithms

College of Information Technology

30
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

To increase the system’s optimization power and flexibility, it could be improve with the following

algorithms to be incorporated in future iterations:

● A* Search Algorithm: An enhancement over Dijkstra’s Algorithm, A* introduces

heuristics to improve pathfinding efficiency, particularly in large sized graphs.

● Genetic Algorithms: Genetic This metaheuristic algorithm could be used to solve complex

supply chain problems such as vehicle routing and delivery scheduling with multiple

constraints.

● Kruskal’s and Prim’s Algorithm: For constructing the minimum spanning trees, these

algorithms can help identify the most cost-effective distribution network setup.

2. GUI and User Experience Improvements

Although the current application that is based on Tkinter interface is functional and interactive,

the following enhancement could improve usability and scalability such as:

● Drag-and-Drop Node Placement: This allows the users to reposition the nodes on the

graph canvas for easier and more accurate visualization.

● Enhance the Map-Based Visualization: Although we have tried to integrate a map-based

visualization what we have done is simply to show a map of the region where the theoretical

network is based on. A much more sophisticated approach could improve the program to

simulate a real-world supply chain scenario.

● Undo/Redo and Graph History: This could be a feature that can track and revert changes

that were made during graph constructions or simulations.

3. Performance and Scalability Enhancements

College of Information Technology

31
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

As the graph size grow, algorithm performance becomes critical. The following enhancement can

be made for smoother optimizations.

● Memory Management Enhancements: Efficient handling of the graph state and results

to reduce the memory usages for large-scale networks.

● Parallel Processing: Implementation of multithreading or multiprocessing for

computationally intensive algorithms like Ford-Fulkerson on large graphs.

Overall, the Supply Chain Optimization System effectively met its intended objectives. The

implement algorithms were functionally robust and accurate across different input types and on

small to medium sized graphs. The user interface played a vital role in simplifying interactions

with the complex algorithms and visualizing their outcomes. While there are some technical

limitations and user interface constraints that exist, the program will stand as a strong foundation

for a future expansion and continued development in supply chain logistics optimization.

REFERENCES

Schrijver, Alexander (2012). "On the history of the shortest path problem" (PDF).
Optimization Stories. Documenta Mathematica Series. Vol. 6. pp. 155–167.
doi:10.4171/dms/6/19. ISBN 978-3-936609-58-5.
Maqbool, Albia & Kumar, Manoj. (2018). STUDY AND ANALYSIS IN DIJKSTRA’S
ALGORITHM AND BELLMAN FORD ALGORITHM ON RUN-TIME BASIS &
IMPLEMENTATION IN ANGIOGRAPHY SYSTEM. 16. Airo International Research
Journal. Volume XVI. ISSN: 2320-3714.

Johnson, D. S., & McGeoch, L. A. (1997). The Traveling Salesman Problem: A Guided
Tour of Combinatorial Optimization DOI: 10.1007/978-3-642-58341-6_4

College of Information Technology

32
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

Chase, C., Chen, H., Neoh, A., & Wilder-Smith, M. (2020). An Evaluation of the Traveling
Salesman Problem. California State University ScholarWorks. Retrieved from
https://scholarworks.calstate.edu/downloads/xg94hr81q?locale=en
Biswas, S., Laga, S. S., & Paul, B. (2017). A review on Ford Fulkerson Graph Algorithm
for Maximum Flow. In International Journal of Scientific & Engineering Research,
International Journal of Scientific & Engineering Research (Vol. 8, Issue 3, pp. 109–110).
https://www.ijser.org/researchpaper/A-Review-on-Ford-Fulkerson-Graph-Algorithm-for-
Maximum-Flow.pdf
Cormen, Thomas H.; Leiserson, Charles E.; Rivest, Ronald L.; Stein, Clifford (2001).
"Section 26.2: The Ford–Fulkerson method". Introduction to Algorithms (Second ed.).
MIT Press and McGraw–Hill. pp. 651–664. ISBN 0-262-03293-7.
Petrov, A. (2018). Algorithms behind modern storage systems. Queue, 16(2), 31–51.
https://doi.org/10.1145/3212477.3220266

Dijkstra, E. W. (1959). A note on two problems in connection with graphs. Numerische


Mathematik, 1(1), 269-271.

Hart, P. E., Nilsson, N. J., & Raphael, B. (1968). A formal basis for the heuristic determination of
minimum cost paths. IEEE Transactions on Systems Science and Cybernetics, 4(2), 100-107.

Floyd, R. W. (1962). Algorithm 97: Shortest path. Communications of the ACM, 5(6), 345.

Google. (2020). Google Maps: Route optimization.

Wang, X., Li, Z., & Xu, X. (2019). Optimization of logistics and supply chain management
using genetic algorithm. Journal of Intelligent Information Systems, 54(2), 257-271

College of Information Technology

33
UNIVERSITY OF NEGROS OCCIDENTAL – RECOLETOS
COLLEGE OF INFORMATION TECHNOLOGY
PAASCU Accredited, CISCO Local Academy
and Center of Development in Information Technology Education
Lizares Avenue, Bacolod City 6100

CURRICULUM VITAE

Name : Ralph Vincent Jaro

Program of Study : BS in Computer Science

Date of Birth : October 10, 2004

Contact Details : [email protected]

Areas of Interest : Cybersecurity, Networking, A.I

Name : Grefe Erl John G. Entrina

Program of Study : BS in Computer Science

Date of Birth : September 30, 2003

Contact Details : [email protected]

Areas of Interest :

Name : Josh Valenzuela

Program of Study : BS in Computer Science

Date of Birth : January 11, 2005

Contact Details : [email protected]

Areas of Interest :

College of Information Technology

34

You might also like