Rows marked with an asterisk (*) must be set in the MatlabUpdateState function.
* |
user_defined_errors.error_description |
string |
Enter a description for the error encountered. If there is no error, define it as "none." |
* |
user_defined_errors.severity_code |
string |
Choose one of two options if there is an error: •"COMPONENT_SIMULATION_ERROR" to send a warning back to UI. This can be used to double-check. For example if the energy exceeds or is lower than a predefined level, you can send this warning. •"COMPONENT_CRITICAL_ERROR" to stop the simulation. Use this when a custom resource you need for your custom component is missing. If you choose not to use the two codes above, you still need to set it to "none" or any other string. Not setting this string generates an error. |
* |
new_time_series_output |
Nx1 struct of double |
Set this struct with the output of the component. It should be equal to the length of the custom resource used. If the custom resource is 8760 time steps, this struct should be 8760 in length. |
To access the Custom Resource and other parameters in the Custom Component in the MATLAB function, see the table below.
custom_component(i).resource_list(i).resource_name |
string |
Name that is defined in the Custom Resource |
|
custom_component(i).resource_list(i).resource_type |
string |
The type of the Custom Resource; this is always "Matlab" |
custom_component(i).resource_list(i).resource_series |
Nx1 struct of double |
The time series data of the Custom Resource |
|
custom_component(i).name |
string |
Name of the Custom Component |
custom_component(i).is_Ac |
bool |
Whether the Custom Component is on the AC or DC bus |
|
custom_component(i).capacity |
double |
The capacity of the Custom Component in KW |
custom_component(i).number |
int |
If user has multiple MATLAB Custom Components, the Custom Components have different numbers |
|
custom_component(i).cost.capital |
double |
Capital cost of Custom Component |
custom_component(i).cost.replacement |
double |
Replacement cost of MATLAB Custom Component |
|
custom_component(i).cost.operation_and_maintenance |
double |
Operations and Maintenance of MATLAB Custom Component |
custom_component(i).operating_reserve |
double |
The operating reserve that this Custom Component requires; this is defined in the UI |
See also