This repo contains:
-
markovchain.ipynb
:A Jupyter notebook that demonstrates the use of Markov Chains to simulate the movement of a UAV. The user can upload their own data and run the simulation. This repository contains an example file (
./data/example.csv
) that can be used as a transition matrix.Using the example data, the user will simulate a use case as follows:
A UAV has been programmed to move between several regions. The regions are Gunja, Gapyeong, Ttukseom, and Isu. This notebook shows the possible routes for the UAV, starting from Gunja and ending in Isu without taking a direct flight.
-
streamlitmc.py
: A web based app that demonstrates the use of Markov Chain to simulate the movement of a UAV. The user could generate random data to simulate the movement of a UAV.
- Clone this repo.
- Install the requirements by
pip install -r requirements.txt
. - Run
streamlit run streamlitmc.py
in terminal.
-
Enter several regions as a comma separated list. (e.g.
Gunja,Gapyeong,Ttukseom,Isu
). This step will generate a random transition matrix. Turn onPlot Basic
to see the generated transition matrix and its graph network. -
[Optional] Turn on
Remove Self Flight
to prevent the UAV from staying in a region. -
Select Departure and Arrival Region and turn on
Plot Route
. This step will generate a new random transition matrix and automatically remove the direct connection between departure and arrival region. -
Click on
Simulate
to see the route of the UAV from departure region to arrival region. -
Scroll down to see the plot of probability ending in arrival region in N-step.
Thanks to this repo for the inspiration.