block TransitionWithSignal "Transition where the fire condition is set by a Boolean input signal"
Modelica.Blocks.Interfaces.BooleanInput condition annotation (Placement(transformation(
origin = {0, -120},
extent = {
{-20, -20},
{20, 20}},
rotation = 90)));
extends Interfaces.PartialTransition(final localCondition = condition);
annotation (
Icon(
coordinateSystem(
preserveAspectRatio = true,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Text(
extent = {
{20, 20},
{200, 45}},
lineColor = DynamicSelect({0, 0, 0}, if enableTimer then {255, 255, 255} else {0, 0, 0}),
textString = "%waitTime"),
Rectangle(
extent = {
{-10, 100},
{10, -100}},
fillColor = DynamicSelect({0, 0, 0}, if enableFire then {0, 255, 0} else {0, 0, 0}),
fillPattern = FillPattern.Solid),
Line(points = {
{-30, 0},
{-10, 0}}),
Text(
extent = {
{200, 110},
{-200, 150}},
textString = "%name",
lineColor = {0, 0, 255}),
Ellipse(
extent = {
{7, -81},
{-7, -95}},
lineColor = DynamicSelect({0, 0, 0}, if condition then {0, 255, 0} else {0, 0, 0}),
fillColor = DynamicSelect({0, 0, 0}, if condition then {0, 255, 0} else {0, 0, 0}),
fillPattern = FillPattern.Solid)}),
Diagram(
coordinateSystem(
preserveAspectRatio = true,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Line(points = {
{-31, 0},
{-11, 0}}),
Rectangle(
extent = {
{-10, 100},
{10, -100}},
fillPattern = FillPattern.Solid)}));
end TransitionWithSignal;