Evaluation Functions
This section describes the evaluation functions available in SAInt. These functions are used to analyze and aggregate object properties and output results to understand the behavior of an object within a given time step or scenario time window.
The functions are listed in Section 1 with their syntax, description, and output examples. The syntax of the functions includes expr
which refers to the input expression.
The examples shown are from the results of the DCUCOPF scenario PCM_PEAK_DEMAND_WEEK.esce of the sample electric system ENET39 and from the dynamic scenario BAU_DYNAMIC.gsce of the sample gas system gNetwork1 (in "Tutorials" and folder …\Coupled\Intermediate Tutorial 1\gNetwork1
) available from the "Model Ready Datasets" category of the User Forum (https://forum.encoord.com/). Please consider the type of object used in the expression to select the correct network. Scenario results must be available for the expression to be executed correctly in the command window.
The user can easily copy and paste the code in the command window and replicate the examples.
1. Evaluation functions description
The main functions for data evaluation in SAInt are described in the following sections with examples demonstrating how to use them.
1.1. The function eval
eval('expr')
Evaluates the input expression at the display time or the specified time. Mandatory is to have only one expression.
Examples:
eval('WIND.FAIRHAVEN.P.(1)')
-
Returns the active power generated by the wind generator FAIRHAVEN at the 1st hour of the simulation (around 40.91 MW).
eval('EZN.IEEE39.PWIND.(%)')
-
Returns a list of wind power generation values in the electric zone IEEE39 during all time steps of the simulation.
eval('EZN.IEEE39.PWIND')
-
Returns the wind power generated in the electric zone IEEE39 at the display time.
eval('GCS.CS1.POWD.(%)')
-
Returns a list of driver power values for the gas compressor CS1 during all time steps of the simulation.
eval('GDEM.CITY1.Q.(5) + GDEM.CITY2.Q.(5)')
-
Returns the sum of gas flow from demand CITY1 and CITY2 at the 5th hour of the simulation.
eval('WIND.%.P.[MW] > 30')
-
Returns a list of names of all the wind generators that generated power greater than 30 MW at the display time in the map window.
eval('EZN.IEEE39.!FGEN.%.P.(%)')
-
Returns a nested list. The length of each inner list is equal to the number of fuel generators in the electric zone IEEE39, and it contains the power generated by the fuel generator at a specific time step. The number of inner lists is equal to the number of time steps in the simulation. The reference model has only one zone.
1.2. The function ecount
ecount('expr')
The function counts the number of objects for an object type given in the input expression. Mandatory is to have only one expression.
Examples:
ecount('GSUP.%')
-
Returns the number of gas supplies in the gas network.
ecount('EXT.%')
-
Returns the number of externals in the electric network.
ecount('GXT.%')
-
Returns the number of externals in the gas network.
ecount('GPI.%')
-
Returns the number of pipelines in the gas network.
ecount('ENO.NEWHAVEN2_CT.!FGEN.%')
-
Returns the number of fuel generators connected to the electric ENO.NEWHAVEN2_CT.
1.3. The function esum
esum('expr')
Calculates the sum of values evaluated by the specified input expression. Associated with the entire set of time steps.
Examples:
esum('EZN.IEEE39.PD.(%).[GW]')
-
Returns the sum of the total active power demand in the electric zone IEEE39 during all time steps of the simulation.
esum('EZN.IEEE39.!ENO.%.PD.(%)')
-
Returns a list with the sum of the total active power demand at all electric nodes in the electric zone IEEE39, at each time step of the simulation.
esum('FGEN.SIMONDS.P.(%).[GW]')
-
Returns the sum of active power generated by the fuel generator SIMONDS during all time steps of the simulation.
1.4. The function eabssum
eabssum('expr')
Calculates the sum of absolute values, evaluated by the specified input expression. Associated with the entire set of time steps.
Example:
eabssum('LI.BOSTON_MA_TO_WORCESTER_MA.P.(%).[GW]')
-
Returns the sum of the absolute values of the active power along the line BOSTON_MA_TO_WORCESTER_MA during all time steps of the simulation. This is used as an example to demonstrate how to combine positive and negative values.
1.5. The function emean
emean('expr')
Calculates the mean of values evaluated by the specified input expression. Associated with the entire set of time steps.
Examples:
emean('ENO.HARTFORD_CT.PD.(%)')
-
Returns the mean power not served at the electric node HARTFORD_CT during all time steps of the simulation.
emean('EZN.IEEE39.!ENO.%.PG.(%)')
-
Returns a list with the mean active power generated at all electric nodes in the electric zone IEEE39 at each time step of the simulation.
1.6. The function eabsmean
eabsmean('expr')
Calculates the mean of the absolute values evaluated by the specified input expression. Associated with the entire set of time steps.
Example:
eabsmean('LI.BOSTON_MA_TO_WORCESTER_MA.P.(%).[MW]')
-
Returns the mean of absolute power along the line BOSTON_MA_TO_WORCESTER_MA during all time steps of the simulation.
1.7. The function edev
edev('expr')
Calculates the sample standard deviation of the values evaluated by the specified input expression. Associated with the entire set of time steps.
Examples:
edev('ENO.HARTFORD_CT.PPV.(%)')
-
Returns the sample standard deviation of the active power generated by all solar generators connected to the electric node ENO.HARTFORD_CT during all time steps of the simulation.
edev('ENO.%.PWIND.(%)')
-
Returns a list of the sample standard deviation of the active power generated by all wind generators during all time steps of the simulation.
1.8. The function eabsdev
eabsdev('expr')
Calculates the standard deviation of the absolute values evaluated by the specified input expression. Associated with the entire set of time steps.
Example:
eabsdev('ENET.PSTR.(%)')
-
Returns the sample standard deviation of the absolute power generated or consumed by all storages in the electric network during all timesteps of the simulation. The example cannot be used in the reference model as network ENET39 does not have any storage.
1.9. The function emax
and emin
emax('expr')
and emin('expr')
Returns the maximum or minimum from values evaluated by the specified input expression. Associated with the entire set of time steps.
Examples:
emax('EDEM.%.P.(%)')
-
Returns the maximum power demand over all EDEM during all timesteps of the simulation.
emin('EDEM.%/P.(%)')
-
Returns the minimum power demand over all EDEM during all timesteps of the simulation.
emax('ENO.%.PNS.(%)')
-
Returns a list with the maximum power not served from all electric nodes during all time steps of the simulation. The length of list is equal to the number of time steps in the simulation.
1.10. The function eabsmax
and eabsmin
eabsmax('expr')
and eabsmin('expr')
Returns the maximum or minimum of the absolute values evaluated by the specified input expression. Associated with the entire set of time steps.
Examples:
eabsmax('LI.BOSTON_MA_TO_WORCESTER_MA.P.(%).[MW]')
-
Returns the maximum power along the line BOSTON_MA_TO_WORCESTER_MA disregarding the flow direction during all time steps of the simulation.
eabsmin('GZN.ZONE1.FB.(%)')
-
Returns the flow balance for the gas zone ZONE1 during all time steps of the simulation.
1.11. The function emaxat`and `eminat
emaxat('expr')
and eminat('expr')
Returns the list of objects that have the maximum or minimum value evaluated by the specified input expression. Associated with the entire set of time steps.
Examples:
emaxat('FGEN.%.TOTCOSTRATE.(%)')
-
Returns a list with the name of the fuel generators that have the maximum total cost rate during all time steps of the simulation.
eminat('FGEN.%.F.(%)')
-
Returns a list with the name of fuel generators that have the lowest fuel consumption during all timesteps of the simulation. The length of the list is equal to the number of time steps in the simulation.
1.12. The function eabsmaxat
and eabsminat
eabsmaxat('expr')
and eabsminat('expr')
Returns the list of objects that have the maximum or minimum absolute value evaluated by the specified input expression. Associated with the entire set of time steps.
Example:
eabsminat('GZN.%.FB.(%)')
-
Returns a list of the gas zones that have the absolute minimum flow balance during all time steps of the simulation. The length of the list is equal to the number of time steps in the simulation.
This example will not work with the reference tutorial gas network because there is only one zone in the system. |