This demo, which was formerly called ADVSAMP1, demonstrated a slow moving farm tractor which slows to a stop while an automobile and a tractor-trailer pass. On return to the travel lane the automobile slows and makes a abrupt left hand turn into the path of the tractor-trailer.
We recommend you walk through this demo and then jump to the TractorTrailer Veh Impact New demo, to become familiar with the many options and updates of msmac related to tractor Trailers and multi vehicle impacts.
This demo demonstrates:
• create a 3 vehicle animation,
• simulate a tractor-trailer in a passing maneuver and
• simulate a collision between an automobile and a tractor trailer.
This advanced sample uses many options:
• The Tractor Trailer Option for m-smac
• The V3 Option in smac Animation (mGraphics) to display a third vehicle
• Note that you can also simply use the 3 vehicle option of msmac. The direct use of the 3 vehicle option is included in the TractorTrailer Veh Impact New demo.
• The Include Option to include external files in the smac Animation (mGraphics) and smac Graphics (msmacgr) input files.
Detailed instructions:
Open Project TractorTrailer Veh Impact
Select Project menu -> Open (from Demos folder) ->Tractor Trailer-Veh Impact
Then select the project file Tractor Trailer Veh Impact
The Project file is opened and file TractorTrailer Veh Impact.si5 is opened.
The following files are contained in sample project: TractorTrailer Veh Impact
and are to be used as a part of this sample demonstration:
TractorTrailer Veh Impact .si5 m-smac input dataset for tractor-trailer/vehicle impact
TractorTrailer Veh Impact a.si5 m-smac input dataset except uses variable increment tables.
Tractor.si5 single vehicle m-smac input dataset for a farm Tractor slowing to a stop
TractorTrailer Veh Impact .sg5 smac Graphics (msmacgr) input dataset for project
TractorTrailer Veh Impact sa5 smac Animation (mGraphics) input dataset for 3 vehicle view
TractorTrailer Veh Impact.veh - Vehob Include file for smac Animation (mGraphics) which includes vehicle object graphics
TractorTrailer Veh Impact sce - Scene Include file for smac Animation (mGraphics) which includes scene graphics objects
Tractor.veh - Vehob Include file for smac Animation (mGraphics) with graphics descriptors for displaying a farm tractor (vehicle 3)
Reliant.veh - Vehob Include file for smac Animation (mGraphics) with graphics descriptors for displaying a Reliant vehicle
Step 1 : In this example, we use a separate smac input file to to simulate the extra vehicle. So we need to create a time-history run for the 3rd vehicle.
• Open the Project Menu, Select the file: Tractor.Si5
• Run m-smac which will automatically run the smac Graphics (msmacgr) program.
o The Tractor m-smac file is a simple trajectory of a vehicle with a constant deceleration to a stop.
o The program will automatically go to smac Graphics (msmacgr).
o Upon completion Press the <Esc> key to return to Medit
The time-history output dataset created, Tractor.s6B, can now used directly as input for a third vehicle in the smac animation program. We will discuss this after we create the main impact simulation.
Step 2: run m-smac for the two vehicle run:
o Open the Project Menu, Select the file: TractorTrailer Veh Impact.Si5 or TractorTrailer Veh Impacta.si5
o Note the following changes to the inputs for tractor-trailer option:
o The ability to use variable increment tables. Please be sure to compare the difference in size and inputs between the two datasets (TractorTrailer Veh Impact.si5 and TractorTrailer Veh Impacta.si5).
o You will note that the dataset that uses the variable increment tables is much smaller.
Veh2 – this is a simulation of a vehicle performing a passing maneuver around a slower moving farm tractor, and then it slows and turns into a parking lot to the left.
o The input cards required for vehicle 1 are
o msmac input cards 2,4,6,8,10
Veh1 – Vehicle 2 is a tractor trailer which is following vehicle 1
o note that in the previous input files, the vehicle identifications were reversed
o msmac input cards required for the tractor trailer as vehicle 2 are
o msmac input cards 2,4,6,8,10,20,22
o on card 2, the card containing the positions and velocities of vehicle 1, a flag is set in field 7.to indicate that there is a trailer attached to vehicle 1.
o Cards 20 and 22 are used to define the properties of the trailer attached to vehicle 1
Veh3 – Vehicle 3 is the slow moving farm tractor.
o The definition of vehicle 3 is in the file tractor.si5
o We previously ran the simulation for the tractor (above)
Run m-smac
o After completion of the m-smac simulation, you will note that the smac Graphics (msmacgr) output displays is very small.
o Recall that you can use your Page Up key to interactively increase (zoom) the scene.
o Try pressing the key several times.
o To increase the amount of zoom, also try hold down the Ctrl key while pressing the Page Up key. The effects of a single key press are increased. If you hold down the Alt key while pressing a key, the effects of the key action are diminished. This effect occurs with both the smac Animation (mGraphics) and smac Graphics (msmacgr) programs.
o Upon completion Press the <esc> or <1> key to return to Medit
Step 3: Run the m-smac Animation
§ Open the Project Menu, Select from the files list the file: TractorTrailer Veh Impact.SA5
§ Once the file is opened, to run you can
o Click on the Run Button or
§ Or to run the animation without opening the file,
o Select Menu Run, Item m-smac Animation
§ Once the graphics screen is displayed:
§ Press space bar to view in continuous animated form.
o You will note that the graphics automatically pans and zooms with the action.
o This is an example of the IORIGINMOV=6 option. Interactively you can change to this option by pressing the F12 key. While viewing the animation also try pressing the F9 key and view the effects, Then also try the F10, F11 and F12 keys.
o Press the PageUp & PageDown keys to enlarge/reduce the vehicle sizes on the screen, use the arrow keys to move the origin to left/right up/down. You will note that with the F12 key (IORIGINMOV=6) option that the zoom and pan keys do not change the view.
o Also right click the mouse to bring up the pop-up dialog. You will find these and many other commands available on the pop-up dialog.
o Return to medit
Open the smac Animation (mGraphics) animation file, TractorTrailer Veh Impact.SA5
§ In the file you will see the line:
o Option=Iveh3=tractor.s6B
o This line indicates that the program is to look for a file, tractor.s6b, to use as input for the 3rd vehicle movement.
o The 3rd vehicle display option is activated by field 4 of card 1 of the smac Animation (mGraphics) input file.
o The 'tractor' display is included by VEHOB graphics calls contained in the file Tractor.veh.
o To ‘lock’ that graphics to the tractor, we included the lin
§ Option=setvehobnum=3
o This command tells the graphics program to display all vehob graphics calls in the vehicle designated vehicle 3.
o Then either another option=setvehohbonum=X, where X is another vehicle number, or a command of setvehobnum=0 which will reset the command to default.
o In the TractorTrailer Veh Impact.sa5 file you will find the following:
option=setvehobnum=3
INCLUDE=TRACTOR.VEH
option=setvehobnum=1
INCLUDE=TractorTrailer VEH IMPACT.VEH
option=setvehobnum=2
INCLUDE=RELIANT.VEH
option=setvehobnum=0
o This is used to set the various vehicle display options. Change the vehicle number of the setvehobnum=X to see the changes that occur. You can display them all in a single vehicle by simply setting the vehobnum=X for a single vehicle.