Demo Models

From Planimate Knowledge Base
Revision as of 01:34, 22 June 2010 by Rick (talk | contribs)
Jump to navigation Jump to search

Some of these models switch to "user mode" to create an end user environment. Ctrl-Shift-H toggles back to edit mode. For models that restart, Ctrl-T in edit mode will leave them stopped so they can be examined.

Example Models

Object Demos

PL5 Training

Techniques

Advanced

Data

Fundamentals

Attribute Routing

Demonstrates how a random number can be generated in a routine, stored in an item attribute then used in a switch to route the item.

The model is more complex than first looks because the switch has been configured to allow blocking back to the queue behind it. To achieve this, it needs to know the item's "choice" before the item actually leaves the queue! Planimate achieves this using its "lookahead" capability.

The queue is important because it prevents interference between the Change and the Entry. Both are drawing from the same random generator before the item actually moves to the Change object which sets its route. (The Entry draws a random number to determine the next item's departure time).

Lookahead can be used to model very complex decision making, especially in networks. Its an important fundamental concept which distinguishes Planimate from regular programming languages.

Event Generation

Demonstrates the numerous ways that events (typically Items) are produced in a model. The buttons at the top (paint objects) show a number of panels with examples.

The examples include:

  • Mathematically distributed events
  • Clickable entry events (useful for debugging)
  • Messages and Broadcasts (useful for communication within a model)
  • Modeller created "event engine" using a splitter and cycling item
  • Table Driven events (useful in running pre-determined schedules)
  • User interface triggered events (button clicks etc through broadcasts)
  • Sensor Entries (attribute value changes)
  • Planimate generated events. Many of Planimate's views and internal mechanisms can be configured to generate broadcasts that the modeller can listen out for.

Icon Assignment

This demonstrates how icons can be assigned to an item "on the fly".

An attribute value can be used as an index by which an icon is assigned to the item, enabling items of the same class to have different iconic representations - perhaps to reflect different state the items are in or other differences you may wish to highlight.

One advantage of this method is that the number of item classes in your model can be reduced - which means less flow editing of different but similar classes, whilst retaining the ability to produce a pictorial differentiation between items.

Once you start using attributes to distinguish items instead of class, you will also need to manage logging and analysis based on these attributes.

Item Carrying Item

Demonstrates how tne PickUp and DropOff objects can be used to cause an item to "carry" other items around with it. An important requirement is distinguishing who is the carrier and who is to be carried. This can be set as a default property of an item class and also, as this model shows, set on-the-fly on an individual item basis.

Carrier items are called "Agents". The process can be nested - a carrier can become an item carried by yet another carrier. This can be useful in manufacturing and logistics models where it is useful to have sub-components carried through the network.

Whilst the same end can be achieved by using tables to track what each item is "carrying", having an "actual" set of items, which can be dropped off, interrogated and then picked up again makes the process much more visible.

Message Dispatcher

Demonstrates how a Dispatcher can be used to send a "message" to another location in the model. A message has a single receiver and the original item waits in the dispatcher until the message item completes its journey and enters an exit.

Attributes and properties of the original item are transferred to the message item. When the message item reaches an exit, changes made to it are transferred back to the original item which then can leave the dispatcher.

Note that the dispatcher is not FIFO like a queue, items can leave in any order.



Graphics

Networks

UI

Anchor Demo

Demonstrates the use of anchors on views and paint objects to create resizeable panels. Click the button and try resizing the Planimate application window. The model needs to be running for the panel to update properly. Anchoring in Planimate is very simplistic and is augmented by some code in Portal 2 which is triggered by a resize broadcast.

Column Tip Text

Demonstrates table column tip text and how it can be set at runtime. Hover over column 1's title, then column 2. Initially the text defaults to the title of the column, since no tip text has been set in the editor. Run the model and click the entry. Column 1's tip text is now changed.

Entire Row Click

Run the model and click on a row number. A broadcast is sent and the item is trapped in a queue. Ctrl-click on the item and it will show the item is carrying the row number that was clicked.

Paint Button With States

This demonstrates the ability for paint buttons to have multiple states with different graphical display and how the modeller can read and set those states.

Paint Hover Broadcast

Demonstrates a paint button configured to respond to the mouse hovering over it. If the model is running, it also sends a notification broadcast when its state changes.

Panel Popup Palette

Demonstrates popping up another panel in a separate window. Run and click the top entry to show the panel. Closing the panel sends a broadcast back to the model so it knows the user has finished with it. The panel's window style can be set using the option. Right click the _panel label in the tree view, select "Subsystem->Panel Options" then select "Popup" in the options editor.

PopUpMenu and Menubar Set

Demonstrates creating hierarchical popup menus and menu bars using a table to define the text, structure and command code that the menu items will have.

Portal Clicked And Moved

Demonstrates a portal configured to be draggable and clickable during the model run. Broadcasts are sent to the model for these actions, enabling it to track the changes and respond. This is useful in network models where the user can make configuration changes.

Set Viewport Scroll

Demonstrates setting the scroll of a viewport in code. This can be used to point a viewport at different parts of its subsystem, depending on what the user is interested in looking at.

Table Cell Click

Demonstrates cell click broadcasts and opening a popup panel with details of the click. Typically this could retrieve further information about the data in cell.

Table Configured Log Driven Graph

Demonstrates a Log Driven Graph where configurations for the various overlays are provided by a separate table, minimising the columns needed in the data log which drives the graph.

User Editable Table Mapper Graph

Demonstrates the use of a Column Overlay View together with the table options"Act As Mapper" and "User Cannot Add Rows" to implement a quick editor for graphical profiles such as distributions.