1 / 28

What is a Logic?

vsTASKER Presentation. Real tools for virtual worlds. A Logic in vsTASKER is a graphical representation of a behavior or a reaction, expressed using logical Objects organized and linked together, in such a way that the whole defines a logical sequence of acts.

Download Presentation

What is a Logic?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. vsTASKER Presentation Real tools for virtual worlds A Logic in vsTASKER is a graphical representation of a behavior or a reaction, expressed using logical Objects organized and linked together, in such a way that the whole defines a logical sequence of acts. From the toolbar, the user selects which logical Object to use to design a Logic in order to define a behavior. What is a Logic? Then, if a condition is triggered (detection of an enemy), the Task Fly will be left and the Face Target Action will be activated Here the first object to be called after Start is Task Fly. A Task runs at a given frequency and executes the embedded user code Then, as soon as the detected entity is in the line-of-sight, Fire and Evade Actions are immediately triggered.

  2. vsTASKER Presentation Real tools for virtual worlds What is an Object? The C++ user-code will be compiled and linked with vsTASKER and 3rd party application libraries, allowing direct access to all of the public data, objects and published interface. All Objects (here, a Task) have a property window with several tabs where the user can parameterize the object behavior and, more importantly, add his own C++ code.

  3. vsTASKER Presentation Real tools for virtual worlds A Task is an ongoing process that runs at a given frequency and stops on user conditions A Choice triggers the Yes or No branch according to the embedded user condition. An Action is similar to a Task but is processed only once. A Splitter divides the logical flow into two branches that will be processed in parallel. A Link connects an ongoing process object to another object. A Link is activated by different kind of user conditions. A Synchro stops the logical flow until all the input branches have been activated. A Delay stops the logical flow until one of the embedded user condition triggers A Group encapsulates other objects and groups. It is used to hide a behavior implementation. It behaves like a Task object. What are the Objects?

  4. vsTASKER Presentation Real tools for virtual worlds What are conditions? Events or Facts can be listed here. As soon as an Event is thrown or a Fact is added in a fact database, the condition is triggered. C++ user-code can also become a condition for triggering. The C++ bloc is a function body that must return True or False. The user has flexibility to define a simple or very complex condition. Time based activation is expressed in hh:mm:ss.It can be absolute time, relative time or a number a simulation cycles. • Logical Objects are triggered on several circumstances: • Immediately;- On Time; - On Facts/Events;- On Condition;

  5. vsTASKER Presentation Real tools for virtual worlds What is a Knowledge? vsTASKER provides also a declarative way for triggering behaviors. Instead of following a predefined logical path (like with Logics), the behavior designer can define a set of Rules that will or won’t trigger. A Knowledge can: Initiate Logics Add Facts into a fact database Throw Events

  6. vsTASKER Presentation Real tools for virtual worlds What is a Context? A Knowledge can contain one or many Contexts. A Context gathers rules belonging to the same domain of expertise. Each Context contains one or several Rules that are checked continuously, at a frequency specified by the user, until one if fired. When a Rule is fired, it can stay Off or be reactivated after a delay or from another rule.

  7. vsTASKER Presentation Real tools for virtual worlds What is a Rule? In a Rule, the user must add his own C++ code based on the vsTASKER API, data access or any 3rd party API or public data. The IF part must evaluate True or False according to the C++ expression syntax. This expression will be continuously checked until the Then or Else part can be triggered. The Then part can be formed with several C++ terms. The Else part is optional but if defined, will trigger the rule the same way as the Then part. After Fire defines the reactivation condition for the rule.

  8. vsTASKER Presentation Real tools for virtual worlds What is a Fact? In vsTASKER, a Fact is a persistent Event. Its existence can be unlimited or time limited. A fact can trigger objects the same way as an Event does, but most importantly, is stored into a database. vsTASKER defines Fact Db at several levels:- Context level;- Knowledge level;- Entity level;- Scenario level. From the user-code, it is easy to manipulate facts or to query a specific Fact database.

  9. vsTASKER Presentation Real tools for virtual worlds What is a Model? Models allow the user to define runtime Components and Objects to implement physical modeling like Dynamic, Road Following, Sensors, Weapons, etc. Models are made of Components and Objects grouped according to their purposes and using each others, thru inheritance or incorporation.

  10. vsTASKER Presentation Real tools for virtual worlds What is a Component? Any Component can then be attached to any Entity and be locally setup. A Component comes with everything needed to define a C++ Class. It adds a runtime routine that will be called automatically. To make this Component works, extra code will be added automatically by vsTASKER at code generation time.

  11. vsTASKER Presentation Real tools for virtual worlds What is a Model Object? Objects and Components can be set Private and then, be defined and used with a header file and an external library or DLL. A Model Object is like a Component but without the runtime routine and without all the mechanisms needed to be attached to an Entity. A Model Object is a C++ Class that can be used anywhere.

  12. vsTASKER Presentation Real tools for virtual worlds Data Interface vsTASKER generates automatically a user value editor table for all variables marked as “Interface”. User can insert directly into the vsTASKER code, commands to generate automatic GUI interface

  13. vsTASKER Presentation Real tools for virtual worlds HLA vsTASKER supports HLA based on Pitch & KD RTI Vendors. 1516 & 1.3 are supported. vsTASKER does not request any particular FOM. Any one can be imported and loaded. User can select any Object or Interaction from the FOM and add its own code to send data or process received one from other federates.

  14. vsTASKER Presentation Real tools for virtual worlds Federates Sending a vsTASKER value to other Federates is that simple. Here, setting Object Attribute “Damages” with value 100 Retrieving data from Attribute or Interaction is also trivial.

  15. vsTASKER Presentation Real tools for virtual worlds Sockets With vsTASKER graphical Sockets, it is very easy to setup a communication channel and control it. User can setup as many channels as requested using TCP or UDP protocol. Also, symbols change colors in real-time as an indicator of their status (idle, connecting, connected, receiving data…) Mean of communication between vsTASKER and other simulator systems (or another vsTASKER Sim Engine) can be defined very easily.

  16. vsTASKER Presentation Real tools for virtual worlds Aggregates Entities can be grouped as Aggregates (or Unit), mounted or dismounted. Any entity can join or leave a Unit, at design or runtime.

  17. vsTASKER Presentation Real tools for virtual worlds What is an Entity? An Entity is a virtual representation of a physical platform (boat, airplane, land vehicle) or a human being or any non material object that reacts to its environment. Every Entity belonging to a scenario can have a behavior (or intelligence) defined by one or several Logics and/or one or several Knowledge.

  18. vsTASKER Presentation Real tools for virtual worlds What is a Scenario? A Scenario gathers all the Entities involved in the simulation, for a given exercise. A vsTASKER database can contain several scenarios and each of them can contain different sets of entities.

  19. vsTASKER Presentation Real tools for virtual worlds What is user-code? In vsTASKER, each logical object can hold C++ user-code based on method calls and data processing. Local Groups, Logics, Knowledge and Contexts basic classes can be expanded with user-defined methods and data. Scenario and Entity Sources allow also the user to expand the Global class definition for Scenario and Entity classes. Global Source allow definition of data structures and functions not pertaining to any class.

  20. vsTASKER Presentation Real tools for virtual worlds User-Commands User-Commands generates automatic GUI pull down menus. They are also available in the Entity Hook-Window. Minimum coding allows specialization of the simulation system avoiding complex extensions of predefined black-box behaviors. Because sequences of actions can be triggered manually, vsTASKER lets the user to define his own commands. Specific user-code can then be triggered with runtime user-data, for any selected Scenario or Entity.

  21. vsTASKER Presentation Real tools for virtual worlds Viewers Viewers are predefined Objects that provide to the Simulation Engine a way to generate outputs. Basic default Viewer is a Console. Some other specialized Viewers are provided OTB like OpenGL or Google-Earth. The user can create his own if he wants vsTASKER to be connected to a perticular output system (typically, a 3D engine) or integrated with a third party software. Predefined objectscan also be user customized.

  22. vsTASKER Presentation Real tools for virtual worlds How to generate code? Each vsTASKER database produces 3 files, ready to be compiled and linked: - 1 header file- 1 interface module- 1 user-code module By pressing this button, the generated code is then compiled and linked with vsTASKER libraries and any other 3rd party modules and libraries. The produced executable can be run from vsTASKER GUI or from the command line, without a need of a license. Clicking on this button translates all the Logics, Knowledge, Entities and Scenarios graphical descriptions into C++ code. This process also embed the added user-code.

  23. vsTASKER Presentation Real tools for virtual worlds Of course, these manual actions can be replaced with API calls. Using the public API to remote-control the load of a scenario, the start, freeze, stop and change of the simulation rate is easy and mandatory to embed the generated behavior code into a 3rd party application. Running a simulation Like standard real-time simulation, the runtime-engine can be frozen, released or stopped. Once the executable has been created, it can be loaded from vsTASKER GUI on a mouse-click. Simulation rate can be changed using the slider to increase or decrease the number of cycles per second. Then, any scenario in the database can be selected manually before starting the simulation.

  24. vsTASKER Presentation Real tools for virtual worlds How to monitor it? During runtime, the vsTASKER GUI can be used to monitor Logics & Knowledge executions. Magenta color is used to show instant status of execution, like: which object is running, which branch has been followed, where the execution is pending…

  25. vsTASKER Presentation Real tools for virtual worlds How to debug code? Break-Points can be set anywhere in the automatically generated code (based on the graphical description) or in the user-added code (embedded into objects or expanding the basic vsTASKER classes) Using Microsoft Visual C++, it is easy to debug a Behavior (Logic or Knowledge) because the user-code is traceable. Just by adding the 3 generated files in the template VC++ Workspace provided with vsTASKER, execution can be monitored and debugged the same way as a standard hand-written application.

  26. vsTASKER Presentation Real tools for virtual worlds Because vsTASKER generates standalone C++ code, integration with another 3rd partyapplication is straightforward! Integration made-easy On the link side, to generate an executable that gathers vsTASKER behavior code, libraries and the 3rd party application libraries, the user just have to specify what needs to be included. In this example, the 3rd party application data and API have been opened to vsTASKER code. Any Logic or Knowledge object can then access, use or refer to the 3rd party application data or API directly, without the overhead of a complex and slow gateway.

  27. vsTASKER Presentation Real tools for virtual worlds Master or Slave? The RTC can run in Master or Slave mode. Master: every cycle is triggered by an internal clock mechanism. Slave: an external application must call the RTC at every cycle. With Real-Time mode, specifying the frequency (in Hz) is enough to request a certain number of cycles per real-time second (if CPU permits). With Asynchronous mode, the user specifies the integration time value (time used per cycle) and the wait time (idle time after processing). Asynchronous mode allows faster than real-time without loss of accuracy. If vsTASKER is using its embedded real-time controller (RTC), the user can select between to RTC modes: - Real-Time- Asynchronous

  28. vsTASKER Presentation Real tools for virtual worlds Thank you for attending!

More Related