Documentation Index
Fetch the complete documentation index at: https://docs.ionworks.com/llms.txt
Use this file to discover all available pages before exploring further.
Optimization Templates
Optimization templates provide pre-configured starting points for common optimization scenarios. Each template defines default parameters, objectives, experiments, and constraints that you can customize for your specific needs.Template types
Ionworks Studio has two types of optimization templates:- System templates — Built-in templates (Design, Charge) provided by Ionworks. These are read-only and available in every project.
- Project templates — Templates you create within a specific project. These are only visible to members of that project and can be fully edited or deleted.
Available system templates
Design Template
The Design template is optimized for cell design optimization, where you want to find optimal geometric and material parameters for your battery cell. Default Configuration:- Objectives: Maximize capacity or energy density
- Parameters: Electrode thicknesses, porosities, particle sizes
- Constraints: Manufacturing limits, safety requirements
- Optimizing electrode thickness ratios for a target application
- Balancing energy density vs. power capability
- Finding optimal particle sizes for rate capability
Charge Template
The Charge template is designed for charging protocol optimization, where you want to find optimal current profiles to minimize charge time while respecting safety constraints. Default Configuration:- Objectives: Minimize total charge time (uses the
Lastmetric onTime [s]to capture the final simulation time) - Parameters: Two charging currents (
I_charge_0,I_charge_1) bounded between 0.1–10 A - Experiment: Two CC steps followed by a CV hold to 4.20 V (
C-rate < 0.05), starting from 0% SOC - Constraints: Minimum negative-electrode surface potential difference at the separator interface > 0 V (to avoid lithium plating)
- Multi-step constant current (MSCC) charging optimization
- Fast charging protocol design
- Balancing charge speed vs. battery health
The Charge template was simplified from six CC steps to two CC + CV. If you
need finer-grained control (more CC stages, different cut-off voltages), copy
the template into your project and add steps to the experiment as
described below.
Template Structure
Each optimization template consists of:Parameters Section
Defines which model parameters will be optimized:- bounds: [min, max] range for the parameter
- initial_value: Starting point for optimization
For charging currents, PyBaMM uses negative values for charging (positive
= discharging). So a charge current of -2.0 A means charging at 2.0 A.
Objectives Section
Defines the experiments to run and what to optimize:Experiment Definition
Experiments are defined using UCP format. Templates useInput["parameter_name"] syntax to reference optimizable parameters:
Custom Variables
Templates can define custom variables - derived quantities computed from simulation outputs using PyBaMM expressions. These are useful when you want to optimize based on quantities that aren’t directly available as model outputs.Creating Custom Variables
Custom variables are defined per-objective with:- Name: A descriptive name for the variable
- Expression: A PyBaMM expression string
Metric Types
Templates use various metric types to extract values from simulation results:Aggregation Metrics
These compute a single value from a time series:| Type | Description |
|---|---|
| Maximum | Highest value during simulation |
| Minimum | Lowest value during simulation |
| Mean | Time-averaged value |
| Sum | Accumulated total |
| Last | Final value of the variable (e.g., final Time [s] for total experiment duration) |
| PointBased | For values that don’t change (e.g., cell properties) |
Crossing Metrics
These evaluate the variable at a specific point:| Type | Value Field | Description |
|---|---|---|
| Time | Seconds | Value at specified time (-1 for end) |
| SOC | 0-1 | Value when reaching specified SOC |
| Voltage | Volts | Value when reaching specified voltage |
Iterative metrics (per-cycle and per-step)
Use iterative metrics when you need to evaluate a goal or constraint on a specific subset of cycles or steps inside a multi-cycle experiment, rather than over the whole simulation. They wrap any aggregation or crossing metric and tell the optimizer to apply it to the chosen indices only. There are two wrapper types:| Wrapper | Apply the inner metric to… | Configuration |
|---|---|---|
Per Cycle (CyclewiseMetric) | Selected cycle indices, optionally restricted to one step within each cycle | cycles (list of cycle indices) and optional step (single step index) |
Per Step (StepwiseMetric) | Selected absolute step indices in the flattened experiment | steps (list of step indices) |
- Per Cycle exposes a Step field (step index within each cycle) and a Cycles field that takes a comma-separated list of cycle indices, e.g.
0, 2, 4. - Per Step exposes a Steps field that takes a comma-separated list of absolute step indices, e.g.
0, 1, 2.
Customizing templates
When you select a template, all values are pre-filled but fully editable:- Modify Parameters - Add/remove parameters, adjust bounds
- Edit Objectives - Change the experiment protocol, add/remove goals
- Adjust Constraints - Modify constraint thresholds and penalties
- Add Custom Variables - Create derived quantities for your specific needs
- Configure Algorithm - Set multistarts and max iterations
Templates provide a starting point — you’re encouraged to customize them for
your specific cell chemistry, form factor, and optimization goals.
Copying templates between projects
You can copy any template — including system templates — into another project in your organization. This is useful when you want to reuse a template configuration across multiple projects or create a project-specific version of a system template that you can then customize. To copy a template:- Open the optimization templates list in your project
- Click the three-dot menu on the template you want to copy
- Select Copy to project
- Choose the target project from the dialog
- Click Copy
Template names must be unique within a project. If the target project already
has a template with the same name, the copy will fail. Rename the conflicting
template in the target project first to free up the name, then retry the copy.
Template permissions
Template permissions are managed at the project level:| Action | Required project role |
|---|---|
| View templates | Viewer, Contributor, or Admin |
| Create templates | Contributor or Admin |
| Edit templates | Contributor or Admin |
| Delete templates | Admin |
System templates are read-only for all users. To modify a system template,
copy it to your project first — the copy becomes a fully editable project
template.
Next steps
- Follow the Running an Optimization guide for step-by-step instructions
- Review Simulation documentation to understand the underlying simulation process