| RTI SimCreator & SimObserver Support Home |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| hstoner |
|
|
SimVista Forum Moderator ![]() ![]() ![]() Group: Members Posts: 65 Member No.: 16 Joined: 5-September 06 |
There are many ways you can define the ambient traffic density within the scenario. The easiest way is to place a proximity sensor within the world and define the onInitialize function. Remember that any onInitialize function within a proximity sensor is executed prior to the simulation starting.
this.onInitialize = function() { Scenario.setAmbientTrafficDensity(0.0); } For more detail on the setAmbientTrafficDensity and getAmbientTrafficDensity see the index in the SimVista manual. |
| hstoner |
Posted: Mar 12 2008, 08:35 AM
|
||
|
SimVista Forum Moderator ![]() ![]() ![]() Group: Members Posts: 65 Member No.: 16 Joined: 5-September 06 |
The setAmbientTrafficDensity was really only designed to change the level of traffic density and not eliminate it. Please refer to your SimVista manual on how traffic is created/destroyed using this function. If you want to eliminate traffic from being created but still have the ability to script vehicles here is a solution. The solution is to place all the traffic at a location so it can not be used in the simulation as ambient traffic. You may remember from training that the moving models component has all the available vehicle that can be used within scripts and that will be available as ambient traffic. Essentially what we are going to do is "script" them so they can't be part of ambient traffic, but you could then script them later. In your database place a marker in the scenario and call it holding. You can name it anything, but you would need to adjust the code. After you have this in the scenario you need to add some code to part of an onInitialize function.
|
||
![]() |
![]() ![]() ![]() |