ReleaseNotes:Planimate 4.22 Release Notes

From Planimate Knowledge Base
Jump to: navigation, search

Release notes, bug fixes and misc enhancements to Planimate 4.22

4.22w

  • fixed bug causing delay box to appear on run start when it shouldn't

4.22v

  • reworked the way Planimate tracks when a window is "Busy" and locked from further events. Have co-ordinated the handling of multiple windows/ viewports to prevent events getting to a window when they should not.

This was causing crashes if model runs were continued via a viewport background menu

  • "run realtime" mode now is much more transparent in operation and does not present the "pause" run menu when processing a realtime update
  • font can be selected for attribute and cell views
  • "edit order" can be specified for cell views

this moves the edit window in a predefined order between cell views on a panel as they are edited

  • the system attribute "Run In Real Time" can be used to turn on and off the realtime run mode of the engine (where the clock gets stepped along by the realtime clock)

Note on the Realtime Mode
Realtime mode involves sending a "continue" message to the engine 2 times a second. A model can use the "_Run Continue" broadcast to capture this event and perform a "background" task. This task/thread will be executed even if the user is editing a cell/attribute. It must not perform any time consuming activity and must not generate a dialog. It should be heavily validated to ensure the realtime task will not stop the model with a message under any circumstance.

  • new display option "dont show background run menu" does not display the background menu in simulate mode.

4.22u

  • fixed major slowdown bug in T due to extra redraw in print check code

4.22t

  • "Simulation Model" to "Application" conversion enhancement

To make it easier to convert simulation models into applications, a new display option has been added which reduces the need to replace all scheduled entries by broadcast entries.
When the new "Modeller Starts Scheduled Entries" option is turned on, all scheduled entries will no longer automatically post events when the engine is started. This will enable the model to sit at "Time Zero" as long as the modeller wants.
When the modeller wants to start the simulation run, the new routine operation "Start Scheduled Entries" can be used which will cause all scheduled entries to start processing their schedules, as used to happen automatically when the run engine was started.
The "Start Scheduled Entries" operation only takes effect once during a given run of the engine, and only takes effect if the "Modeller Starts Scheduled Entries" option was "on"

  • Find and replace implemented in the routine editor

The Replace menu appears when you right click on a line in the routine editor. It by default is applied to the line clicked to the end of the routine, this can be changed.
An original and new attref can be specified in the replace dialog, all instances of the original attref are then replaced by the new one.
Two important special cases are handled which makes the replace powerful

  • If the original and new attref are both "Value" mode attrefs, then all instances of the "Value" attref are replaced, including those used to specify rows/columns in table cell lookups, matched cells, row lookups etc.
  • If the original and new attref are both "Table" then all attrefs referencing the table (in any mode) are updated, not just "Table" mode attrefs
  • new value format to display fixed with integers with leading 0s
  • new option for file write prevents any delimiters being written between columns. this can be useful when packing together table columns
  • New routine operations

"Set Column Tuple Name"

  • Enables the tuple name of a column to be changed, much like changing the title of a column. This resets the tuple caches so tupling will find the new column. However, as is the case for inserting/deleting columns, using constant column labels to identify the column requires the engine to restart.

"TableView Row Scroll", "TableView Col Scroll" "Set TableView Row Scroll", "Set TableView Col Scroll"

  • These give the modeller access to the current scroll offset of a table view. To identify which table view, the modeller must specify both a table object and a model panel identifier. Only one tabular view of a particular table on a particular panel can be accessed.

"TableView Rows", "TableView Cols"

  • These give the modeller access to the number of rows/columns that the table view last displayed. This can change on different PCs due to differerent display drivers, font scaling and panel zoom. It is important to the printing enhancement (below) since it lets the printing code know how many rows/columns were actually rendered, so the correct scrolls can be computed
  • New system broadcast "_panel printed" is sent after a modeller-initiated print of a panel is complete for that panel. It will tuple through two item attributes:

"_page" - current page number in print job, starts at 1 "_panel" - value from the panel label list identifying the panel the modeller is currently printing

  • Enhancement to printing (making use of the new routine operations) enables a page to be repeatedly printed under model control. The model can re-submit a page in respose to the "_Page Printed" broadcast after making adjustments to the scroll of table views on the page

I have developed a model which demonstrates how to print a large table over many pages, let me know if you want it.

4.22s

  • fixed bug in dispatcher - was not properly deregistering broadcast usage
  • moveable viewport (testing)
  • rework of way animation update interval events are posted to prevent "clock creep" without losing update interval scheduling
  • holding control while clicking on a section on a track changes the delete option to delete ALL tracks on the current panel

4.22r

  • migrate to owner option for routine attributes (in Attribute menu in the editor) makes the routine attribute a portal attribute
  • switches now have an option to make them visible during the run

4.22q

  • have fixed simulation pause/continue handling so it properly detects a run completion. This was broken in the rewrite earlier and an extra "continue" was always required when an exit wanted to "stop" a run
  • Have put an extra check into the code which posts async events (eg: video completion) to prevent it crashing the platform if a video completion occurs at an unexpected time (eg: during an error dialog)
  • new system time attribute "Real Time Of Day" gives the number of seconds that have elapsed since midnight on the current REAL day, as read from the pc clock.
  • The following system attributes were not properly being named, due to the missing "Activity Bar Colour" name in an internal table:

"Clock Visible" "Background Run" "Item Owning Item ID" "Have Current Pending Events"
Any code using these will need to be corrected.
I am surprised noone noticed this, all 4.22 is affected.

4.22p

  • format for the Week, Day (from 1) has been changed to keep it distinct from time modes which number from 0

Times are now formatted like: W1 D2 12:34

  • The "Find" tool now makes a distinction between finding exits which stop the run and exits which pause the run

= The "Pause Once Ready" option has been renamed to "OLD: Pause After PreInit" since it has absolutely nothing to do with the current "Ready" mode of models.

      • It should be OFF unless you are relying on users interacting with models during the engine PreInit stage which is obsolete these days.

I would like to phase this option out. Advise if this is a problem

  • The Find system now finds table columns with matchine names/titles and also table columns set for "Clear At Start"

4.22o

  • reworked scenario loading, fixed problems in prereading multiple tables

4.22n


[new file format]

  • Table cell click broadcast now sends the broadcast when the space bar is pressed with the table having focus (instead of editing the cell)
  • New option on table views "Send Broadcast After Edit"

This enables the table to be edited normally but sends the cell click broadcast (including the _row and _column) after the cell has been edited.

  • implemented new time format "Week, Day (from 1) which formats relative times in weeks, days, hours and minutes.

This gives output like 1w 2d 12:34
Weeks are counted from 1 Days are counted from 1..7
NB: This is intended as an output format and does not have strong input validation at this stage

4.22m


[new file version]
This release implements portal security
A portal option tags a portal and its subsystems as "Only For Administrators" You only need to set the option for one portal and it will be in effect for all subsystems within it.
This prevents the portal from being viewable unless an administrative password is provided. This is set in the Edit->Admin Password menu. The default password is "admin" (you will need to enter this to change it) and with this default, Planimate automatically grants admin access when the model is loaded (so there is no protection by default).
If the admin password is changed from its default, the admin protection is activated (after the model is reloaded). When an attempt is made to access a protected subsystem (either by direct clicking on a portal, following a jump button or a model initiated screen change), Plnimate will prompt the user to provide the password.
The protection does NOT apply to panels associated with a protected portal, so these may be linked to without the user needing the admin password.

4.22l


Major Recoding
[no functional/file format changes from "k" but alot of code has been rewritten to support upcoming enhancements]

  • FEC event handling has been streamlined for high priority 0 time events. Should make things slightly faster
  • A multiserver with a zero delay now schedules a priority event which is posted ahead of any other events at the current time. This makes it much more likely that the next thread to execute after the item reaches the multiserver is the item leaving the multiserver.
  • All SAVE code has been reworked so I can now intercept the saved model data stream. This will enable me to implement on-the-fly scrambling of the model file, to prevent users looking at the model code

4.22k

  • new options and behaviour for attribute stat/views and buttons

= If you run in InterDyne mode and use the Pauseable 0 Delay object, this change impacts your models!
When paused, if any current time events are pending AND the system is in InterDyne mode, then attribute views and buttons will not respond to user interaction
UNLESS their new option
"Can Send When Events Pending" (for buttons) "Can Edit When Events Pending" (for attribute views)
are on.
This builds on the premise that a model does not normally pause until all zero time events have been processed, but can be forced to pause using a "Pausable 0 Delay" - in which case new broadcasts and attribute changes could impact badly on an incomplete process.
By default, the platform now blocks these broadcasts/changes, for safety, but these options above allow the new behaviour to be overridden at which point the modeller takes the risk for ensuring integrity.

  • new system attribute "Have Current Pending Events" returns true if the FEC has any events scheduled to occur at exactly the current time - meaning that there is some unfinished activity at the current epoch which has not yet occured - either because the user has paused the model or as a side effect of activity in the current thread (eg: unblocking).

This is intended to enable modellers to check whether other 0-time activity is in progress when a new broadcast is initiated by the user interacting with the model. The modeller may want to provent this second broadcast from proceeding in such circumstances.

  • Platform change: In InterDyne mode, the paused background menu will now enable just "Continue" if the FEC has pending events at time 0.

This enables users to continue a run they paused (enabled by a Pauseable 0 Delay) without having to use the main menu "Continue"
In addition, the pause popup which occurs while a run is in progress will now only show "Pause Run" - again in InterDyne mode at time zero.

4.22j


[new file version]

  • Date time dialog no longer has the NULL checkbox - still accepts "-" and <del> for entering a NULL time
  • implemented date/time editor for cell and attribute views
  • added ability to send a broadcast when an attribute view (stat) is edited. Unlike table etc. broadcasts, setting this broadcast does not stop the click from editing the attribute, but causes the named broadcast to be sent once the edit is complete. The modeller can use this to trigger an update once a field is edited.
  • sort alphabetic option now available for sub label lists (so dialog lists will be sorted)
  • Scenario loading is now prevalidated before the load starts. Made the table column error message more friendly
  • new calendar time format : Day of Week

eg: Mon, 1 Jan 2001

  • the 3 system_UI broadcasts are no longer tagged as in use by the platform (they never were) and can be removed from a model if not used. They are no longer present by default
  • fixed more pausing bugs which "i" didnt properly address

4.22i

  • Table/Gantt/Train Graph click broadcasts

previously these were sent to the dynamic scope associated with the VIEW. They are now sent to the scope associated with their source table.
This makes them safer when systems are copied

  • Loading integrity issues
  • new descriptive message appears when a loaded model is too "new" and the load is avoided.
  • new main menu "model info" option - just gives version info of model without loading it
  • Error Handling for modeller debugging
  • the error dialog enables routine attributes to be browsed if a routine attribute was active at the time of the error
  • on model errors, item and routine attributes are written to the _plerror.txt file
  • calendar window now used when entering calendar times in tables

This replaces the freeform editor and enables a date/time to be selected using a calendar. The window consists of a number of fields into which numbers may be typed or arrow keys used to change values.
When the down arrow button is clicked, a month calendar appears. The month and year can be directly selected within this dialog and the appropriate month calendar will be shown from which a date can be selected.
The check box is used to signify that the date is a Planimate "null" date.
For keyboard users, the date/time window has many shortcuts:

  • arrows move between fields
  • esc cancels edit (or closes month view if open)
  • enter accepts edit
  • tab moves to next field
  • space moves to next field, stops at the enable checkbox and toggles it
  • F4 opens the month view
  • "-" or <backspace> clears the "enable" checkbox, marking it as a null time
  • numbers are interpreted directly (even for month fields)
  • "/",":" moves to next field so you can type: 25/12/2000 10:23:40 and it will be interpreted correctly
  • ctrl-c copies date to internal buffer (also into clipboard)
  • ctrl-v pastes the last copied date (from internal buffer only)

  • new routine operation - "Breakpoint"

This is useful for debugging routines, loops
It puts up the standard error dialog so attributes can be browsed, but otherwise enables the model to continue
An attribute associated with the breakpoint can be used to control if the breakpoint fires or not. This can be tied to a local variable (ie: only fire breakpoint under certain conditions).

  • rounding of time changed
  • times are now rounded down to the nearest second both for calculation and display - previously the display was being generated by rounding half seconds up.

Times before the model start run time reference (ie: -ve numbers) are also now rounded down, previously they would be rounded up.

  • attempting to extract date etc. of a null time now yields an error message
  • FIX - engine now properly animates side effect broadcasts sent as a result of a broadcast triggered by a button. Previously the broadcasts etc. were occuring but not being animated as the animation system was sensing the upcoming "pause" once the zero time activities were completed.
  • FIX - a button initiated broadcast was not properly handling the "continue" option until some interaction was made with the model.
  • background menu not shown if at time 0 in interdyne mode

4.22h

  • fixed a resource/memory leak in viewport handling implemented in

4.22g


4.22g


VIEWPORT FIXES

  • if multiple viewports somehow attempt to display the same panel or subsystem (which is not allowed at the moment) one will display a blue background instead of the system crashing.

Also catches the case of subsystems with viewports in them viewing each other in a circuit (the hall of mirrors...)

  • chaging subsytem due to an interaction within a viewport now is valid and no longer crashes the platform
  • multiple viewports on the one panel are now reliable and interactive deletion of one actually deletes the correct one...

With these bugs fixed/trapped, I am no longer aware of any method of crashing the platform (or generating an "Unrecoverable Error" dialog) but no doubt modeller creativity will find a way before i know it :)

4.22f


INTERNAL REWRITES AND CLEANUPS, MORE INTERNAL VALIDATION

  • have rewritten basic graphical rectangle handling. This had to occur to remove old code which is part of the reason Planimate does not fully support multiple windows on a model.

As a result, graphs, gantts and traingraphs now work properly in a viewport.
The code rewrite affects: horizontal time scroller, vertical scrollbar on tables, table graphs, gantts and train graphs, log viewer, icon selector, the palettes, "stat" view displays in general, paint objects.
They've tested out OK but look out for any new problems in displays. No changes have been made to engine algorithms or file formats.

  • have added a new diagnostic check to catch possible source code errors with window management. Apart from ViewPorts, I'm not aware of any means of generating these.

These are now reported as "Application Warnings" and must be taken extremely seriously as they mean something has happened that I never expected. These are not modelling errors (though they may be triggered by one) - they are errors in the Planimate application itself which I place top priority in fixing
These messages are also logged to PLANIMAT.DBG

  • fixed memory corruption when a subsystem containing a train graph was copied and subsequently deleted. This would cause a crash soon after.

4.22e

  • A paused model at time 0 now displays state as "Ready". The old "PreInit Paused" state (where the engine pauses once attributes have been initialised, when the "Pause When Ready" display option is on) is now called "Init Ready".

I'd like to phase out this "Init Ready" state

      • PAUSE WHEN READY should be off for usual InterDyne applications.

Is anyone using the "Pause When Ready" state? Please contact me.

  • CTRL-S now saves model when paused (this will stop and restart the run)
  • Train graph tables can now have a "_thickness" column to drive the thickness of lines. This will probably be required as dotted lines drawn as single pixel lines are very thin

4.22d

  • lower margin for train graph is now computed similarly to the top margin, this should avoid large gaps at the bottom for small graphs
  • have changed the code which draws dashed/thick lines It now uses a different API calls which enables me to draw thick AND dashed lines.

Apart from not drawing thick lines, the previous api call had a bug if the first line drawn was not dashed.

4.22c

  • NEW FILE VERSION
  • Enhanced the "find" system

The "Advanced" button in the dialog enables you to find specific instances of objects configured as specified.
Clicking on an object name and selecting "Bring To Front" now actually highlights simulation and paint objects.

  • click Broadcasts for Gantt and Train Graphs now implemented... not tested much yet, demo model to follow

4.22a

  • NEW FILE VERSION

IMPORTANT
This version will require FULL testing as I have made many coding changes especially to broadcasting, table editing and run control.
There is no intentional change to how the system operates (except where noted below) so let me know if something unexpected happens with this verison.

  • Have implemented a capability which enables a modeller to set up a table view to send a broadcast when a cell is clicked instead of editing the cell.

The "Cell Click Broadcast" option in the Table View Edit popup (click outside table cell aread to get this) enables the broadcast to be associated.
When sent, the broadcast will carry two attributes which can be captured by having item attributes "_row" and "_col" on the receiving item.
These will give the row and column clicked/doubleclicked by the user.
The broadcast is only sent if the table is clicked while the model has been started. I dont intend having an option to start the run automatically see the next note.
= I am re-considering the validity of the "Handle Without Initialising Run" button broadcast option and would ideally like to phase it out.
The overhead in initialising/shutting down large models makes models using this feature feel very sluggish to users. With modern modelling techniques there should be little or no need to "stop" a model run, in fact the intention is that in InterDyne (User) mode, the model will never need to be in a "Stopped" stage from the Users point of view.
Please contact me (Rick) or Doug to discuss this if it interests you as it will impact on our evolving designs.

  • Random error message in dialog label fields has been fixed (was not properly testing for existence of label)
  • have altered system so load/save are still available during a running model. Selecting these stops the model then restarts it once complete.

If a model is loaded via the menus while one is running, the one loaded is automatically started.
<this is all part of the move to abolish the interdyne-stopped mode of the system>

  • Reworked viewport display code to prevent crash if a viewport triggered an error message during its display (eg: missing paint image) which caused a re-entrancy problem.
  • reworked the way the "protect from edit" column options and "In Place Edit" table view options are implemented. The cell menus and row menus are now more appropriate for these modes
  • Rewrote the broadcast system to merge all the broadcast sending code.

System needs testing to ensure broadcasts sent under the many differnet contexts (buttons, change objects, exits, dispatcher) and broadcast options act as expected. See above note on "Handle Without Initialisation" as well.
4.22
This is a mostly untested beta release
= Have rewritten the master event processing loop in the engine to support future developments, more consistent error trapping and clearer internal structure, including better zero time control, and real time model operation.
Every model depends on this code and could be impacted by the changes if i've missed something. In particular the control structures which hangle Pausing and the stopping of runs (normal or errored) have been changed. Please test thoroughly before commiting to it.

  • a new option on multiserver "Pauseable 0 Delay" configures the multiserver to enable a pause of the model, even at zero time (which was disallowed except for debugging in

4.21u

)
This enables a modeller to specify "pauseable points" in a long processing sequence which runs in zero time in a very controlled manner.
Multiservers in this mode will shortly have a distinguishing appearance so the modeller can be alerted of their prescence.
Selecting this option

  • zeros the dalay of the multiserver for all classes
  • resets its capacity to 1
  • instructs the engine that a pause is OK at this object (if one has been requested by the user clicking during the run)
  • the "Run Realtime" display option now makes the model auto-continue to keep track with realtime, no matter what is active (popup, dialog etc). This can lead to real problems if a dialog is active, for example, so consider the "Run Realtime" mode experimental.

I'm not aware of any models relying on it in its previous form, let me know if you were using it since engine operation in this mode is in the process of being reworked.

  • The new system attribute "Batch Run" is true if Planimate was loaded with the /BATCH command line option
  • The new system attribute "Item Owning Item ID" returns the ID of any item which OWNS the current item if it is a message item. If the current item is not a message item, -1 is returned.
  • A model initiated scenario load/save will now prompt the user with a file selection dialog if the file name label contains a '*'. If the file name label contains an extention, it is used instead of the default SCN extention.

idkbase note 153