News 〉Releases

Helipad 1.4 brings Interface Improvements and New Container API

Helipad 1.4 has arrived, with the most important feature being a more consistent API for container classes. A new dict-like funcStore class now stores parameters, goods, primitives, shocks, hooks, and events. This provides a simple and standardized interface for adding, removing, and clearing all of the above.

Instead of … now use …

In addition, standardization makes it possible to remove shocks, parameters, goods, and breeds, where this was not possible before.

Helipad 1.4 also has a number of smaller features and bugfixes:

  • Installable from Conda. Helipad can now be installed with Conda instead of Pip, using conda install -c charwick helipad
  • Localization. Helipad can now be translated into and launched with other languages. While currently only an English localization exists, translators can contribute using the string template.
  • Parameter groups. Global parameters can be grouped into expandable frames.
    A parameter group in a Jupyter notebook
    A parameter group in the Tkinter frontend
  • Toggle-all buttons. Checkgrid parameters now have a button in the header for toggling on and off all the options at once.
    Toggle-all button in a Jupyter notebook
    Toggle-all button in the Tkinter frontend
  • model.cutStep(). Allows agents to be skipped during a model step, e.g. when testing if any agent will succeed in a period, there is no need to step through further agents that period once one does.
  • Agent overdraft control. Helipad now provides options for what to do when .trade() or .pay() has the agent giving up more than he has. Agents can either continue with existing balances (as was the default before), allow negative balances, or abort the trade, and the model can either continue, warn, or raise an error.
    • Shortage reporters are no longer kept track of in core, as shortages have no clear meaning for some overdraft settings. Models keeping track of shortages can do so by observing discrepancies between the input and output values of .pay().
  • Windows 11 compatibility.
  • New saveCSV hook. CSV output can now be modified before saving.
  • New icon. Helipad now displays its own icon in the dock/taskbar when launching using the Tkinter frontend, rather than the default Python launcher’s icon.
    The Helipad icon in the dock
    Helipad in the Windows taskbar
  • More reliable tooltips. Parameters registered with the desc argument now display tooltips in the Tkinter frontend even if PMW is not installed. Tooltips continue to display as normal in Jupyter notebooks.
  • Position and resize visualization windows. MPLVisualizations (i.e. all the built-in visualizations) now have dim and pos properties that can be set before launch.
  • More useful callback values. Checkgrid parameters now pass a (name, val) tuple to their callback function, indicating which checkbox was turned on or off, rather than just the value of that checkbox.
  • Better post-analysis. Models can now be run from the control panel with no visualizations selected if stopafter is set and a terminate hook is registered. Previously, doing so required stopafter to be set and CSV export to be enabled.
  • Namespace cleanup. from helipad import * no longer also imports Numpy into the namespace.
  • Cleaner spatial dimension-setting. The spatial() function takes a single dim=(x,y) tuple or int, replacing the three x=x, y=y, square=bool arguments.
  • Bug fixes.
    • Fixed a bug where parameter sweeps wouldn’t run if a visualizer was registered, even if no plots were selected
    • Fixed a bug where the CpanelPostInit hook wouldn’t run when launching a model with the debug console running.
    • Helipad 1.4.1 has updated for compatibility with breaking changes in Ipywidgets 8.0 and is not compatible with Ipywidgets 7 or earlier. If you need compatibility with Ipywidgets 7, you can use pip install helipad==1.4 to install Helipad 1.4.0. The Tkinter frontend is not affected.

API Changes in Version 1.4

  • ⚠️ HelipadThe goodParams, moneyGood, and nonMoneyGoods properties have been deprecated. Use params.perGood,, and goods.nonmonetary instead.
    Deprecated the addParameter, addGoodParameter, addBreedParameter, addEvent, removeEvent, clearEvents, addHook, removeHook, clearHooks, addPrimitive, removePrimitive, and addGood methods. These have been replaced by standard container interfaces Params, Events, Hooks, Primitives, and Goods.
    Added the locale argument.
  • ⚠️ addMoved from model.addGood().
  • ⚠️ removeMoved from model.removeHook.
  • ⚠️ addMoved from model.addHook().
  • ⚠️ PrimitiveRemoved the breedParams property as all parameters are now stored in model.params.
  • ⚠️ addPrimitiveMoved from model.addPrimitive().
  • ⚠️ removePrimitiveMoved from model.removePrimitive().
  • ⚠️ addMoved from model.addParameter().
  • ⚠️ addRenamed from Shocks.register().
  • ⚠️ ShocksNow subclasses funcStore, which subclasses dict. The shocks property has been removed, replaced by accessing the object directly with the index, e.g. Shocks[name]. The number property has also been removed; use len(model.shocks) instead.
  • ⚠️ clearMoved from model.clearEvents().
  • ⚠️ addMoved from model.addEvent().
  • ⚠️ CpanelRemoved the balloon property, which had been used for tooltips with PMW in the Tkinter frontend. Tooltips are now handled through the Tooltip class with no dependency.
    Removed the parent property as Cpanel now subclasses Tk. Code that formerly pointed to Cpanel.parent can now simply use Cpanel.
  • ⚠️ ParamRenamed the obj parameter to per for clarity. obj is deprecated and will be removed in a future version.
    For per-breed and per-good parameters, the element property is now the containing Tkinter or Ipywidgets widget. The dict of individual widgets is now in the new elements property.
  • ⚠️ MultiLevelDeprecated the dontStepAgents property. Use the cutStep() method instead.
  • ⚠️ spatialReplaced the x, y, and square arguments with a single dim argument that can take an integer or a tuple.
  • ⚠️ removeMoved from model.removeEvent().
  • ⚠️ baseAgentAdded the overdraft static property to allow more control over cases where trades cannot be accomplished as written.
    Removed the currentShortage property as it had no clear meaning for some values of overdraft. This should be kept track of in individual models by comparing the input and return values of and/or
  • MPLVisualizationAdded the dim and pos properties.
  • GoodsIntroduced to replace the bare dict previously used to store goods.
  • expandableFrameChanged the open parameter to a settable bool that can also open and close the frame.
    Added the buttons property for placing action buttons in the title.
  • HooksIntroduced to replace the bare dict previously used to store hooks.
  • AgentsIntroduced to replace the bare dict previously used to store primitives.
  • groupIntroduced.
  • EventsIntroduced to replace the bare dict previously used to store events.
  • ParamsIntroduced to replace the bare dict previously used to store parameters.
  • darkenIntroduced.
  • cutStepIntroduced.
  • funcStoreIntroduced.
  • saveCSVIntroduced.