Difference between revisions of "Quick Programming References"
Jump to navigation
Jump to search
Line 18: | Line 18: | ||
[[File: overview.png|600px|Fig 1. Designer Desktop]] | [[File: overview.png|600px|Fig 1. Designer Desktop]] | ||
;'''Design Canvas''' | ;'''Design Canvas''' | ||
:Site of model construction. | :Site of model construction. | ||
;'''Capsule Selection List''' | |||
:Choose Capsule for display on the Design Canvas. | |||
;'''Component Palette''' | ;'''Component Palette''' | ||
:Drag Components from here onto the Design Canvas | :Drag Components from here onto the Design Canvas. | ||
;'''Model Components''' | |||
:Components selected for inclusion in the current Canvas | |||
;'''Property Pane''' | |||
:Appears for selected Component; facilitates Component property definitions. | |||
;'''Property Entry''' | |||
:Simple property values entered into Textfields or selected with Checkboxes or Radio Buttons. | |||
;'''Squib Text Areas''' | |||
:Text areas containing Squib definitions. | |||
;'''Build Reporter''' | |||
:Console used to report the result of a build. | |||
;'''Javascript Console''' | |||
:Interactive command processor that can retrieve Component values; useful for debugging. |
Revision as of 14:19, 6 June 2022
Designer Architecture
Numerus Designer is a platform for building and running simulations. A simulation requires a set of state values and a clock that iterates through a sequence of time units. The simulation uses the current state at a given point in time to determine the next state. In Designer, the state is factored across a set of interacting Components managed by a container called a Capsule.
Capsules
- The fundamental structural unit for Designer is the Capsule.
- A Capsule is comprised of a set of interacting elements called Components.
- Each Capsule actually acts as a class, or blueprint for creating one or more instances of its Component set. This is true except for the top-level Capsule, for which there is only a single instance.
- When starting a new project, you are provided with an empty canvas on which to design the top-level Capsule. Many models only require a top-level Capsule. Additional Capsules are used to implement Cells and Agents in cellular and/or agent-based models. Capsules are also used to define new Components for use in other Capsules.
Components
- Components compute useful functions or serve as containers for Agents or Cells.
- Components are either stateful or stateless. Stateful Components manage some part of the state. State values determined by these components are carried from the current time step to the next. Stateless Components compute values from the current state of the simulation that are used to determine the next values for stateful Components, but these values are not retained across the transition from one time unit to the next.
- Most Components need to be programmed; i.e., provided with values or code that determine their behavior. Within that code may be references to the current values of other Components. The simplest Component programming calls for one or more constant values, however for most Components a code segment using the Java language is required.
- User-defined code segments are called squibs. Each squib either computes and returns a value, or performs a state change. The bulk of Designer programming is in writing squibs.
Platform Overview
- Design Canvas
- Site of model construction.
- Capsule Selection List
- Choose Capsule for display on the Design Canvas.
- Component Palette
- Drag Components from here onto the Design Canvas.
- Model Components
- Components selected for inclusion in the current Canvas
- Property Pane
- Appears for selected Component; facilitates Component property definitions.
- Property Entry
- Simple property values entered into Textfields or selected with Checkboxes or Radio Buttons.
- Squib Text Areas
- Text areas containing Squib definitions.
- Build Reporter
- Console used to report the result of a build.
- Javascript Console
- Interactive command processor that can retrieve Component values; useful for debugging.