Overview of the Traffic Lights simulation
The Traffic Lights model models the processing for sequencing the Red, Amber and Green lights of a Traffic Lights system. The Traffic Lights system has a Wait button which allows pedestrians to cross the road. After pressing the Wait button, the Wait sign is on until the Red light is on. After the Red light is on, the Wait sign is off and the Amber light flashes 4 times.
The behavior of the Traffic Lights has been modeled through the State Diagrams in the Traffic Lights model. This simulation allows you test the behavior of the state machines that have been generated from those State Diagrams. The simulation allows you to simulate the Traffic Lights sequence, and simulate the interaction of the Wait button. The Traffic Lights' user interface has been simulated using Microsoft VisualBasic.
To find out more about the state machine being simulated, view the State Diagrams in Modeler.
* 
The Operations in the Traffic Lights Model contain C++ code. If you installed Modeler to the default locations, the generated files reside in the following folder: C:\ProgramData\PTC Integrity Modeler\Example\Traffic Lights
The provided Traffic Lights application (WinApp.exe) is built using the Cpp Win32 Animation ACS Code Generator DLL. If you want to generate the application using a production Code Generator DLL, you must not generate any Classes as stubs, and you must comment out the body code of the Main function.
Before generating and building the C++ Code application, ensure that you have built the dependent libraries. See Overview of generating C++ code for system simulation.
Was this helpful?