python-drs 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_drs-0.1.0 → python_drs-0.1.1}/PKG-INFO +8 -8
- {python_drs-0.1.0 → python_drs-0.1.1}/README.md +6 -6
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/__init__.py +1 -1
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/variables.py +1 -1
- {python_drs-0.1.0 → python_drs-0.1.1}/pyproject.toml +1 -2
- {python_drs-0.1.0 → python_drs-0.1.1}/python_drs.egg-info/PKG-INFO +8 -8
- {python_drs-0.1.0 → python_drs-0.1.1}/LICENSE +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/_execution_context.py +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/callbacks.py +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/config.py +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/data_source.py +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/engine.py +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/exceptions.py +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/flow.py +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/module.py +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/plot.py +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/serialize.py +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/drs/telemetry.py +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/python_drs.egg-info/SOURCES.txt +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/python_drs.egg-info/dependency_links.txt +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/python_drs.egg-info/requires.txt +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/python_drs.egg-info/top_level.txt +0 -0
- {python_drs-0.1.0 → python_drs-0.1.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-drs
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: A PyTorch-inspired, event-driven Discrete Rate Simulation framework.
|
|
5
5
|
Author: Jonathan Lamontagne Kratz
|
|
6
6
|
License: MIT License
|
|
@@ -28,7 +28,7 @@ License: MIT License
|
|
|
28
28
|
Project-URL: Homepage, https://github.com/epicgamer17/python-drs
|
|
29
29
|
Project-URL: Repository, https://github.com/epicgamer17/python-drs
|
|
30
30
|
Project-URL: Documentation, https://github.com/epicgamer17/python-drs/tree/main/docs
|
|
31
|
-
Keywords: simulation,discrete-rate,drs,discrete-event,modeling,
|
|
31
|
+
Keywords: simulation,discrete-rate,drs,discrete-event,modeling,continuous-flow
|
|
32
32
|
Classifier: Development Status :: 3 - Alpha
|
|
33
33
|
Classifier: Intended Audience :: Science/Research
|
|
34
34
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -64,8 +64,8 @@ Instead of ticking through time at fixed intervals, DRS calculates *exactly* whe
|
|
|
64
64
|
- **Event-driven time stepping** — simulate years of operation in seconds
|
|
65
65
|
- **PyTorch-style architecture** — `Module`, `Variable`, and `Level` compose into hierarchies with automatic dependency tracking
|
|
66
66
|
- **Built-in telemetry** — every state change is logged and plotted without custom tracking code
|
|
67
|
-
- **Fail-fast guardrails** — the engine stops you from breaking the physics of your model (e.g. draining an empty
|
|
68
|
-
- **Applicable to any continuous-flow system** —
|
|
67
|
+
- **Fail-fast guardrails** — the engine stops you from breaking the physics of your model (e.g. draining an empty tank)
|
|
68
|
+
- **Applicable to any continuous-flow system** — water networks, chemical processing, electrical grids, traffic, and more
|
|
69
69
|
|
|
70
70
|
## Installation
|
|
71
71
|
|
|
@@ -84,13 +84,13 @@ pip install python-drs[progress] # Rich progress bar
|
|
|
84
84
|
```python
|
|
85
85
|
from drs import DRSEngine, Module, Level
|
|
86
86
|
|
|
87
|
-
class
|
|
87
|
+
class Tank(Module):
|
|
88
88
|
def forward(self):
|
|
89
89
|
# Fill at 50 units per time step
|
|
90
|
-
self.
|
|
90
|
+
self.volume.rate = 50.0
|
|
91
91
|
|
|
92
|
-
model =
|
|
93
|
-
model.
|
|
92
|
+
model = Tank()
|
|
93
|
+
model.volume = Level("Volume", initial_value=100.0)
|
|
94
94
|
|
|
95
95
|
engine = DRSEngine(model)
|
|
96
96
|
result = engine.run(max_time=20.0)
|
|
@@ -9,8 +9,8 @@ Instead of ticking through time at fixed intervals, DRS calculates *exactly* whe
|
|
|
9
9
|
- **Event-driven time stepping** — simulate years of operation in seconds
|
|
10
10
|
- **PyTorch-style architecture** — `Module`, `Variable`, and `Level` compose into hierarchies with automatic dependency tracking
|
|
11
11
|
- **Built-in telemetry** — every state change is logged and plotted without custom tracking code
|
|
12
|
-
- **Fail-fast guardrails** — the engine stops you from breaking the physics of your model (e.g. draining an empty
|
|
13
|
-
- **Applicable to any continuous-flow system** —
|
|
12
|
+
- **Fail-fast guardrails** — the engine stops you from breaking the physics of your model (e.g. draining an empty tank)
|
|
13
|
+
- **Applicable to any continuous-flow system** — water networks, chemical processing, electrical grids, traffic, and more
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
@@ -29,13 +29,13 @@ pip install python-drs[progress] # Rich progress bar
|
|
|
29
29
|
```python
|
|
30
30
|
from drs import DRSEngine, Module, Level
|
|
31
31
|
|
|
32
|
-
class
|
|
32
|
+
class Tank(Module):
|
|
33
33
|
def forward(self):
|
|
34
34
|
# Fill at 50 units per time step
|
|
35
|
-
self.
|
|
35
|
+
self.volume.rate = 50.0
|
|
36
36
|
|
|
37
|
-
model =
|
|
38
|
-
model.
|
|
37
|
+
model = Tank()
|
|
38
|
+
model.volume = Level("Volume", initial_value=100.0)
|
|
39
39
|
|
|
40
40
|
engine = DRSEngine(model)
|
|
41
41
|
result = engine.run(max_time=20.0)
|
|
@@ -428,7 +428,7 @@ class Level(Variable):
|
|
|
428
428
|
"""A variable that accumulates over time based on a rate.
|
|
429
429
|
|
|
430
430
|
Levels are the primary way to model physical quantities that flow or change
|
|
431
|
-
continuously over time (e.g.,
|
|
431
|
+
continuously over time (e.g., volume in a tank, energy in a battery).
|
|
432
432
|
|
|
433
433
|
Attributes:
|
|
434
434
|
upper_threshold (float): The maximum limit for the level. The engine will
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python-drs"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.1"
|
|
8
8
|
description = "A PyTorch-inspired, event-driven Discrete Rate Simulation framework."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -16,7 +16,6 @@ keywords = [
|
|
|
16
16
|
"drs",
|
|
17
17
|
"discrete-event",
|
|
18
18
|
"modeling",
|
|
19
|
-
"mining",
|
|
20
19
|
"continuous-flow",
|
|
21
20
|
]
|
|
22
21
|
classifiers = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-drs
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: A PyTorch-inspired, event-driven Discrete Rate Simulation framework.
|
|
5
5
|
Author: Jonathan Lamontagne Kratz
|
|
6
6
|
License: MIT License
|
|
@@ -28,7 +28,7 @@ License: MIT License
|
|
|
28
28
|
Project-URL: Homepage, https://github.com/epicgamer17/python-drs
|
|
29
29
|
Project-URL: Repository, https://github.com/epicgamer17/python-drs
|
|
30
30
|
Project-URL: Documentation, https://github.com/epicgamer17/python-drs/tree/main/docs
|
|
31
|
-
Keywords: simulation,discrete-rate,drs,discrete-event,modeling,
|
|
31
|
+
Keywords: simulation,discrete-rate,drs,discrete-event,modeling,continuous-flow
|
|
32
32
|
Classifier: Development Status :: 3 - Alpha
|
|
33
33
|
Classifier: Intended Audience :: Science/Research
|
|
34
34
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -64,8 +64,8 @@ Instead of ticking through time at fixed intervals, DRS calculates *exactly* whe
|
|
|
64
64
|
- **Event-driven time stepping** — simulate years of operation in seconds
|
|
65
65
|
- **PyTorch-style architecture** — `Module`, `Variable`, and `Level` compose into hierarchies with automatic dependency tracking
|
|
66
66
|
- **Built-in telemetry** — every state change is logged and plotted without custom tracking code
|
|
67
|
-
- **Fail-fast guardrails** — the engine stops you from breaking the physics of your model (e.g. draining an empty
|
|
68
|
-
- **Applicable to any continuous-flow system** —
|
|
67
|
+
- **Fail-fast guardrails** — the engine stops you from breaking the physics of your model (e.g. draining an empty tank)
|
|
68
|
+
- **Applicable to any continuous-flow system** — water networks, chemical processing, electrical grids, traffic, and more
|
|
69
69
|
|
|
70
70
|
## Installation
|
|
71
71
|
|
|
@@ -84,13 +84,13 @@ pip install python-drs[progress] # Rich progress bar
|
|
|
84
84
|
```python
|
|
85
85
|
from drs import DRSEngine, Module, Level
|
|
86
86
|
|
|
87
|
-
class
|
|
87
|
+
class Tank(Module):
|
|
88
88
|
def forward(self):
|
|
89
89
|
# Fill at 50 units per time step
|
|
90
|
-
self.
|
|
90
|
+
self.volume.rate = 50.0
|
|
91
91
|
|
|
92
|
-
model =
|
|
93
|
-
model.
|
|
92
|
+
model = Tank()
|
|
93
|
+
model.volume = Level("Volume", initial_value=100.0)
|
|
94
94
|
|
|
95
95
|
engine = DRSEngine(model)
|
|
96
96
|
result = engine.run(max_time=20.0)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|