Metadata-Version: 2.1
Name: omotes-simulator-core
Version: 0.0.27
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.11
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~=2.1.0
Requires-Dist: pandas~=2.2.2
Requires-Dist: scipy~=1.14.1
Requires-Dist: pyesdl~=25.7
Requires-Dist: dataclass-wizard~=0.22.3
Requires-Dist: influxdb~=5.3.2
Requires-Dist: pyjnius~=1.6.1
Requires-Dist: CoolProp~=6.6.0
Requires-Dist: NetworkX~=2.7.0
Provides-Extra: dev
Requires-Dist: setuptools~=75.6.0; extra == "dev"
Requires-Dist: wheel~=0.45.1; extra == "dev"
Requires-Dist: setuptools-git-versioning<3,>=2.0; extra == "dev"
Requires-Dist: black==24.10.0; extra == "dev"
Requires-Dist: flake8==7.1.1; extra == "dev"
Requires-Dist: flake8-pyproject~=1.2.3; extra == "dev"
Requires-Dist: flake8-docstrings~=1.7.0; extra == "dev"
Requires-Dist: flake8-quotes~=3.4.0; extra == "dev"
Requires-Dist: flake8-bugbear~=24.10.31; extra == "dev"
Requires-Dist: flake8-mock~=0.4; extra == "dev"
Requires-Dist: flake8-tuple~=0.4.1; extra == "dev"
Requires-Dist: pytest~=8.3.4; extra == "dev"
Requires-Dist: pytest-cov~=6.0.0; extra == "dev"
Requires-Dist: mypy~=1.13.0; extra == "dev"
Requires-Dist: isort==6.1.0; 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.0.1; extra == "dev"
Requires-Dist: plotly~=5.24.0; extra == "dev"
Requires-Dist: shapely~=2.0.6; extra == "dev"
Requires-Dist: snakeviz==2.2.0; extra == "dev"
Requires-Dist: types-requests~=2.28.11; 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)
```

## 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]
