Post Schedule Tasks (PSTs)
PSTs occur in Spry immediately following Results generation and there are currently 5 types:
- Copy Schedule Results to Source Table
- Copy Schedule Results to Destination Table
- Export Spreadsheet
- Export Pivot Table
- Build Table Plot
The ability to copy Schedule Results to Tables in combination with automaticlly generated Table Plots allows you to create all kinds of visual results such as Period Progress Plots (areas by time period). Note that PSTs are also completed in the order in which they are listed, so if you have a “Build Table Plot” above a “Schedule Result to Source Table” the resulting Table Plot will have built off of the previous schedule run, not the current!
Regarding the Copy to Table PSTs, until this point Spry has been mostly working in a single direction (Table Data feeds into Scenarios which feed into your Results). PSTs introduce the ability to write any result back to the relevant Source or Destination Leaf Node.
A word of warning! With the ability to write back to your Source and Destination Tables, you have the potential to write to fields that are used by the Scenario itself to schedule, so if you aren’t careful you may overwrite values that change your schedule result on each run. A recommendation is to only write to new Fields created specifically for Post Schedule Tasks.
Custom Solid Colouring
Up until this point, Solids have been coloured purely by their Process. You can now choose to override this and colour your Solids based on any property you choose using either Ranges or Expressions. Custom Solid Colours will be updated when any property they are based on is changed, so if you linked your Custom Solid Colour to a Post Schedule Task you would get updated colours on each Schedule Run!
Post Schedule Tasks are located under a tab in the Scenario Settings window next to the Initial State Tab.
Source/Destination Table PSTs
These can have multiple entries with the following properties:
- Name: For reference only.
- Active (On/Off): Whether it will be completed or not.
- Field: Generally should be a Field created specifically for PSTs. Needs to match the type (Text, Double or Date) of the Value Expression.
- Processes/Equipment (True/False): An inclusive Filter, only Schedule Steps matching the filter will be included.
- Value Expression (Double,Text or DateTime): What should be written to the Table. Genearlly should be wrapped in a ScheduleSum/Min/Max/WeightAverage to ensure all Schedule Steps are properly accounted for.
- Filter Expression (True/False): An inclusive Filter, only Schedule Steps that return True will be included.
- Range: The final Filter, if no Filter is required should be All or [Inline] *
- Clear Field (On/Off): Determines if the Field is wiped before writing values back to the Table. Generally should be left turned on.
EXAMPLE: Destination Solid Colour by Source (Part One)
The second example below (Destination) shows how you might use PSTs in combination with Custom Colour Sets to colour your Destination Solids by Source Process. The second part of this example (the Custom Colour part) is further below under Custom Solid Colours.
Export Pivot Table/Spreadsheet
These mimic the normal Export behaviour but include options to automatically either overwrite each time or to provide a unique filename. Note that exporting Spreadsheets may be time consuming to have automatically on each run depending on the size.
Generate Table Plot
Note that in the image above, the PSTs are numbered. This is because PSTs are completed in the order in which they appear so if you intend to build a Table Plot off of a Source Schedule Result you need to ensure they are in the correct order.
Practical (Custom Solid Colours)
Custom Solid Colours can be created and chosen from either the Scenario Settings window or in the View options of the Animation window. The example below shows the importance of the order of entries (once a Solid picks up a colour it won’t be overriden by subsequent entries.
To use one of the inbuilt colour palettes, once you have created more than one entry you can multi-select entries (using the Shift button on your keyboard), right click and Apply Colour Palette.