Difference between revisions of "Designer Component Guide"

From Numerus
Jump to navigation Jump to search
Line 12: Line 12:
<div id="Command">
<div id="Command">
===Command===
===Command===
[[File:dcommand.png]] A command contains code that is executed once per timestep. Commands do not return values; rather they operate by altering simulation state, often through the execution of some primitive operator. One common use for a Command is during program development, where the ''Console.log'' primop is used to print useful values to the console. Another important role is in the agent life cycle, where Commands may contain code used to create or terminate agents, or move them in their environment.
[[File:dcommand.png]] A command contains code that is executed once per time step. Commands do not return values; rather they operate by altering simulation state, often through the execution of some primitive operator. One common use for a Command is during program development, where the ''Console.log'' primop is used to print useful values to the console. Another important role is in the agent life cycle, where Commands may contain code used to create or terminate agents, or move them in their environment.


;Property Pane
;Property Pane
Line 18: Line 18:


;'''Observer'''
;'''Observer'''
:If checked, this Command is not executed during the normal Simulation cycle, but rather from a remote Observer, such as an Agent Vector Component.
:If checked, this Command is not executed during the normal Simulation cycle, but rather intentionally from a remote Observer, such as an Agent Vector Component, or from some other Component. Intentional Command invocation follows the same pattern as Term invocation.
;'''Volatile'''
;'''Volatile'''
:Normally Components are executed only once per cycle. If Volatile is checked, it enables multiple executions.
:Normally Components are executed only once per cycle. If Volatile is checked, it enables multiple executions.

Revision as of 15:22, 7 June 2022

This guide documents the Component set distributed with Numerus Designer. Numerus Designer models are constructed out of Components, which are visual tokens that are placed on the Design Canvas.

To place a component on the model canvas:

  • Press the left mouse button on the desired Component in the Component Palette.
  • Drag the component from the component menu onto the Design Canvas.
  • A default name will be provided; Alt-click on the name to change it (or change it in the Property Pane).
  • The new component must be programmed; this may require the programming of squibs. See Programming References for a discussion of squib programming.

Basic Components

Command

Dcommand.png A command contains code that is executed once per time step. Commands do not return values; rather they operate by altering simulation state, often through the execution of some primitive operator. One common use for a Command is during program development, where the Console.log primop is used to print useful values to the console. Another important role is in the agent life cycle, where Commands may contain code used to create or terminate agents, or move them in their environment.

Property Pane
Thumb
Contains a single Command squib.
Observer
If checked, this Command is not executed during the normal Simulation cycle, but rather intentionally from a remote Observer, such as an Agent Vector Component, or from some other Component. Intentional Command invocation follows the same pattern as Term invocation.
Volatile
Normally Components are executed only once per cycle. If Volatile is checked, it enables multiple executions.


Constant