Demo Models

From Planimate Knowledge Base
Revision as of 12:36, 27 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.

Messages and Broadcasts

Use the menu on the left to select a number of panels. These demonstrate basic concepts in broadcasting and sending messages, including

  • Scoped vs global broadcasts, with the hierarchy displayed on one panel using viewports
  • Sending messages to a destination specified at runtime
  • Waiting for a broadcast to complete vs. not waiting.

There are extensive notes in the model which explain the different situations.

Messages and Carried Items

Demonstrates that Messages and Item Carrying can be used together. When a message is sent, the message item will be carrying all the items the originating item was carrying. It will return all items it subsequently is carrying when the message item exits.

Multiple Runs

Demonstrates multiple runs using a simple model. Using the Run menu's Multiple Run dialog, you can specify a number of runs and they will be performed.

This model uses Planimate's inbuilt logging capabilites to write LOG files which the Log Viewer application can display graphically. More sophisticated models collect data internally and display it using the graphical table views.

Portal Attributes

Demonstrates how portals can have attributes private to them (scoped) and how such a portal can then be copied and have its values customised. It also makes use of attribute views which display, move and copy along with the portal's icon. Copy and paste one of the portals to try this.

Portal States

Demonstrates how a portal can be configured with an arbitrary number of states, each given a different icon and then have its state set dynamically by the model. It also uses routine code to generate random numbers (which determine the state) and collect statistics into a table which is then graphically displayed using two column overlay views.

Release Dispatcher

Demonstrates a dispatcher mode in which items wait in the dispatcher until a routine operation specifically requests release of an item by its item-id. This can be useful in complex wait-until situations and avoid using a blocking attribute switc with many items behind it, which is not as efficient.

Routines Case If Dialog

Demonstrates routine basics including IF statements and SELECT/CASE. A dialog triggered by the routine appears and the response made in the dialog is used to direct the code.

Also uses a Dial for activity display and a table and column overlay view to show the distribution of randomly chosen numbers.

Graphics

Animation Tests

This folder contains models which test the performance of Planimate's animation manager. They demonstrate some advanced graphical capabilities.

01 Single Multiframe Icon

Demonstrates how an object or item icon can consist of multiple images which are animated as the item moves or over time as the item waits in one location, like a queue. Its similar to an "animated GIF" except the images are not packed into one file but rather combined based on their naming.

02 Single Animate Fast (5000 items)

Sends 5000 items through a simple model with the maximum animation speed. Note that models run much faster when "advancing to time" as there are no animation overheads at all.

03 Portal State Change

A small group of portals change their icons together, preserving the background behind them.

04 Animate Over Time (small)

A small group of items move together over a multiserver configured to display as a road. This is not "zero time" flow animation of a single event but rather animation over simulated time.

05 Animate Over Time

A larger group of items move together over a multiserver-road. This tests performance with more simultaneously moving items.

06 Animate Over Time With Portals

A number of items move together over a road. There are many portals with unchanging icons which the items cross over. This tests performance in typical conditions of a complex spatial network display.

07 Rotation And Animation Over Time

This demonstrates multistate items and portals which appear to rotate. The items move smoothly over the rotating portals.

08 Animation Crossover

Two large groups of items cross paths whilst moving over separate roads, without leaving debris or slowing down whilst intersecting.

09 Animation And Sync Change Portals

Many items animate over a field of 500 portals which are all changing state simultaneously. The large number of changing portals have little impact in the smoothness of the movement of the animating items.

10 Rotation Animation Crossover

Many auto-rotated items animate along with some multi-state 'spinning" items, in two large groups which intersect with each other. This tests the manager's ability to handle more complexity.

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.