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 |
pick one of the two option if there is an error: "COMPONENT_SIMULATION_ERROR" to send a warning back to UI. This can be used for santiy checks, example if the energy exceeds or is lower than a pre-defined level, then you could send back this warning. "COMPONENT_CRITICAL_ERROR" to stop the simulation. Use this when a custom resource you need for your custom component is missing. You could choose to not use the above two codes, but you still need to set it to "none" or any other string. Not setting this string will throw 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 timesteps, then this struct should be 8760 in length. |
To access the custom resource and other parameters in custom component in the MATLAB function, see 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 |
Is the custom component on the AC or DC |
|
custom_component(i).capacity |
double |
The capacity of the custom component in KW |
|
custom_component(i).number |
int |
If user has multiple Matlab Custom Component, the custom component get different number |
|
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 Maintainance 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