fliscopt

Algorithms for flight scheduling optimization.

https://github.com/agrover112/fliscopt

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords

genetic-algorithm hacktoberfest hacktoberfest2021 heuristic-search-algorithms optimization-algorithms pypy3 python python3
Last synced: 4 months ago · JSON representation ·

Repository

Algorithms for flight scheduling optimization.

Basic Info
Statistics
  • Stars: 45
  • Watchers: 2
  • Forks: 12
  • Open Issues: 7
  • Releases: 0
Topics
genetic-algorithm hacktoberfest hacktoberfest2021 heuristic-search-algorithms optimization-algorithms pypy3 python python3
Created almost 5 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog Contributing Funding License Code of conduct Citation

README.md

Fliscopt

DOI

Stars Forks License Issues made-with-python Open Source Love png1 Maintenance PRs Welcome PyPI Tweet Say Thanks!

image

FLIght SCheduling OPTimization 🛫 or fliscopt is a simple optimization library for flight scheduling and related problems in the discrete domain. Flight scheduling opt here refers to generating schedules of optimal cost for round-trips.

The library supports plotting, asynchronous multiprocessing, and unimodal optimization benchmarks. The following repository contains code for the paper "XYZ". The experiments were performed in PyPy3.7 and CPython 3.8.10.

Following algorithms have been implemented and test as of date:

Algorithms: - Hill Climbing - Random Search - Simulated Annealing - Genetic Algorithm - Genetic Algorithm in Reverse Mode - Genetic Algorithm with Reversals - Genetic Algorithm with Random Search as a Reversal/Reverse Process - Iterated Chaining

Take a look at the docs or the Appendix for more details.

Getting Started

Install the library using pip: bash pip install fliscopt Or for unreleased versions: bash pip install git+https://github.com/Agrover112/fliscopt/fliscopt@branchname Or for development: bash git clone https://github.com/Agrover112/fliscopt.git cd fliscopt pip install .

Download the flights.txt file from the following link and add it to a data/ directory within your parent directory.

A sample code demonstrating how to use fliscopt: ```python from fliscopt.utils.util import printschedule, readfile,plotscores from fliscopt.rs import RandomSearch from fliscopt.ga import GA, ReverseGA, GAReversals, GARSReversals from fliscopt.hc import HillClimb from fliscopt.chaining import IteratedChaining from fliscopt.fitness import fitnessfunction,domain,griewank

readfile('flights.txt') sga=GAReversals(seedinit=False,search=False,nk=250,numbergenerations=1000) soln, cost, scores, nfe, seed = sga.run(domain=domain['domain'], fitnessfunction=fitnessfunction,seed=5) plotscores(scores, sga.getbase(),fname='flightscheduling', savefig=False)

sga2=GARSReversals(seedinit=False,search=False,nk=250,numbergenerations=1000) soln, cost, scores, nfe, seed = sga2.run(domain=domain['domain'], fitnessfunction=fitnessfunction,seed=5) plotscores(scores, sga2.getbase(),fname='flightscheduling', save_fig=False)

``` This results in the following two plots:

Checkout out the examples in the examples directory or run in Google Collab

For PyPy users

The instructions for setup are mentioned in the setup directory. Alternatively, you can set up using this bash script. A requirements file is provided just in case. The script creates and activates a PyPy Conda environment with all libraries and dependencies. bash cd ./setup.sh source setup.sh Then install using:

bash pypy -mpip install fliscopt

Testing

After adding any new algorithm, you can run the tests to check if the code is working properly. bash ./run_tests.sh

Results

Experimental Results

Results were compared by using the same seeds. The following table shows the results of the experiments. Flight scheduling results have been shown below.

| Algorithm | Mean cost | Std.dev | Min cost | Max cost | n.fe. | Time(millsecond) | |-----------|-----------|---------|----------|----------|-------|------------------| | SGA | 2780.9 | 205.75 | 2356 | 3081 | 1000 | 9.36 |
| GAwRo | 2629.8 | 213.79 | 2356 | 3004 | 1000 | 9.66 |
| GAwR | 2593 | 183.89 | 2356 | 2973 | 1099 | 10.16 |
| HC | 4177.7 | 817.72 | 2759 | 5839 | 328 | 0.33 |
| RS | 4545.3 | 271.95 | 4143 | 5165 | 100 | 0.17 |
| SA | 3726.5 | 578.16 | 2759 | 4679 | 512 | 0.24 |
| RS+HC | 3050.7 | 399.72 | 2356 | 3771 | 1657 | 2.23 |
| GARSRev | 2592.9 | 168.45 | 2356 | 2888 | 1099 | 9.97 |

Accessing results

After running the experiments, the results are stored in the results directory. The results are stored in the following format in subdirectories: . ├── multi_proc │ ├── ackley_N2 │ │ ├── genetic_algorithm_results.csv │ │ ├── genetic_algorithm_reversed_results.csv │ │ ├── genetic_algorithm_with_reversals_results.csv │ │ ├── hill_climb_results.csv │ │ ├── random_search_results.csv │ │ └── simulated_annealing_results.csv │ ├── booth/... | | | | │ └── zakharov │ ├── genetic_algorithm_results.csv │ ├── genetic_algorithm_reversed_results │ ├── genetic_algorithm_with_reversals_results.csv │ ├── random_search_results.csv │ └── simulated_annealing_results.csv ├── plots │ ├── ackley_N2 │ ├── fitness_function │ │ ├── hill_climb.png │ │ └── random_search.png │ ├── flight_scheduling │ │ ├── simulated_annealing.png │ │ ├── sol_chaining.png │ │ └── sol_chaining_a1.png │ └── griewank

References

Read and Cite the following References for detailed understanding and use of our project.

[1] Grover, A., Yadav, V., Alicea, B. (2023). Flipping the Switch on Local Exploration: Genetic Algorithms with Reversals. In: Kumar, S., Sharma, H., Balachandran, K., Kim, J.H., Bansal, J.C. (eds) Third Congress on Intelligent Systems. CIS 2022. Lecture Notes in Networks and Systems, vol 608. Springer, Singapore

[2] Alicea B., Grover A., Lim A. ,Parent J, Unified Theory of Switching. Flash Talk presented at: 4th Neuromatch Conference; December 1 - 2, 2021

Contributing Guidelines

Refer Contributing.md and Project Board for mode details. This repository follows conventional commits!

Owner

  • Login: Agrover112
  • Kind: user

Humans trying to understand machines and people.

Citation (CITATION.cff)

cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Ankit
    given-names: Grover
    orcid : https://orcid.org/0000-0003-3724-6605
title: fliscopt
version: v0.4.1
doi: 10.5281/zenodo.7018486
date-released: 2022-08-24
url : "https://doi.org/10.5281/zenodo.7018486"

GitHub Events

Total
  • Issues event: 1
  • Watch event: 7
  • Issue comment event: 3
Last Year
  • Issues event: 1
  • Watch event: 7
  • Issue comment event: 3

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 272
  • Total Committers: 13
  • Avg Commits per committer: 20.923
  • Development Distribution Score (DDS): 0.393
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Ankit Grover a****2@g****m 165
Agrover112 4****2 56
Conventional Changelog Action c****n@g****m 14
Shubhayu Basu 9****B 9
Anik-Bardhan 6****n 8
Shubhayu Basu s****3@g****m 7
Hitesh h****i@g****m 3
LittleBigProgramming 2****g 3
Anirudh Anup a****9@g****m 2
CharlesAverill c****0@g****m 2
Subham Ghosh s****m@S****l 1
Tengzhen t****o@g****m 1
Tom Schmelzer 3****o 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 19
  • Total pull requests: 46
  • Average time to close issues: 15 days
  • Average time to close pull requests: about 15 hours
  • Total issue authors: 2
  • Total pull request authors: 14
  • Average comments per issue: 4.16
  • Average comments per pull request: 0.89
  • Merged pull requests: 38
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Agrover112 (18)
  • mpfaffenberger (1)
Pull Request Authors
  • Agrover112 (28)
  • Gizmotronn (6)
  • subhamgcon (1)
  • kkhitesh (1)
  • schmelto (1)
  • Nirodha-Github (1)
  • So-bonkers (1)
  • tawhidkhn63 (1)
  • Anik-Bardhan (1)
  • Yoda-Canada (1)
  • qwel-exe (1)
  • ShubhayuB (1)
  • gptkrsh (1)
  • LittleBigProgramming (1)
Top Labels
Issue Labels
Hacktoberfest (15) good first issue (12) help wanted (8) bug (5) Hacktoberfest-accepted (5) enhancement (4) documentation (4)
Pull Request Labels
Hacktoberfest-accepted (12) Hacktoberfest (11) documentation (5) enhancement (4) good first issue (4) bug (3) hactktoberfest-accepted (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 18 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 6
  • Total maintainers: 1
pypi.org: fliscopt

Flight scheduling optimization using Genetic Algorithm variants and other algorithms.

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 18 Last month
Rankings
Dependent packages count: 10.0%
Dependent repos count: 21.7%
Average: 24.5%
Downloads: 41.9%
Maintainers (1)
Last synced: 4 months ago

Dependencies

requirements.txt pypi
  • matplotlib >=3.3.
  • rich >=10.1.
setup.py pypi
  • matplotlib *
  • rich *
.github/workflows/release.yml actions
  • TriPSs/conventional-changelog-action v3.7.1 composite
  • actions/checkout v2 composite
  • actions/create-release v1 composite
.github/workflows/sync.yml actions
  • tgymnich/fork-sync v1.4 composite
package.json npm