Coder Social home page Coder Social logo

caiselvass / bicing-optimization-local-search Goto Github PK

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

This repository seeks to optimize bikes distribution of a public bicycle renting service across city stations using local search algorithms like Hill Climbing and Simulated Annealing, aiming to minimize costs and efficiently meet demand. It includes tools to visualize the distribution and showcases the utility of AI in urban logistics.

Python 100.00%
ai-algorithms hill-climbing local-search local-search-algoirthms simmulated-annealing

bicing-optimization-local-search's Introduction

Bicing Station Optimization Project

Project Overview

This project aims to optimize the distribution of bicycles across bicing stations in a city to meet expected demand using local search algorithms, specifically Hill Climbing and Simulated Annealing. The goal is to minimize transportation costs while ensuring that all possible bicycles are moved according to predictions for each station.

Setup Instructions

Prerequisites

  • Python 3.x
  • Pygame (for route visualization)
  • The abia_bicing.py file (containing Estacion and Estaciones classes) must be in the same folder as main.py.

Running Experiments

  1. Open main.py. This file contains the main logic for executing experiments.
  2. Starting from line 70, you'll find commented-out function calls for experiment execution, formatted as experimentoX(), where X is the experiment number.
  3. To run an experiment, uncomment the desired function call. Make sure to leave other lines (variable declarations, etc.) as they are, since they contain experiment results and parameters used in other experiments.
  4. For Experiment 5, execute it twice, once for each heuristic:
    • Open parameters_bicing.py.
    • Modify the params object's coste_transporte parameter to False for heuristic 1 or True for heuristic 2.

Individual Algorithm Execution

After completing the experiments, you can run individual instances of the Hill Climbing algorithm with a single replica to observe the route visualization in Pygame and check the __repr__()/__str__() outputs for both the initial and final states.

  • To switch heuristics for any run, adjust the coste_transporte parameter in parameters_bicing.py as mentioned above.

Visualization

Utilize Pygame to visualize the routes and distributions created by the algorithms, providing an interactive way to observe the optimization process in action.

Contributions

This project showcases the application of local search algorithms to real-world logistics and urban planning problems, demonstrating the potential of AI in improving city services and infrastructure.

bicing-optimization-local-search's People

Contributors

caiselvass avatar paupratai avatar rogerbaiges 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.