CRML reference engine (simulation/runtime)
Project description
crml-engine
Reference runtime/simulation engine for CRML.
Depends on crml-lang for the CRML models and validation.
Install
pip install crml-engine
CLI
Validate a scenario/portfolio document:
crml-lang validate examples/scenarios/data-breach-simple.yaml
crml-lang validate examples/portfolios/portfolio.yaml
Run a simulation:
crml simulate examples/scenarios/data-breach-simple.yaml --runs 10000
crml simulate examples/portfolios/portfolio.yaml --runs 10000
crml simulate examples/portfolio_bundles/portfolio-bundle-documented.yaml --runs 10000
Notes:
- The
crml simulatecommand auto-detects scenario vs portfolio vs portfolio-bundle inputs. - Portfolio simulation uses
crml_lang.plan_portfolioand applies portfolio semantics.
Python
from crml_engine.runtime import run_simulation
result = run_simulation("examples/scenarios/data-breach-simple.yaml", n_runs=10000)
print(result.metrics.eal)
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
crml_engine-1.2.0.tar.gz
(41.8 kB
view details)
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 crml_engine-1.2.0.tar.gz.
File metadata
- Download URL: crml_engine-1.2.0.tar.gz
- Upload date:
- Size: 41.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbd45336b99dcb8245f85c9a0d10007eb1d9da40d6ba7dc1f9918ce8649dd422
|
|
| MD5 |
e0fd3e793e6454976199730eb26f053d
|
|
| BLAKE2b-256 |
32cf99b9e878b0bbdd36094907009252d499eec03c218ab7ee8df4cbbf943a91
|
File details
Details for the file crml_engine-1.2.0-py3-none-any.whl.
File metadata
- Download URL: crml_engine-1.2.0-py3-none-any.whl
- Upload date:
- Size: 47.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14b2090fc111a73166b7ca08889b861d151c7c38dc2c49074c1554467edf49b6
|
|
| MD5 |
35e81e5b6fdabb21b9747f370d5fbf38
|
|
| BLAKE2b-256 |
d92f806e46ffdec1c3ab2489de4e396bec74f3ce750d49e96dba06c1d6a6ae7f
|