Giter Club home page Giter Club logo

orlovt / delivery-simulation Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 31.65 MB

A web-based 3D simulation of the University of Minnesota campus, showcasing a drone fleet delivery service. It features dynamic interactions among helicopters, humans, robots, drones, packages, and porch pirates, utilizing design patterns and C++ best practices for a robust and efficient system.

License: MIT License

Makefile 2.40% C++ 81.74% C 0.13% CSS 0.87% HTML 1.62% TypeScript 12.93% Dockerfile 0.32%
cpp design-patterns drone-simulation

delivery-simulation's Introduction

Delivery Simulation Project

Project Description:

This project is a web-based 3D simulation representing the campus of the University of Minnesota Twin Cities in Minneapolis, MN. It involves various entities including helicopters, humans, robots, drones, packages, and porch pirates. The primary objective is to simulate a drone fleet delivery service with dynamic interactions and pathfinding algorithms.

Aim of the Project:

The aim of this project was to create a complex system with multiple codependencies and interacting entities, while utilizing design patterns and C++ best practices. The goal is to build a robust, maintainable, and efficient simulation framework that demonstrates the power of combining various software design techniques.

Entities & Interactions:

  • Helicopters: Navigate the map, notifying users of the distance traveled.
  • Humans: Walk around the map and notify users when near the Keller Hall building.
  • Drones: Deliver packages using selected pathfinding algorithms.
  • Robots: Represent customers waiting for their packages.
  • Porch Pirates: Attempt to steal packages before delivery.
  • Packages: Items to be delivered, tracked throughout the delivery process.

Key Features:

  1. Drone Fleet Delivery Service:

    • Users can select pickup and drop-off locations for packages.
    • Choose from various pathfinding algorithms (A*, BFS, DFS, Dijkstra).
    • Drones deliver packages using the selected strategy.
  2. Interactive Simulation:

    • Real-time 3D visualization using Three.js.
    • Control panel to add entities, schedule deliveries, and adjust simulation speed.
    • Notifications for package status and entity interactions.
  3. Porch Pirates:

    • New entity type that adds a challenge by attempting to steal packages.
    • Pirates move towards packages upon delivery notification.
    • If successful, they return stolen packages to a designated location.

Running the Simulation:

To Run Locally:

  1. Clone the project from GitHub:
    git clone https://github.com/orlovt/delivery-simulation.git
  2. In a Unix terminal, run the following commands:
    make -j
    make run
  3. Open a browser and navigate to:
    localhost:8081

Simulation Controls:

  • Control Box: Add entities, adjust speed, show routes, change views.
  • Schedule Packages:
    • Name the package.
    • Select pickup and drop-off locations directly on the map.
    • Choose a pathfinding algorithm.
    • The simulation will visually represent the package's journey.

Design Patterns:

1. Factory Pattern:

Used extensively to create entities like drones, robots, humans, packages, and porch pirates. This pattern helps manage and encapsulate the creation logic of complex objects.

  • Factories:
    • DroneFactory, RobotFactory, HumanFactory, PackageFactory, PorchPirateFactory
    • CompositeFactory for managing multiple factories.

2. Strategy Pattern:

Applied to implement various pathfinding algorithms. The strategy pattern allows the simulation to select different algorithms at runtime.

  • Strategies:
    • AStarStrategy, BeelineStrategy, BfsStrategy, DfsStrategy, DijkstraStrategy

3. Observer Pattern:

Used for event handling and notifications, especially for package delivery updates.

  • Observers & Publishers:
    • IPublisher, IObserver for general notifications.
    • IPackagePublisher, IPackageObserver for package-specific notifications.

4. Decorator Pattern:

Enhances entities with additional behaviors without modifying their structure. This is used for adding dynamic attributes and behaviors to packages and other entities.

  • Decorators:
    • PackageColorDecorator, JumpDecorator, SpinDecorator

New Features:

Porch Pirates:

A realistic addition that simulates the problem of package theft. Porch pirates add unpredictability and challenge to the simulation, making it more engaging and reflective of real-world issues.

  • Integration:
    • Porch pirates listen for package delivery notifications and attempt to intercept packages.
    • They enhance the observer pattern by acting on delivery notifications.
    • This feature tests the resilience of the delivery system and provides a realistic scenario for users to strategize against.

Links:

delivery-simulation's People

Contributors

orlovt 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.