Print_BMJN_Info
Print BMJN information for Breathe Model JSON files.
This function displays comprehensive parameter information from BMJN_<bmjn>.json files stored in the Breathe Model parameters directory. The function reads metadata and design information from multiple parameter files and presents them in a formatted table for easy review and comparison of different battery model configurations.
Syntax
Print_BMJN_Info()
Print_BMJN_Info('pathToBMParameters', pathToBMParameters)
Print_BMJN_Info('bmjn', bmjn)
Print_BMJN_Info('pathToBMParameters', pathToBMParameters, 'bmjn', bmjn)
Optional Name-Value Arguments
| Name | Type | Default | Description |
|---|---|---|---|
pathToBMParameters |
string |
"BM_Parameters" | Path to the Breathe Model parameters directory |
bmjn |
double |
[] (empty) |
Array of Breathe Model JSON Numbers to display information for. If empty, displays information for all available parameter files in the specified directory |
Output
Displays a table containing the following information for each BMJN file:
| Field | Type | Description |
|---|---|---|
bmjn |
double |
Breathe Model JSON Number |
| Metadata fields | varies |
Additional metadata fields from the JSON files |
design |
string |
Design parameters and specifications (formatted as string) |
baseBattery |
string |
Base battery type/model used |
outputTag |
string |
Output tag identifier |
breatheDesignVersion |
string |
Version of breathe_design used to create parameters |
Error Handling
- If parameter directory is not found, displays error message
- If individual JSON files cannot be read or parsed, displays warning
- Missing files are reported in a separate table with warning message
Examples
Basic Usage
% Display information for all available parameter files in the default BM_Parameters folder
Print_BMJN_Info();
Display Specific BMJN Files
% Display information for specific BMJN files in the BM_Parameters folder
Print_BMJN_Info('bmjn', [1000, 1001, 1002]);
Use Custom Parameter Directory
% Use a custom parameter directory
Print_BMJN_Info('pathToBMParameters', 'Path_To_Parameters', 'bmjn', 1000);
Display All Files from Custom Directory
% Display all files from a custom directory
Print_BMJN_Info('pathToBMParameters', 'Path_To_Parameters');
Compare Multiple Battery Configurations
% Compare different battery configurations
Print_BMJN_Info('bmjn', [1000, 1001, 1002, 1003]);
% The output will show a table with columns:
% - bmjn: The BMJN number
% - Metadata fields from the JSON files
% - design: Design parameters and specifications
% - baseBattery: Base battery type
% - outputTag: Output identifier
% - breatheDesignVersion: Version used to create the parameters
Handle Missing Files
% When some BMJN files are missing, the function will:
% 1. Display the main table with available files
% 2. Show a warning message
% 3. Display a separate table with missing files
Print_BMJN_Info('bmjn', [1000, 1001, 9999]); % 9999 might not exist
Notes
- The function automatically finds all BMJN_*.json files in the specified directory if no specific BMJN numbers are provided
- BMJN files are sorted numerically for consistent output
- The function handles missing or corrupted JSON files
- Design information is formatted as a comma-separated string for easy reading