Spatial Link

From Planimate Knowledge Base
Revision as of 10:00, 6 March 2009 by Tony.Griffith (talk | contribs) (Created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Spatial Link Spatial links are objects that form a connection between portals. Spatial Link Objects can be classified as “Logical with Capacity and Process Delay”, as they can hold items, and time passes as they process items. Spatial links have no capacity limit, however they are restricted in that it is an error to allow an Item to be blocked from leaving a spatial link.


To send an Item on to a Spatial Link, you assign to it a “Transit Target” and usually a “Transit Time”. This is usually done by adding Routine operations to a Change Object located inside one of the Portals the Spatial Link is connected to, then sending the Item to a Portal Exit.

Transit Target 

Upon being assigned a Transit Target, then sent to a Portal Exit, the item will seek to move on to a Spatial Link rather than a normal Item Path in its flow. The Transit Target need not always be a Portal at the other end of the Spatial Links connected to the portal the Item is in. Instead you can set a destination that may require crossing a number of Spatial Links before arriving.

Resolving how to reach the Target 

If the Spatial Links network yields alternative routes that could be taken to reach the Transit Target, the system resolves this by selecting the route with the least number of links in it, and the shortest overall screen distance to travel. Each Portal connected to more than one Spatial Link in a network should provide within itself a path for the item to enter and depart the portal, so that it may continue on its journey.


Target Portals must be in the _Model Objects List 

For a Portal to be a valid Transit Target, it must be added to the _Model Objects System Label list. This is done as you build your network of links. When you add a Spatial Link between Portals, the system prompts you to provide a name for the Portal, which is added to the _Model Objects list. This list is available for review under Data in the Menu Bar. The system gives an error if a movement to the origin Portal is attempted.


Transit Time 

The Transit Time you assign to the Item is the total time it will take moving from the Portal of origin to the Transit Target. If more that one Spatial Link needs to be traversed to reach th Target, the Transit Time across each link is apportioned according to the screen pixel length of each Link, in ratio to the entire Link distance. The animation of an Item’s transit over the links is performed such that the item arrives at the Transit Target in the specified interval.


Dynamic Spatial Links 

Spatial links between portals can be added and removed during a model run. When adding, if a link already exists (in either direction) a new one is not added. When deleting, link(s) in either direction are removed. No error is given if no links were in place between the 2 portals. Deleting a spatial link deletes any items on it. Copy spatial link function enables template spatial links to be copied which is useful for creating spatial link-pipes. The "Copy From" specifies a spatial link object which has been preconfigued with the required visualisation options.


Spatial Link Bends 

Spatial Links can have bends added to them either during editing, or during a run by the model.


The Settings / Display Options in the menu bar has an option "User Can Bend Spatial Links". This enables Model Users to see, move and add/delete bends to spatial links during the run.

A Routine operation Spatial link - Add Spatial Link Bend enables a bend point to be appended to the current bend points of any spatial link going from one designated portal to another. This is intended for models which construct spatial link networks on the fly. There is no way to remove a bend point; you need to instead re-create the link as required.


Spatial Link color 

Spatial link color can be changed. The link colour can by set during editing, or a routine operation can changes color of any link between two objects during a model run. If the link does not exist, nothing happens. A redraw is required after this if the link colour is not being set for a link added in the same routine/epoch. In these cases, an automatic redraw *is* scheduled. Colours once set persist across runs. Saving the model saves the link colours.


Directional spatial links 

An option during edit of the spatial link, plus a routine operation enables creation of a directional spatial link. Planimate® enables two spatial links to exist between a pair of objects if they are directional in opposite directions.


Spatial Link Pipe View 

This option makes Spatial Links display like Pipe Objects, but without the complicated attribute handling of using pipes. The basic idea is that the Spatial Link gets divided into a number of sections.


Each section can have its colour set as an item moves through it along the pipe. In addition to the section colours, separate "activity animation" can occur for non-idle sections, to graphically illustrate material flow. Since multiple items can exist in a spatial link, multiple coloured "bands" can simultaneously animate down the "pipe".

Usage: 

In the options of a spatial link, turn on "Pipe Display Mode".

The Edit menu will now contain 2 new entries:

Pipe Display Settings This contains constant pipe parameters such as width, section count, and activity update settings.

Pipe Parameters This enables 3 dynamic attributes to be defined for the spatial link pipe:

Section Colour

The colour each section of the pipe will be set to as the item moves through it. 

Activity Colour

The activity animation colour (used for the entire pipe) to use. 

Run Control

The activity speed and direction, eg: 1 is forward, 0 is stoppped, -2 is reverse double speed etc. 

These parameters are looked up whenever an item enters the spatial link, moves between sections of the pipe or leaves the spatial link. A section gets its colour set at the instant the item leaves it. By dynamically changing these parameters as the item moves therough the pipe, some very interesting effects are possible.

Of all the parameters, the section count is the most important. IT determines how many graphical bins the pipe will be split into. The more bins, the smoother the animation but the more FEC events will be scheduled as the item moves through the spatial link, slowing the model down. This slowdown occurs if the pipe is visible or not.


Interactive Spatial Links 

A system broadcast "_link clicked") which gets sent when the user clicks on a spatial link line and the Panel Option to send spatial link clicks is enabled (suppressing the normal link information menu).

The broadcast includes the following tuple attributes:

_x,_y

The screen co-ordinate clicked. 

_ratio

The ratio along the line where the  user clicked, from near 0 (start of) approatching 1 (end of link) 

_from

Object label identifier of the "from" portal for the link. 

_to

Object label identifier of the "to" portal for the link. 

_buttons

Indicates which button was clicked, Left = 1; Right = 2. 


Stoppable Spatial Links 

All spatial links have a control attribute (like a pipe).

By default it is 1, meaning "go". If this attribute is set to 0, the link will be "stopped" with all items on the link being frozen and the end points of the link blocking any item attempting to enter them. Whilst links still do not have "capacity" per se, this gives the modeller much more control over the use of spatial links to move items.

Its very important that the control attribute is something Planimate® can "unblock" from, so portal attributes and fixed cell references are OK, but item or dynamic table references are out. Planimate® looks for the control attribute starting in the "from" portal of the spatial link.

Advanced user note:

If you click on an item on a stopped spatial link, the "TIME" field will show the start model date + the time the item has spent MOVING on the link. If the link is restarted and you click on an item, the "TIME" field will show the resume time - the time the item has spent moving on the link (ie: as if the link never stopped). This is to keep the animation calculations consistent.

IF an item *with* a spatial link target set is about to go up to a portal with spatial links connected where no links accept the item, and that portal ALSO has flows connected to it, Planimate® will not attempt to take any of the outgoing flows of that portal, nor complain if there is no flows. The item will block instead. This is to support stoppable spatial links.

If NO spatial link leading to a target portal is found, it just "blocks" the item that cannot find a destination, as occurs with a stopped spatial link. It is conceivable that a modeller may later add a spatial link, enabling the "blocked" item to proceed.


Refer to Building a Spatial Link for more details.

Refer to Editing Object Properties for information about editing properties common to all objects.