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 based on the dynamic scenarios of the sample electricity (ENET09_13) and gas (GNET29_18) networks available in the user’s Projects folder (C:\...\Documents\encoord\SAInt-v3\Projects). 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. Note that the sample electricity (ENET09_13) model uses a stochastic profile for the hydro reservoir. This is why the user may get different results from the ones presented here or each time the same command is used in the active session of SAInt.

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('HGEN.HYDROTURBINE.P.(1)')

Returns the active power generated by the hydro generator HYDROTURBINE at the 1st hour of the simulation (around 30.37 MW).

eval('EZN.RURAL.PWIND.(%)')

Returns a list of wind power generation values in the electric zone RURAL during all time steps of the simulation.

eval('EZN.RURAL.PWIND')

Returns the wind power generated in the electric zone RURAL at the display time.

eval('GCS.CS_1.POWD.(%)')

Returns a list of driver power values for the gas compressor CS_1 during all time steps of the simulation.

eval('GSTR.UGS.Q.(5) + LNG.LNG.Q.(5)')

Returns the sum of gas flow from the underground gas storage UGS and LNG terminal LNG 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 of the map window.

eval('EZN.INDUSTRIAL.!FGEN.%.P.(%)')

Returns a nested list. The length of each inner list is equal to the number of fuel generators in the electric zone INDUSTRIAL, 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.

eval('GSTR.UGS.INV.(%)')

Returns a list of values of gas inventory for the gas storage UGS during all time steps of the simulation.

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 a gas network (i.e., 3).

ecount('EXT.%')

Returns the number of externals in an electric network(i.e., 13).

ecount('GXT.%')

Returns the number of externals in a gas network (i.e., 18).

ecount('GCS.%')

Returns the number of compressors in a gas network (i.e., 2).

ecount('ENO.Node3.!FGEN.%')

Returns the number of fuel generators connected to electric Node3 (i.e., 3).

1.3. The function esum

esum('expr')

Calculates the sum of values evaluated by the specified input expression. Generally associated with special parameters indicating a time window or the entire set of time steps.

Examples:

esum('EZN.RURAL.PG.(%)')

Returns the sum of active power generated at the electric zone RURAL during all time steps of the simulation (i.e., approximately 12534.42 MW).

esum('EZN.RURAL.!ENO.%.PG.(%)')

Returns a list with the sum of active power generated at all electric nodes in the electric zone RURAL, at each time step of the simulation.

esum('ENO.Node1.PNS.(%)')

Returns the sum of power not served at the electric node NODE1 during all time steps of the simulation (i.e., 0 MW).

esum('FGEN.PEAKERTURBINE.P.(%)')

Returns the sum of active power generated by the fuel generator PEAKERTURBINE during all time steps of the simulation (i.e., 4024.80 MW).

1.4. The function eabssum

eabssum('expr')

Calculates the sum of absolute values, evaluated by the specified input expression. Generally associated with special parameters indicating a time window or the entire set of time steps.

Example:

eabssum('ESTR.BATTERY.P.(%)')

Returns the sum of the absolute values of the power generated or consumed by the electric storage BATTERY during all time steps of the simulation (approximately 68.16 MW).

1.5. The function emean

emean('expr')

Calculates the mean of values evaluated by the specified input expression. Generally associated with special parameters indicating a time window or the entire set of time steps.

Examples:

emean('ENO.Node1.PNS.(%)')

Returns the mean power not served at the electric node Node3 during all time steps of the simulation (i.e., 0 MW).

emean('EZN.URBAN.!ENO.%.PG.(%)')

Returns a list with the mean active power generated at all electric nodes in the electric zone URBAN 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. Generally associated with special parameters indicating a time window or the entire set of time steps.

Example:

eabsmean('ESTR.BATTERY.P.(%)')

Returns the mean of absolute power generated or consumed by the electric storage BATTERY during all time steps of the simulation (i.e., approximately 0.56 MW).

1.7. The function edev

edev('expr')

Calculates the sample standard deviation of the values evaluated by the specified input expression. Generally associated with special parameters indicating a time window or the entire set of time steps.

Examples:

edev('ENO.Node9.PPV.(%)')

Returns the sample standard deviation of the active power generated by all solar generators connected to the electric node Node9 during all time steps of the simulation (i.e., approximately 13.31 MW).

edev('ENO.%.PWIND.(%)')

Returns 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. Generally associated with special parameters indicating a time window or 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 (i.e., approximately 3.08 MW).

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. Generally associated with special parameters indicating a time window or the entire set of time steps.

Examples:

emax('EDEM.RESD.PNS.(%)')

Returns the maximum power not served for the electric demand RESD during all timesteps of the simulation (i.e., 0 MW).

emin('ENET.PNSDEM.(%)')

Returns the minimum power not served by the electric network during all timesteps of the simulation (i.e., 0 MW).

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. Generally associated with special parameters indicating a time window or the entire set of time steps.

Examples:

eabsmax('ESTR.BATTERY.P.(%)')

Returns the maximum power generated or consumed by the electric storage BATTERY during all time steps of the simulation (i.e., approximately 23.78 MW).

eabsmin('GZN.ZONE_2.FB.(%)')

Turn on the property ExtractFuel for compressor CS_1` and run the dynamic simulation. Use the example on the new results. Returns the absolute minimum flow balance at the gas zone ZONE_2 during all time steps of the simulation (i.e., approximately 0.05 ksm3).

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. Generally associated with special parameters indicating a time window or 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. Generally associated with special parameters indicating a time window or 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.