Metadata-Version: 2.1
Name: omotes-simulator-core
Version: 0.9.1
Summary: Core library of the OMOTES simulator
Author-email: Michiel Tukker <michiel.tukker@deltares.nl>
Project-URL: homepage, https://www.nwn.nu
Project-URL: documentation, https://readthedocs.org
Project-URL: repository, https://github.com/Project-OMOTES/simulator-core
Project-URL: changelog, https://github.com/Project-OMOTES/simulator-core/blob/main/CHANGELOG.md
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Information Technology
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Physics
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy<3,>=2.4
Requires-Dist: pandas<4.0,>=3.0.0
Requires-Dist: scipy<2,>=1.16.1
Requires-Dist: pyesdl<27,>=26.2
Requires-Dist: dataclass-wizard<1,>=0.22.3
Requires-Dist: influxdb<6,>=5.3.2
Requires-Dist: pyjnius<2,>=1.9
Requires-Dist: CoolProp<9,>=8
Requires-Dist: NetworkX<4,>=3.4
Provides-Extra: dev
Requires-Dist: setuptools~=84.2; extra == "dev"
Requires-Dist: wheel~=0.48.0; extra == "dev"
Requires-Dist: setuptools-git-versioning<4,>=3.2; extra == "dev"
Requires-Dist: black==26.10.1; extra == "dev"
Requires-Dist: flake8==7.4.1; extra == "dev"
Requires-Dist: flake8-pyproject~=1.2.4; extra == "dev"
Requires-Dist: flake8-docstrings~=1.7.0; extra == "dev"
Requires-Dist: flake8-quotes~=3.4.0; extra == "dev"
Requires-Dist: flake8-bugbear~=26.9.30; extra == "dev"
Requires-Dist: flake8-tuple~=0.4.1; extra == "dev"
Requires-Dist: pytest~=9.2.0; extra == "dev"
Requires-Dist: pytest-cov~=7.1.0; extra == "dev"
Requires-Dist: mypy~=2.4.0; extra == "dev"
Requires-Dist: isort==9.0.2; extra == "dev"
Requires-Dist: build~=1.2.2; extra == "dev"
Requires-Dist: sphinx~=8.0.2; extra == "dev"
Requires-Dist: furo~=2024.8.6; extra == "dev"
Requires-Dist: geopandas~=1.2.0; extra == "dev"
Requires-Dist: plotly~=7.1.0; extra == "dev"
Requires-Dist: shapely~=2.2.0; extra == "dev"
Requires-Dist: snakeviz==2.2.0; extra == "dev"
Requires-Dist: types-requests~=2.33.0; extra == "dev"

# OMOTES-simulator-core

This repository is part of the 'Nieuwe Warmte Nu Design Toolkit' project. Omotes-simulator-core is the core library for the thermo-hydraulic numerical simulations within the NWN Design toolkit. The simulator requires a network schematization in ESDL format, simulation start/end time and a timestep-duration as input. The simulator will return a pandas dataframe that contains the all the output time series.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install omotes-simulator-core.

```bash
pip install omotes-simulator-core
```

## Usage

```python
from omotes_simulator_core.entities.esdl_object import EsdlObject
from omotes_simulator_core.entities.simulation_configuration import SimulationConfiguration
from omotes_simulator_core.infrastructure.simulation_manager import SimulationManager
from omotes_simulator_core.infrastructure.utils import pyesdl_from_file

# Create a callable that prints the progress messages
def progressLogger(progress: float, message: str) -> None:
    """Function to report progress to logging/stdout."""
    logger.info(f"({progress*100:.2f}%) {message}")

#  Create simulation config parameters
config = SimulationConfiguration(
        simulation_id=uuid.uuid1(),  #creates a new uuid for this simulation
        name="test run",             # user defined name
        timestep=3600,               # timestep, start and stop datetime (simulation period)
        start=datetime.strptime("2019-01-01T00:00:00", "%Y-%m-%dT%H:%M:%S"),
        stop=datetime.strptime("2019-01-01T01:00:00", "%Y-%m-%dT%H:%M:%S"),
    )
esdl_file_path = "path/to/whatever/file.esdl"

# Run the simulation
sim = SimulationManager(EsdlObject(pyesdl_from_file(esdl_file_path)), config)
result = sim.execute(progressLogger)
```

## Support

Found a bug, want a feature, or have a usage question? See the
[user feedback repository](https://github.com/Project-OMOTES/user_feedback) — open a
Discussion (Q&A category) for questions, or check/open an Issue for bugs and feature
requests.

## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

For more information, please see [CONTRIBUTING.md]

## License

[GPLv3](https://choosealicense.com/licenses/gpl-3.0/), see [LICENSE]
