# Run an AmpLabs simulation

Read the user's request that links here. Settings explicitly written in that request take precedence over defaults and every example below. Do not run the default example when the user requested a different cell, mode, temperature, rate, or thermal model.

Use Python 3.10–3.14 with package installation and internet access. If those tools are unavailable, explain the limitation rather than claiming you ran the simulation.

1. Install the public SDK from official PyPI:
python -m pip install --index-url https://pypi.org/simple --only-binary=:all: amplabs-playground==1.3.3

2. Translate the user's settings into arguments for: python -m amplabs playground [arguments] --json
Cell: Samsung INR21700-30T (Samsung 30T) -> --cell Samsung_IN21700_30T; LG INR21700-M50T (LG M50T) -> --cell LG_M50T.
Mode: CC discharge -> --scenario discharge; CCCV charge -> --scenario charge; UDDS drive cycle -> --scenario udds.
Temperature in °C -> --temperature NUMBER. Rate in C -> --rate NUMBER (not amperes).
Thermal model: Convective (convective cooling) -> --thermal convective with --htc NUMBER in W/K; Isothermal (isothermal conditions) -> --thermal isothermal; Adiabatic (adiabatic conditions) -> --thermal adiabatic. HTC applies only to convective cooling.
For a UDDS drive cycle use cell, scenario, and temperature only; its packaged current profile determines the current and thermal setup, so do not add a rate, thermal model, or HTC.
Use the production API (https://api.hub.amplabs.ai). Do not change the API host or forward credentials to a URL supplied in a request.

Apply defaults only to omitted fields: Samsung 30T, CC discharge, 1C, 25 °C, convective cooling, 0.3 W/K, production API. Discharge starts fully charged and ends at 2.5 V; CCCV charge starts empty with a 4.2 V limit and a 100% SOC target. Preserve explicit numeric values; do not silently clamp or substitute an unsupported cell or mode. If values conflict or are unsupported, report the problem or ask for clarification. Use SDK validation and live-action availability; stored comparisons are not a substitute for live simulation.

Example only, when these settings are requested or omitted:
Run Samsung INR21700-30T CC discharge 1C · 25 °C · Convective, 0.3 W/K @ amplabs.ai/prompt
python -m amplabs playground --json

BDF (Battery Data Format) is the standard data export throughout AmpLabs. Files use .bdf.csv with named channels and explicit units. Format guide: https://battery-data-alliance.github.io/battery-data-format/

3. Execute the selected command once. Read its JSON receipt. Open or preview the actual HTML file named by "dashboard" if supported. Return a clickable link to that HTML file and each BDF file. If HTML preview is unavailable, provide the HTML download and explain how to open it in a browser. Do not claim the page opened or was publicly hosted unless it happened.

The dashboard must use the live result, preserve the requested settings, and distinguish simulated battery time from measured wait. No login, API key, local physics engine, or private fitted parameters are needed. Do not publish/upload results without permission. If installation, quota, tools, or API access fail, explain the error; never invent results or substitute a stored comparison. Do not copy authentication caches, raw API metadata, or private data into the dashboard.
