blockEventCounter

Event counter

Extends from MathInteger.IntegerFunction.

Information

Syntax

y = EventCounter(u = condition, tl = time_period);

Description

This blocks computes the number of event occurrences on the Boolean4 condition u over time period tl (i.e. the total number of occurrences when u becomes true over tl).


Example

This block is demonstrated with the following example:

Parameters

TypeNameDefaultDescription
Stringname (from IntegerFunction)"Model name"

Connectors

TypeNameDefaultDescription
Connectors.Boolean4Inputu (from IntegerFunction)Boolean4 condition
Connectors.IntegerOutputy (from IntegerFunction)
Connectors.TimeLocatorInputtl (from IntegerFunction)
Connectors.FunctionTypeOutputft (from IntegerFunction)Function type (monotonic increasing, monotonic decreasing, non monotonic)

Components

TypeNameDefaultDescription
CRML.Blocks.Events.Event4ToEventevent4ToEvent
ETL.TimeLocators.Attributes.PeriodStarttimePeriodStartingEvents
ETL.TimeLocators.Attributes.PeriodEndtimePeriodClosingEvents
CRML.Blocks.Events.Beforebefore1
CRML.Blocks.Events.Beforebefore2
Modelica.Blocks.Logical.Andand1
ETL.TimeLocators.Attributes.IsLeftBoundaryIncludedtimePeriodIsLeftBoundaryIncluded
ETL.TimeLocators.Attributes.IsRightBoundaryIncludedtimePeriodIsRightBoundaryIncluded
Modelica.Blocks.Logical.Notnot1
Modelica.Blocks.Logical.Notnot2
CRML.Blocks.Events.EventCountereventCounter
CRML.Blocks.Events.EventFiltereventFilter