Blocks

A SysML block defines a type of thing, whether a physical object or an abstract idea. Most blocks in a model have both properties that can describe the thing's state and operations that can be called on them. The core blocks in a SysML model will also typically have behaviors (e.g., state machines). These behaviors are what Moxie executes when you run a simulation. Moxie requires for any block with behavior you want to execute that:

  1. Its behavior is set as its Classifier Behavior. If no blocks in your model have behaviors, you cannot run a Moxie simulation of your model.
  2. It derives from Moxie-Base::Structure::Thing, either directly or indirectly through other blocks. As a best practice, you should derive all of your model's blocks ultimately from Moxie's core models.
  3. It has at least one instance specification that is referenced in the roots slot of the simulation instance specification, either directly or indirectly through other instance specifications. Moxie executes all such instance specifications at the start of a simulation.

Figure 1: A block with a Classifier Behavior that derives directly from Moxie-Base::Structure::Thing

Block definition diagrams

Moxie does not require a block definition diagram, but you may want to create one to help visualize the structure of your model. A block definition diagram can show the relationships between the blocks as well as their properties and operations.

Figure 2: A simple block definition diagram

Instance specification diagrams

Moxie does not require an instance specification diagram, but you may want to create one to help visualize the initial state of your model. An instance specification diagram is just an object diagram that shows the instance specifications used in the simulation and their initial slot values.

Figure 3: A simple instance specification diagram