Infrastructure simulation library for reinforcement learning and optimization
Project description
InfraLib: Infrastructure Management for RL and Optimization
InfraLib is a comprehensive Python library for modeling, simulating, and analyzing large-scale infrastructure management problems using reinforcement learning and stochastic optimization. It provides realistic deterioration modeling, partial observability, and scalable simulation supporting millions of components.
Quick Links
- Documentation: infralib.readthedocs.io
- Website: infralib.github.io
- Research Paper: arXiv
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Installation
Option 1: Install from PyPI (Recommended)
pip install infralib
Option 2: Install with uv (Advanced Users)
First install uv:
# On macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
Then install InfraLib:
# Install from PyPI
uv add infralib
# Or install from source
git clone https://github.com/pthangeda/InfraLib.git
cd InfraLib
uv venv --python 3.12
source .venv/bin/activate # On Windows: .venv\\Scripts\\activate
uv pip install -e .
Documentation
Comprehensive documentation is available at infralib.readthedocs.io, including:
- API Reference: Detailed documentation for all classes and functions
- Tutorials: Step-by-step guides for common use cases
- Examples: Complete example implementations
- Theory: Mathematical foundations and model descriptions
Development
Setting Up Development Environment
# Clone the repository
git clone https://github.com/pthangeda/InfraLib.git
cd InfraLib
# Install with development dependencies
uv venv --python 3.12
source .venv/bin/activate
uv pip install -e \".[dev]\"
# Install pre-commit hooks (optional)
uv run pre-commit install
Running Tests and Code Quality
# Run tests
uv run pytest
# Run linting and formatting
uv run ruff check --fix
uv run ruff format
# Run all quality checks
uv run pre-commit run --all-files
Build Documentation
# Install documentation dependencies
uv add --group docs sphinx sphinx-rtd-theme sphinx-autodoc-typehints
# Build documentation
cd docs
uv run sphinx-build -b html . _build/html
Contributing
We welcome contributions from the community! Here's how to get involved:
-
Report Issues: Found a bug? Open an issue
-
Request Features: Have an idea? Start a discussion
-
Contribute Code:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes and add tests
- Run quality checks (
uv run pre-commit run --all-files) - Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
-
Improve Documentation: Help us make the docs better
-
Spread the Word: Star the repo and tell others about InfraLib!
Support & Community
- Contact: Pranay Thangeda (pranayt2@illinois.edu or contact@prny.me) - We're happy to help with questions and feature requests
- Collaboration: We welcome collaborations and are willing to implement features that help researchers and practitioners use InfraLib for their specific use cases
- Bug Reports: GitHub Issues
- Discussions: GitHub Discussions
License
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 InfraLib Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the \"Software\"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file infralib-0.1.0.tar.gz.
File metadata
- Download URL: infralib-0.1.0.tar.gz
- Upload date:
- Size: 107.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
890557e3934c9ad304037d9cb829771a0789f3da740137e66928773bbb43c4f5
|
|
| MD5 |
a183a52e3a15febe5513cb5cfda1132d
|
|
| BLAKE2b-256 |
7c5d05065405de1abd6875b2d7936f8a1722584b64026174906f8c2c9bf074cd
|
File details
Details for the file infralib-0.1.0-py3-none-any.whl.
File metadata
- Download URL: infralib-0.1.0-py3-none-any.whl
- Upload date:
- Size: 52.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8033e3cd7786e3ff65abec9310ffe38cd6a98dce7a8efa7cd9c56182b2d2432
|
|
| MD5 |
b5cb028febc5ae9a4dfdf7f09ff95d85
|
|
| BLAKE2b-256 |
51e579227ad1370f2204d5d5f46a23484f8856369c5bf42484f9177414faae56
|