Single Condition Based Branching

From Planimate Knowledge Base
Revision as of 18:37, 16 January 2009 by Tony.Griffith (talk | contribs) (Created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This mode enables you to specify a test for the Switch to perform when an item looks through it.

Depending on the result, the Switch may act as a:


a) a branching point, choosing between two paths,
or
b) a gate, where only a single path leaves the Switch.


The test is always whether a 'condition' is true or not.

Test Result Outcome
True Switch will send item along the lower outgoing path.
False Switch will send item along the higher outgoing path.
Blocking situations apply to this Mode:
False If there is no second path, the Switch will block the item's progress.



Should any chosen path be unavailable, the switch will block the item from moving through it.

Example Single Condition Setups

Imagine you like to eat freshly cooked food, but ordering it can take some time.

Your preference might be to have fresh food, but only when there is time to order.

Switch Condition Flow.jpg


To implement this simple choice into your model, you create attributes to use in the testing and construct a condition like the following.

Switch Single Condition Dialog.jpg

In this condition, both attribute values must be true before the test will be True and the item will pass into the fresh food object. The Report button can be used as you edit the condition to visually verify your logic.

Read the report for the above example:

p.Fresh Food Shop Open = lTrue

   AND 

p.Time to Order = lTrue 


Refer also to How to Set up and Edit Conditions.


If you are intending to have the switch act as a gate, or you think it is possible that:

  • ANY path could be blocked when an item looks through the switch, or
  • the value of the Attribute being referenced could be zero at this time,
you will need to select the Gating option “Switch can Block Items”, to avoid a run-time error.

Read more about Gating Options.