Automatic simulation system powered by neural networks
Project description
Automatic simulation system powered by neural networks
Installation
pip install asim
What is asim
- Physical field modeling with automatic constraint enforcement
- Flexible data grouping and normalization
- Built-in support for recurrent architectures
- Export/import of trained models
Using asim
import pandas as pd
from asim.dataset import TimeSeriesDataModel, Ts, Fi, Fo
from asim.model import PhysicalFieldModel
from asim.trainer import Trainer
df = pd.read_csv("demo.csv")
cols = [
Ts(label="ts"),
Fi(group="boiler", label="power1", min=0.0, union="a"),
Fi(group="boiler", label="power2", min=0.0, union="a"),
Fo(group="boiler", label="temperature", rnn=True),
]
dm = TimeSeriesDataModel(df, columns=cols, batch_size=64)
fm = PhysicalFieldModel(dm, lr=0.003)
trainer = Trainer(max_epochs=100, enable_progress_bar=False, enable_checkpointing=False, logger=None)
trainer.fit(fm.model, datamodule=dm.datamodule)
fm.export("demo.pkl")
from asim.simulator import PhysicalSimulator
import matplotlib.pyplot as plt
simulator = PhysicalSimulator("demo.pkl", x_names=dm.x_names, y_names=dm.y_names)
x, y, y_ = simulator.predict(dm.df[100:1000], y0=[100])
plt.plot(y)
plt.plot(y_)
plt.show()
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
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 asim-25.9.7-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: asim-25.9.7-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 139.0 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
817466b8e2c3facfd47dae3a118d0c49867709dab0ff653dcd57d60b2fb253e2
|
|
| MD5 |
3a0ab5172bc8836efc27a98c8c6872d6
|
|
| BLAKE2b-256 |
d32e37715753f80f3b85991ee9a98e439536f10c392210b132143195187aceaa
|
File details
Details for the file asim-25.9.7-cp312-cp312-manylinux2014_x86_64.whl.
File metadata
- Download URL: asim-25.9.7-cp312-cp312-manylinux2014_x86_64.whl
- Upload date:
- Size: 924.7 kB
- Tags: CPython 3.12
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e75c76ff29d7728030f341221b6e160a412c341a04b8a5aebd0106869841d87e
|
|
| MD5 |
089fcfaaa5f6e9e7edeb0d9914207dee
|
|
| BLAKE2b-256 |
18f7bf8260edd7602db713a20472bf0989c1f3f7725b1df71ddf04a0e7b8129b
|