menu MENU
Stéphane Lafortune
Stéphane LafortuneN. Harris McClamroch Professor of Electrical Engineering and Computer ScienceElectrical Engineering and Computer Science
(734) 763-0591 4415 EECS1301 Beal AvenueAnn Arbor, MI 48109-2122

Getting Started with DESUMA2

Note: Information in this page can also be found within the DESUMA software. Under Help, go to How To…with DESUMA.

Setting up UMDES

DESUMA is a Java based program to allow users of the UMDES library to graphically view results. To use UMDES:

  • 1. It must be downloaded here. 2. After downloading UMDES, DESUMA must be pointed to the UMDES library to use its functions. To do this: :* Select Edit>Preferences…. (Or on OSX, Desuma>Preferences….). :* Under the profile tab, select the Browse button under the Plugins Directory. :* Locate where your copy of DESUMA is stored, and select the file umdes.xml in the umdes folder. :* Click OK and the plugin will be automatically loaded every time DESUMA is launched.

Note: On Linux/Unix/Mac systems, you may need to change the file permissions of the files if the library consists of executables. You can fix this by going to the directory of the executables and type in the command line chmod+x *, or through the File Preferences for your operating system.

States

Creating States

States can be created via the command line or the batch window. It is possible to create states that initially have no markings, or it is possible to use flags to indicate that a state has special properties (e.g., initial, marked).

A state can also be added by right-clicking the graph and selecting Add State from the pop-up menu. Note: that this method does not allow flagging.

Command Line Rule: State names containing spaces are not accepted by DESUMA through the command line. This is because spaces are used to parse arguments from the command line.

Single State

There are two ways to create a state without flags:

:*Type state state_name into the command line and press Enter.

:*Type s state_name into the command line and press Enter.

Both commands achieve the same result. If the state is created, a circle– or ellipse if state re-sizing is enabled– with state_name displayed in the center will appear in the workspace. Also, the status bar will be updated with a message indicating success. The first state created becomes the initial state.

Example: typing s des j b on the command line will create a state named des

Multiple States

Multiple states can be created via the command line or the batch window. For either case, the syntax is:

:*Type multistate number_of_states into the command line and press Enter. Type state_name on the dialog box and press OK.

:*Type ms number_of_states into the command line and press Enter. Type state_name on the dialog box and press OK.

OR

:*Type multistate number_of_states state_name into the command line and press Enter.

:*Type ms number_of_states state_name into the command line and press Enter.

The names of the states are automatically assigned based on the following rules:

:*The least number of letters available from the word ‘state’, used sequentially, for which any state does not have that name.

:*The lowest digit available.

Example: Typing ms 40 desuma on the command line will provide the states {desuma, desuma1, desuma2,…, desuma39} if these states do not already exist.

Note: In DESUMA2, creating multiple states will create states that are stacked together. To separate them, just drag each state off the stack.

Flags

It is also possible to create a state and initially assign it some properties by using flags. The syntax is as follows:

  • state state_name [flags]
  • s state_name [flags]

:*-i or -I

  • tags the state as the initial state (graphically indicated by displaying the state in green)”

:*-m or -M

  • gives the state the marked property (graphically indicated by displaying the state in pink and with a double circle/ellipse)”

Note:

:*At any time, there may only be one initial state. New states created (or modified) as initial states will take the initial status from the previous initial state (if one exists).

:*Flags MUST be preceded with a dash character.

:*Flags are not available for the multistate or ms command.

Examples:

:*state 1 -IM: creates an initial state that is marked named 1.

:*s 34 -I: creates an initial state named 34.

:*multistate 3: creates three states with default names.

:*ms 20: creates twenty states with default names.

Editing States

State names can be changed using the graphical interface of DESUMA. Right-click the desired state and select Rename to bring up a dialogue box for a new name re-entry. Alternately, double-clicking on the state name on the status pane will allow renaming. Note: Spaces are accepted for renaming states.

To edit the properties of existing states, locate and select the States tab in the Status Panel. Locate the state you wish to modify and select appropriate actions.

Deleting States

There are two ways to delete states:

  • 1. In the DESUMA workspace, left-click the state you wish to delete. Information about the selected item will appear in the Summary tab. Once selected, right-click the state to bring up the options menu. Select Delete.
  • 2. Type delete state_name into the command line and hit Enter.

Note: all transitions entering or exiting the deleted state will automatically be removed.

Transitions

Creating Transitions

Transitions require an origin state and a destination state. Note: The origin and destination state can be the same state for self-loops. Transitions are created with the command line or batch window. It is possible to create transitions that initially have no markings, or it is possible to use flags to denote special properties (controllable, observable).

Using the Command Line

Transitions can be created without flags in two ways:

  • 1. Type trans from_state_name to_state_name transition_name into the command line and hit Enter. 2. Type t from_state_name to_state_name transition_name into the command line and hit Enter.

Both versions achieve the same result. There should now be a directed solid line, labelled with transition_name in the workspace, originating at from_state_name and ending at to_state_name.

This procedure creates a transition with any properties. To change the properties, refer to section on editing transitions.

Flags

It is also possible to create a transition and initially assign it some properties using the flags options. The syntax is as follows:

  • trans from_state_name to_state_name transition_name [flags]
  • t from_state_name to_state_name transition_name [flags]

The flags associated with the trans command are:

:*-uo or -UO

  • Gives a transition the unobservable property.

:*-uc or -UC

  • Gives a transition the uncontrollable property.

Note:

:*By default, if the flags are not present, the transition will be assigned to be observable and controllable.

:*These properties are not assigned any graphical representation; rather, the properties are indicated in the Events tab on the right-hand pane labelled transition_name.

:*If the transition is observable (controllable, respectively), the observable (controllable) box associated with the given transition will contain a checkmark.

:*The graph layout will change with the addition of new states or transitions if the user has AutoLayout turned on. The user can prevent auto-layout by turning the option off in their user profile.

Examples:

:*trans 1 2 trans_1 -UOUC: creates a transition from state 1 to state 2 called trans_1 that is unobservable and uncontrollable.

:*t 1 2 trans_1 -UO: creates an unobservable– but controllable– transition from state 1 to state 2 called trans_1.

Editing Transitions

Editing a transition can be done in two ways:

  • 1. Graphically, by right-clicking the transition and selecting Edit/rename transition…
  • 2. Going to the Events tab and double-clicking the transition name to rename, or checking or unchecking the observable and/or controllable boxes.

Note: Properties of an automaton can only be edited if the workspace is unlocked.

Deleting Transitions

There are two ways to delete a transition from an automaton.

  • 1. Select the transition you wish to have deleted by right-clicking directly on it. This will bring up a menu of options. In this menu, you will find the Delete Transition item, which will delete the transition.
  • 2. To delete a transition called transition_name that begins at from_state and ends at to_state, type delete from_state to_state transition_name into the command line and press Enter.

Defining Event Properties

Event properties of observability and controllability are specified on the Events tab of the Status Panel. If an event is observable (respectively, controllable), a check mark will be present in the box next to the event name.

To denote that a particular event is observable (respectively, controllable) simply click the appropriate box in the table. Similarly, to indicate that an event is unobservable or uncontrollable, remove the check from the box by clicking on the appropriate box.

Note: Workspace must be unlocked for changes to take place.

Files

Opening Files

DESUMA supports the UMDES file format (.fsm) as well as .xml format with additional information such as position and event properties across multiple agents. You simply open an existing file in .fsm format and it will automatically be displayed in a DESUMA workspace.

To open an existing .fsm or .xml file:

  • 1. Go to File menu and select Open. 2. A pop-up window will appear allowing the selection of a .fsm or .xml from the current working directory. 3. Select a file. 4. Click on the Open button in the dialogue box.

Note: The UMDES file format is sometimes abbreviated as .fsa so DESUMA will open them as an alternative. If the file has no extension, DESUMA will try to open it nonetheless.

Saving Files

To save the work in your current DESUMA workspace, it is possible to store the automaton in several formats. DESUMA supports .xml file format by default, but data can also be saved as a PNG, JPG, GIF, or the UMDES text file (.fsm).

Saving the Workspace as .xml

There are two ways to save a workspace: either using the main menu or using the appropriate icon on the toolbar.

  • 1. Go to File menu and select Save or Save as
    • If you select Save as, a dialogue box will appear prompting you for a new filename.
    • If you are saving a new workspace (that has not previously been saved) and select Save, a dialogue box will appear prompting you for a filename.
  • 2. Click on the save icon on the menu bar.

Saving the Workspace as a .PNG, .JPG, .BMP, .GIF, or .FSM (UMDES) File

To save your workspace under a different file format, go to the File menu, choose Export, and finally select the desired file format from the submenu.

Workspace

Refreshing the Workspace

Clicking on the refresh icon in the main window will refresh the layout of the automaton.

Locking the Workspace

To prevent an automaton from being modified unintentionally, it is possible to lock a particular workspace, thus making it impossible to edit the automaton.

There are two ways to lock a workspace:

  • 1. Right-click on the tab name for the automaton you wish to lock and choose Lock Tab from the pull-down menu. 2. Under the Summary Tab in the Status Panel, click the cell labelled Editable and change the field from true to false.

After the workspace has been locked, the tab with the name of the automaton will be updated to display a lock symbol to indicate that the workspace is indeed locked.

Printing the Workspace Display

Click the printer icon in the main window.

Zoom

Four main ways to zoom in or out exist:

  • 1. Zoom-in: clicking on the zoom-in icon located in the main toolbar will enter the zoom-in mode. By switching to the zoom-in mode, the cursor will change to the standard zoom symbol of a magnifying glass with a plus symbol inside. Once in the zoom-in mode, click anywhere on the graph to zoom-in. To go back to regular mode, click the zoom-in button again. 2. Zoom-out: can be performed in the same way as zoom-in but by clicking the zoom-out button. 3. Scale-to-fit: clicking the scale-to-fit button scales the size of the workspace to match that of the automaton. 4. Default zoom: resets the zoom to default level.

When mouse is over display area, the middle mouse button toggles the zoom tools in the order Zoom-in, Zoom-out, no Zoom (default cursor).

Functions

There are many functions present in UMDES.

For more information on use of functions, refer to the DESUMA2 Functions