Skip to main content

Parameter Space Exploration and CMA-ES Optimisation

Extension of optimflow.

Install

pip install optimflow-lifex

Run parameters exploration

out_path = Path(__file__).parent / "out"

class CMAESParams(OptimParams):
    Ko = param.Number(0.5, bounds=(0, 2), doc="")
    Cao = param.Number(10, bounds=(5, 25), doc="")

simulation_params = LifexParams()
optim_params = CMAESParams()

def lifex_worker(dname: str):
    params = LifexParams.load_from(dname)
    Ko = params.lifex_param_set.get("/Ionic model/TTP06/Physical constants/Ko")
    t = np.linspace(0, 1, 100)
    res = Ko * np.sin(2 * np.pi * t)
    np.savetxt(params.out_dir / "result.txt", res)

explo = LifexParameterSpaceExploration(out_path)
explo.dump_params(simulation_params, optim_params)
explo.run(lifex_worker)
explo.gather_results()
explo.plot_results()

Metadata

Release files for optimflow-lifex 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for optimflow-lifex 0.0.2
File Size Uploaded
optimflow_lifex-0.0.2.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for optimflow-lifex 0.0.2
File Interpreter ABI Platform
optimflow_lifex-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.9 kB

Release files / optimflow_lifex-0.0.2.tar.gz

Download URL optimflow_lifex-0.0.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a64491c3f7c2c9dc353d115460870f0fce2003229421927815e208e05e87b87b
BLAKE2b-256 checksum
How to use checksums
1fa5bece75b10f9d6d12ed594b62d9a684f2e8a681cd2f336d7a73e165c2354c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / optimflow_lifex-0.0.2-py3-none-any.whl

Download URL optimflow_lifex-0.0.2-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31e1e702b2734778c8c1afef806ee6c4256e6531a61cb5ecdc3b3387e7895a53
BLAKE2b-256 checksum
How to use checksums
63160a4bedc0dcee77d2acf613330472f08f3202534e12a871019542a3402bab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page