= How to deploy and run Simulator (dev/test environment) = == Deploy Simulator == On a development machine checkout the TMC Simulator trunk from the SVN repo. (This is the project checkout [https://tinyurl.com/y4579yw7 command].) (On the DEV/TEST workstation the project may already be checked out in `C:\Users\PC\Documents\repo)`. Open the project in !NetBeans. [[BR]]Run Subversion Update, if necessary.[[BR]]Clean and Build.[[BR]]Run Test Project and confirm any failed tests aren't system problems.[[BR]]Run the build target: package-jars (Go to the Files tab, expand TMCSim folder, right-click on build.xml, choose Run Target > package-jars). This will construct several jar files in the deploy directory, each filename contains the revision number. {{{ 09/07/2022 12:36 PM 1,723,451 CADclient_r651.jar 09/07/2022 12:36 PM 1,720,489 CADDataTableTest_r651.jar 09/07/2022 12:36 PM 3,110,868 CADserver_r651.jar 09/07/2022 12:36 PM 1,720,483 ClockClient_r651.jar 09/07/2022 12:36 PM 1,228,214 ShowUserDir.jar 09/07/2022 12:36 PM 1,798,239 SimManager_r651.jar 09/07/2022 12:36 PM 1,363,074 TrafficEventsAnimator.jar 09/07/2022 12:36 PM 9,034 unifiedlogger.zip }}} (Alternately, without !NetBeans, run Ant from the command line in the folder: `trunk/IDE_metadata/NetBeans/TMCSim`) While connected to the TMC lab LAN (TMC Simulator 5G) open a network connection to STORAGE. (Note: it accepts anonymous connection without password. If this fails, as a workaround just transfer the files using !SneakerNet - a USB Flash Drive.) Copy `trunk/deploy` folder to STORAGE. If needed, copy any changed config files, images, or data files. Login to Windows on Development workstation. Open File Explorer to STORAGE. Copy (replace) `deploy` folder to `C:\TMC Simulator 2019` folder. Use File Explorer to open `bin` folder. Double-click on `renamejars.bat`. == Deploy web applications == Copy the `webapps `folder from repository trunk to Dev machine folder `C:\TMC Simulator 2019`. If necessary, copy `unifiedlogger.zip` from deploy folder to `webapps `folder. (This may have been done in the previous step, or prior to deployment). Make sure Python 2.7 is installed. == Starting the simulation == Decide which script you want to run ("full" or "practice"). Double-click on the correspondingly named `systemstart` .bat file (in the folder `C:\TMC Simulator 2019\bin`). Observe a terminal window open and display webserver status messages. The server GUI should appear displaying time 0:00:00. The Simulation Manager GUI should appear. A terminal window should appear with console message: `Unified Logging Service v? starting from ``C:\TMC Simulator 2019` A Web Browser should appear with three tabs. The CADClient login dialog should appear. Click "login" and observe the CADClient windows appear. 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. The dot colors should be changed as specified in the traffic event data. CPTMS: A google map should appear with green dots. 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, open the CMS/HAR monitor in a web browser on the display in the corner: "`http://``192.168.251.127/cms_monitor.html`" === Troubleshooting === The startup batch file provides a five second delay after starting the server before launching the Sim Manager, which should be adequate, but if the server is slow starting for some reason, the Sim Mgr terminal window will show a console error to the effect that the server wasn't found. If that happens, just close everything and run the batch file again. ---- === Deploy to Production System === Copy the `TMC Simulator 20xx` folder to the C: drive on the production system. Then adjust some config files, directions needed here. Copy web apps to W: drive. Copy unifiedlogger.zip from deploy folder to W: drive.