application configuration
Now that we are done with an iteration of domain modeling, let’s see how we can configure a particular application for a specific set of requirements.
At the bottom of the page, we can see the complete model which combines final models from Parts I and II.
As the first step, we need to choose a jurisdiction, let’s say Canada except Quebec.
By constraints propagation, this configures
advancedOrExtendedLeft
and behind
features for
us.
Since we’re outside of Quebec, which requires
horizontal
, we still have a choice of
orientation
. Let’s choose vertical
for our
application.
Next, we learn that in Canada redAndYellowToGreen
and
allWayFlashingRedAsStop
are not used but
allWayYellow
is used. We could explicitly assert that but
since it’s a piece of knowledge we elicited during this application
engineering, let’s contribute it back and add a constraint back to our
domain model.
Now, we move on to the particular requirements of our application.
We now have to make a choice for the type of
advancedOrExtendedLeft
we want: leftArrow
.
Note that in a given jurisdiction, both options may be allowed; however,
for a single application, at most one is allowed, which is why we must
explicitly eliminate greenFlashing
.
Let’s say that the dedicated right green arrow is not needed, so we eliminate it to reduce the cost.
The last choice is the countdownTimer
, which we don’t
need.
Let’s check the allowed states of our system in our application:
|
|
We have now properly configured a single traffic light. Let’s focus on an application scenario with two traffic lights in opposite directions: two traffic lights