ReleaseNotes:Planimate 5.02 Release Notes

From Planimate Knowledge Base
Jump to: navigation, search


CHANGE The "Model Loaded" broadcast was being sent too early, before dispatchers were initialised.
It is now sent AFTER the "Preinit End" broadcast but before the "Run StarT" broadcast, at which time the engine is properly initialised.
BUGFIX Pauseable 0 multiserver does not allow its time to be changed from 0
BUGFIX Second title text can be set to empty string once set
NEW Routine operation to set a paint object's property
A few properties are supported (use the new Paint Property Label List to select the property) including co-ords, colours and rotation.
Modeller needs to repaint after updates are complete.
Inherited paint objects are updated
BUGFIX Fixed font manager comparison to also compare underline and strikeout flags


NEW If a broadcast button is clicked while PL is doing a "real" delay (advancing time until the next event time) then the pending event is pre-empted so the broadcast can be processed, after which the platform will continue to delay until the next event.
BUGFIX "Hierarchic Files In Folder" routine operation now works when passed a relative path
BUGFIX Expression editor properly quotes names with spaces in them
NEW Change->File Operation "Delete Empty Folder Hierarchy"
Will delete all empty folders it finds within the specified folder and deletes the specified folder if it ends up empty.
Whilst this does not delete files, modellers must still be careful to call this with an intended folder.


BUGFIX Removing all lines in a routine and closing the routine editor now purges the routine even if its a shared routine.
The routine will only be deleted when all routine attributes and subroutines are also removed.
Hence dont leave a routine (especially a shared one) empty otherwise all references to it will be lost.
BUGFIX Icons updated for change objects if a shared routine is deleted
BUGFIX No longer crash if deleting a shared routine and a change object using that shared routine is in the copy/paste buffer
NEW The modeller "redraw lock" is ignored if printing. This should enable use of the redraw lock flag to reduce flickering when multiple panels are printed.
NEW Subroutines can be renamed. The calls to the subroutine are not updated and will need to be edited; this allows a subroutine to be "swapped" with another.
BUGFIX Change object icon indicates a routine is associated when a routine is associated with no routine lines but with subroutines or attributes defined (which prevents it being removed).
NEW Modeller INI file options:\
AutoSizeOperationColumn=1 AutoSizeCommentColumn=1
Turning these on enables the routine editor to auto size these columns to fit the contents when the routine editor is first opened and theres something in there to resize to.
BUGFIX Reworked the loop routine selection dialog so it has an explicit "None" button to avoid accidently losing the routine association.
NEW Routine line comments can be much longer
NEW Switches display path numbers that lines in a multiple condition table correspond to


BUGFIX The change to broadcasts in 5.02b broke the continue/pause behaviour of broadcast. Its now fixed so a broadcast will now only process events at its current time unless an explicit "continue run after broadcast" button option or routine line is executed.
Check interactive broadcast buttons; if you expect a run continue then it has to be specifically requested.
BUGFIX Fixed a nasty bug when an error occured during lookahead and PL attempted to display an error dialog, triggering further errors in views (controlled by attributes) which would obscure the previous, real error. Furthermore, if a viewport was involved, the platform would crash.
BUGFIZ Viewport zoom offsets were being messed up when the view containing the viewport or the viewport itself were not scaled to 100%

  • fixed offset save/restore code to account for the current zoom
  • ensure that when zoom is changed, current zoom is stored before the window's zoom value is changed (by hiding the window before the zoom is changed)

NEW Menu for a attribute view has an edit for any attached dial (in case the dial is lost)


BUGFIX Change Object->File->Save Image can now accept an optional data target. IF provided, it is treated as a portal/panel reference, enabling the modeller to specify a single panel to save instead of the currently visible one.
NEW Change Object->File->Delete Folder option added Will delete the nominated folder only if it is empty

NEW Routine operation "Hierarchic Files In Folder"
This creates a list of path/file names for all files matching a simple wildcard specification, searching in the current folder and all folders under it.
A starting folder can also be specified (relative or absolute).
The returned list of files include their full paths, new label-string operations below can assist in processing these as required.
The Path/File spec can be something like
"*.DAT" - returns all DAT files in current folder and below "data\*.DAT" - returns all DAT files in data subfolder and below "C:\data\*.DAT" - returns all DAT files in absolute location and below
CHANGE The "Append To Label" and "Rename Label" have been extended in the way their target can be specified. Existing models should not be affected. See next note.
NEW Label String Operations:
"Append To Label" "Rename Label" "Extract File From Path/File" "Extract Path From Path/File" "Extract File Extention"
These share common usage in taking a "source" attribute (in string form) and performing a string operation on it, putting the result into a supplied "target" attribute/label list.
SOURCE: Is interpreted as a formatted string. Usually would be an attribute formatted as a label but could be a formatted number, an internal system string attribute.
If its a table row, the cell's formatted strings are concatenated together.
TARGET: Must be an attribute/cell formatted for a label list. The label list will receive the new label and the attribute will be set to the label code for the label in the list.
The initial value of the attribute is important.
If the attribute is set to a label code for an existing label, that label will be replaced with the result of this operation.
If the attribute is set to a non zero label code which has not been used, a new label will be created with the result of this operation, usingthe given label code.
If the attribute is set to zero, a new label will be created with the result of this operation and attribute will be set to a newly allocated label code.
EXCEPTIONS (override the above):
If the result of this operation is an empty string, attribute will be set to 0 and no label will be added to the target label list.
If the result of this operation is an existing label in the target label list, the attribute will be set to the label code of the existing label.

LABEL STRING Operations:
"Append To Label" Appends the source string to the target label (if any)

"Rename Label" Replaces the target label with the source label. Can also create a new label if the target label code is 0.

"Extract File From Path/File" Treats source as a file/path specification and sets the target to just the file name.
"C:\My Models\NewModel\Data.DAT" would result in "Data.DAT"

"Extract Path From Path/File" Treats source as a file/oath specification and sets the target to just the path (everything before the last "\"
"C:\My Models\NewModel\Data.DAT" would result in "C:\My Models\NewModel"
The trailing slash is removed unless it is preceeded by a ":" or is the first character in the string.

"Extract File Extention" Returns everything following the rightmost "." in the source string. If there is no "." then an empty string is returned (label code 0).
"C:\My Models\NewModel\Data.DAT" would result in "DAT"

More string operations will be added to this in future versions


BUGFIX Reworked reading of model file info to prevent buffer overflows
BUGFIX Unblocking blocked trains from a switch based on a condition which posted an FEC unblock event was broken and the unblock never occured.
This would manifest itself as trains unnecessarily blocked.
Have reworked the unblocking code
CHANGE The way track junctions book following sections and test for capacity has been cleaned up. They now book sections (linked by junctions) first then perform capacity testing on the nodes acting as junction and beyond the last junction.
Fixes issue of a junction portal not getting a lookahead message if its next to a capacity portal.
NEW Error message added:
If a junction portal flows a lookahead path into internal capacity rather than out its portal exit, this is deemed broken behaviour because its supposed to link to the next section as the portal *should* have no capacity as far as lookahead is concerned.


NEW Added a counter for individual blocked train unblock attempts
FIX Error message for "train turnaround at a junction" now includes details to assist in debugging
NEW Clicking the ROUTE NAME line in an item's detail popup open another popup listing the routes steps, highlighting the current step.
Note if you drag the item route list, you'll find the item popup is still open underneath it and it will still respond to scroll wheels.


NEW A new track lookahead rule has been added.
When loops are checking if a train can enter them, they look for other "oncoming" trains at portals with the "oncoming train" flag set.
The new rule is: if the train wanting to enter a loop comes from a portal with the "oncoming train" option set, there is no need to test for other trains approaching that portal - since the train doing the test is already in the portal and will be creating capacity there when it heads off towards the loop.
This rule fixes a deadlock resulting from a loop not letting a train in because other trains were approaching the portal that the train was in.


BUGFIX Loop Exit Delay End was broken (being stored/read from the wrong attribute)
BUGFIX IDBase client reworked to not re-request lock on note if no attachments are to be sent


NEW Routine operation "Send Named Immediate Message"
This enables a message to be sent to a specifically named entry at the destination subsystem - very useful in network models where you want to invoke a "method" at a given location.
CHANGE Cleanup of messaging code, named messages from routines or dispatchers will now resolve faster


Older models that do advanced stuff in their in/out routines may need updating due to changes here. As well as speed ups, these changes will make train movement logging much more straightforward to implement.

  • Loop Entry and Exit routines (if selected) are now called for all loops in the model, even if they are "acting as junctions" (optional loops).
  • The loop exit routine is ALWAYS invoked before any loop exit delay is performed. Any loop configured to execute a loop exit routine after the exit delay will give a warning message upon load (logged to planimat.dbg) and be reconfigured.
  • The LoopEntryDelayStart timestamp is now (properly) made before the loop entry routine is called
  • Trains "thrown" at a loop get the LoopEntryDelayStart and LoopEntryDelayEnd times set to the current time
  • Trains ending their route at a loop will call the loop exit routine so their last step gets properly logged.
  • New Track system attributes. These simplify management of routines executed as trains move through the network:

"Track Loop In Routine Active" This is set if the currently executing routine is being executed as a loop entry routine. Otherwise its 0.
"Track Loop Exit Routine Active" This is set if the currently executing routine is being executed as a loop exit routine. Otherwise its 0.
"Track Loop Acting As Junction" This is set if the currently executing routine is either an Entry or Exit routine AND the loop is acting as a zero capacity "junction" (optional loop) for the train currently moving through it. Otherwise its 0.

  • Loops no longer support an attref for # of roads. A model can set the # of roads by setting the loop's Capacity (object attribute).

Existing constant attrefs are converted to a number. Non constants give a warning (logged to planimat.dbg) upon load and the value 1 is used.
Note that setting the loop capacity object attribute does not persist between runs; the loop resets to the initial # of roads specified at edit time upon an engine restart.


BUGFIX Actually remembered to bump version number and file version number (should have been increased in 5.02c)
SPEED The way broadcast items are allocated has been rewritten - much less duplication for a new item setup, means faster broadcast processing.
SPEED PL now has a separate item cache for every item class. This means items can be recycled much faster because PL knows they are ready for use for that particular item class. Also inlined the cache code so items will pop out even faster


REMOVE Train arrival/departure/dwell times which used to be stored in internal route tables
PL no longer uses arrival/departure/dwell times stored in internal item route tables to override track section running times.
Removed very messy route depart cache code so track models should be a little faster
REMOVE System-item attributes for train forced arrival/departure/dwell times removed. PL will warn if these are referenced; use the "Find - advanced - attribute reference" in the previous PL release to find and remove these attribute references. You can continue using the model even with the warnings; it will complain at any object actually using them during model run.
NEW A number of new system-item attributes are maintained by Planimate to assist track modellers in generating graphs and logs, minimising the extra model code (and speed impact) that the modeller needs to put into the track code.
Please refer to Planimate Knowledge Base note 313 for details on these attributes.
CHANGE Moved track specific system attributes to their own flyout in the system attribute select menu
SPEED Inlined route manipulation into item code for further speed
NEW For routes ending at a loop, the loop's exit routine is now called so its final section travelled can be logged. This might confuse older models which did not expect the exit routine to be called for a train ending its life at a loop.
NEW Item click popup - wider time fields, new fields for train time logging


BUGFIX Memory leak for object attribute name when an attribute is associated and logging with an object
CHANGE Have reworked the broadcast code so sideeffects of a broadcast without the "Continue run after broadcast" option on are processed outside of the broadcast handler.
This shouldn't affect operation of broadcasts but means the release note about this for 5.02a can now be ignored.


CHANGE: Attempting a run restart while a broadcast is processing is now not allowed as it messes up the engine.
Existing models that do a run restart (eg: to change the run start date or allocate objects or load a dataset) will produce an error message if they break this new rule.
To fix old models:

  1. 1: (If its a dataset load - this is not needed for dispatcher)

If a dataset is being loaded by a routine directly in a broadcast thread, isolate it with a 0 delay multiserver.

  1. 2: Ensure that user click broadcast buttons that could trigger a restart (typically buttons that broadcast to continue a run) have the "continue run after broadcast" option ON.

If this option is OFF then the broadcast is still "pending" while PL is clearing zero time events and you will get an error, even with zero delay multiservers isolating the thread.
Taking care to use the "continue" option with broadcast buttons is also important if you want the run to be pauseable in zero time because in end user mode, PL wont pause while a broadcast or its sideeffects are being processed.
BUGFIX Small leak in modeller set message in status bar
BUGFIX Explorer window now not continually updated during a ctrl-paste
BUGFIX CTRL-Paste will not replace the originally copied portal, this would (sometimes) confuse the platform when the replacement match was recursive.


(built with VC)

NEW Find (Advanced) for a specific attribute reference.
You can also use "wildcards" by using the system->null attribute as a field placeholder which will then match any constant/item/etc in that field of the attref. Good for finding unusual table references, all references to a specific object attribute etc.
NEW Track unblocking rules refined:Here is exactly when a track unblock occurs:

  • train leaves loop it was waiting at (but only if no loop exit delay)
  • loop exit delay ends
  • section control attribute changing with section becoming idle
  • train leaving section and entering loop with no loop entry delay
  • loop entry delay ends
  • train leaving section and entering a portal
  • train leaving non "act as junction" portal and entering section
  • a portal entry for a portal on a track gets unblocked (but NOT if the unblock was propagated from the track through the portal. This one is so a switch at a portal entry can unblock the track.

Can YOU think of one I've missed???

SPEED For reference in case of strange behaviour bugs

  • Optimisations assuming PL is running in an environment with VM
  • FEC event processing streamlined - less redundant checking of pause, zero time flags
  • Old unused track object unblocking code cleared out
  • Track loops cache information to avoid having to look it up to determine use of gates and exit conditions every single time
  • Some debug options removed (from release builds)
  • Time-profiling-enabled check code sped up
  • Object input paths pruning rewritten to avoid unneeded memory reallocation during run start
  • Object input/output links now cache object instance pointers to speed up item movements through objects
  • Sped up destination object/flow search for item movements
  • preferred links only format names if they have an error to report
            • - routes now use preallocated tables (limit of 256 steps per route) to avoid memory thrashing
  • Added routeinstance cache so route info objects can be recycled
  • sped up FEC event cache; no longer impose cache size limit on FEC
  • inlined switch decision reset list; now uses a custom table structure that will be quicker
  • Planimate table sorts are now more efficient; use preallocated index tracking tables (if the table is < 50000 rows) and validation of the sort is more efficient.
  • The item recycler now sniffs around a bit for an item with the same class in its past lifetime as the new one being asked for. This can avoid reallocating item attributes/item tables.
  • smarter posting of track unblock events (see above)

idkbase note 317