. Write an atomic model for the “Bridge Segment”
• Besides the “Bridge Segment” atomic model, also write two “car generator” atomic models (one to
generate cars coming from the west, and the other to generate cars coming from the east), and then
couple the three models together to test your “Bridge Segment” model.
• Finally, couple the car generators and the three “Bridge Segments” as shown below to form a traffic
system. (assume the road segments between two bridge segments have zero travel time and infinite
Describe the design of your “Bridge Segment” model. This should cover the basic logic of your
deltext(), deltint(), deltcon(), and out() functions. Your description can be an informal English
description of the model design, or a state diagram (similar to those in the DEVS class slides) with
1. Model the traffic light and bridge segment together.
2. Model the traffic light separately. In this case, each bridge segment is a coupled model with a bridgeSegment and a traffic light. If you like, you may program your logic in a stepwise fashion (your final code should finish step2):
1. Step 1: As long as the traffic light is green, a vehicle can move ahead. If the traffic light changes to red when a car is still on the bridge, the cars on the other direction should wait until this car finishes.
2. Step 2: A vehicle can go through the green traffic light only when at least 10 seconds is left before the traffic light changes to red.