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
| Type | Name | Default | Description |
|---|---|---|---|
| String | name (from IntegerFunction) | "Model name" |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Connectors.Boolean4Input | u (from IntegerFunction) | Boolean4 condition | |
| Connectors.IntegerOutput | y (from IntegerFunction) | ||
| Connectors.TimeLocatorInput | tl (from IntegerFunction) | ||
| Connectors.FunctionTypeOutput | ft (from IntegerFunction) | Function type (monotonic increasing, monotonic decreasing, non monotonic) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| CRML.Blocks.Events.Event4ToEvent | event4ToEvent | ||
| ETL.TimeLocators.Attributes.PeriodStart | timePeriodStartingEvents | ||
| ETL.TimeLocators.Attributes.PeriodEnd | timePeriodClosingEvents | ||
| CRML.Blocks.Events.Before | before1 | ||
| CRML.Blocks.Events.Before | before2 | ||
| Modelica.Blocks.Logical.And | and1 | ||
| ETL.TimeLocators.Attributes.IsLeftBoundaryIncluded | timePeriodIsLeftBoundaryIncluded | ||
| ETL.TimeLocators.Attributes.IsRightBoundaryIncluded | timePeriodIsRightBoundaryIncluded | ||
| Modelica.Blocks.Logical.Not | not1 | ||
| Modelica.Blocks.Logical.Not | not2 | ||
| CRML.Blocks.Events.EventCounter | eventCounter | ||
| CRML.Blocks.Events.EventFilter | eventFilter |