wiki:ProdSimStartup

Version 31 (modified by jdalbey, 4 years ago) (diff)

--

HOWTO Production System Startup

Aug 20, 2019

The production system is the designated Windows PC in the corner of the operations room.

Login to Windows on Production workstation.

Starting the simulation

Reset the log files, if necessary. (See below).

(New for 2022) Add the student names to a file named student_names.txt in the config folder. Put one name per line. These names will appear in a dropdown box in the CAD Client login dialog.   There is also a student_names.txt file for LCS on the Apache server in /web/lcs/student_names.txt.  I think Neil's Activity Log has a third student names file, ask him for details.

Open File Explorer to C:\TMC Simulator Sep 2019\bin folder.

Decide which script you want to run ("full" or "practice"). Double-click on the correspondingly named systemstart .bat file.

The CAD server GUI should appear displaying time 0:00:00.

The Simulation Manager GUI should appear.

A Web Browser should appear with three tabs.

Optionally, start any CADClients, ideally on a different workstation.

Click "Start" button in Simulation Manager GUI. Observe the clock begin counting every second. In CADServer GUI, observe the timer running. Click on the "Traffic" tab to view the queue of traffic events. As events are processed, there will be a ten second delay and then the affected dots will change color in the CPTMS map (see below).

Monitor simulation progress. The event queue should be processed according to the simulation time.

Start Web Apps

Use Putty to start a Secure Shell to web server at 192.168.251.46.

From the /web folder run: python webapps/unifiedlogger.zip

Observe console message: Unified Logging Service v? starting from /web

CPTMS: A google map should appear with green dots. The dot colors should be changed as specified in the traffic event data.

EInotebook: The four tabs of the Electronic Instructor Notebook should appear, with the clock displaying the simulation time. The Incident Summary should show the incidents in the desired script.

Unified Log Monitor: A display of any active CMS messages should appear on a dark blue background. Confirm correct functioning by entering a CMS message in CPTMS and entering a CAD comment in the CAD Client. They should appear with the correct simulation time stamp.


Optionally, on the PC in the corner, open the CMS monitor in a web browser: " webapps.tmcsim/cmsmonitor"

Start Lane Control System

The Lane Control System (LCS) is a simulation that runs completely independent of the Simulation Manager. It runs as a Web2py application on the Apache Web Server. It's installed in the folder /web/lcs.

Assuming Apache is running and web2py is running, simply open a browser window to lcsdemo.tmcacad.com.

Post Session

After the session, run postsession_logmerge.bat in the bin directory which will merge multiple log files together and display the final result in a web browser. It will have the unified log results, along with CAD Details from Incident Script, LCS log, and Evaluator Ratings from EInotebook (whew!).


Reset log files

After the "practice" session and before the "full" session the log files need to be archived and reset. (Insert archiving directions here).

On Apache server (W:)

  • clear activitylog/data.json
  • clear activitylog/data_summary.json
  • clear webapps/dynamicdata/CADcomments.log
  • clear webapps/dynamicdata/unifiedlog.csv
  • in webapps/dynamicdata Copy cms_messages_empty.json to cms_messages.json
  • in webapps/dynamicdata Copy har_messages_empty.json to har_messages.json

Notes for Apache configuration

  • Verify file path for writing messages in saveCMSmessage.py and saveHARmessage.py: Will need "../" at start of "dynamicdata...".
  • Verify Apache can run python
  • Verify Apache is configured properly for running cgi's from cgi-bin.

Troubleshooting Tips

If CMS messages aren't saving:

  • make sure path is correct as described above.
  • make sure webserver is started in correct directory.
  • refresh the cmsmonitor web page in the browser.

System Test

There is also a systemtest.bat file to verify all subsystems are integrating properly. This script runs a short simulation (2 min) with music instead of CHP audio. The first audio at :05 is acoustic guitar, the second audio at :30 is vocal and cello, the third audio at 1:20 is saxophone. There are two incidents, #101 Ice Cream and #102 Kangaroo. (See scripts\system_test_script.xml for detailed behavior).

Don't forget to reset log files after running the system test.

Add Ad hoc Incident

In Simulation Manager, click "Add Incident" button.

In the File chooser that appears select "adhoc_incidents.xml" and click "Open".

The "Add New Incidents" dialog appears.

Select an incident by checking in "Add?" column.

Set desired start time in "Schedule Time" column. Click 'OK".

Observe "Ad Hoc Incident .." appear in Incident Management panel.

In CAD client, the incident ID appears in Assigned Incidents panel after desired start time has elapsed.

Config Files

Differences between config files on development and production systems.

cad_server.properties and cad_server_practice.properties

dev: ElapsedTimeFile and CADcommentsLog use forward slashes in the path

prod: uses two back slashes in the path.

The python server uses port 8080 on dev and 80 on production.

Classroom Display Equipment

This section under construction. How to power on the display wall, etc.

The large front multi-display in classroom is controlled by a black box in the server rack that sits on top of the old HP ATMS server box. The blue power LED should be glowing if its on. If not, grab the inset handle on the right hand grill panel and pull open (it swings out to the right). Press the red button labeled "RESET".

There's a remote control to power on the monitors....