Revision Notes for FRED 7.1

7.1.0

The following features were added in FRED version 7.1.0.

  • Updates to list processing functions:

  • renamed filter(<list_expr>,<test1>,,,<testN>) to filter_agents(<list_expr>,<test1>,...,<testN>)

  • renamed filter_index(<list-expression>,<test1>,...,<testN>) to index_agents(<list-expression>,<test1>,...,<testN>)

  • For filtering numeric lists, added list-valued function filter_values(<list_expr>, <op>, <expr>) where op is <, <=,=,==,>,>=,!=

  • For getting the indices of numeric lists, added list-valued function index_values(<list_expr>, <op>, <expr>)

  • To select items from a list given the list of desired index values, added list-valued function filter_by_index(<list_expr>, <list_of_desired_indexes>)

  • Added list-valued function union(<list_expr>,<list_expr>) to get a list of unique items that occur in either list, sorted in increasing order.

  • Added list-valued function intersection(<list_expr>,<list_expr>) to get a list of unique items that occur in both lists, sorted in increasing order.

  • Add list-valued functions sort(<list>), arg_sort(<list>) and shuffle(<list>)

  • Added the debugging function abort(). If triggered, a message is printed in errors.txt like

FRED terminated with errors:
===================================
RUN1: FRED ERROR: Agent 164581176 aborts in condition FOO state B on sim day 10 sim date 2020-01-11:
if(age<18) then abort()
  • Added an Index out of range error when reading a CSV file.

  • Added a condition property shuffle which, when set, causes the order of agent-transitions to be shuffled for each time step, to ensure that agents are processed independently of their order in the input files. Note: this may cause an increase in run-time. Applies to all states within the condition.

  • Added function steps_between(<timestamp1>,<timestamp2>) that returns the time steps between <timestamp1> and <timestamp2>. Positive results mean that <timestamp2> is later than <timestamp1>. Throws an error message for invalid timestamps.

  • Any agent is permitted to execute the add_site() function. This was previously restricted to the meta agent, but in some models it may be useful for admin agents or ordinary agents to create new sites, e.g. a house party at an agent’s household.

  • Changes to FRED commands:

    • fred_sweep was upgraded to permit parallel sweeps to execute without interference.

    • fred_format command provides standardized formatting for FRED program files

    • fred_debug retrieves debugging statements associated with a job.

    • fred_get_progress shows the progress of any FRED job with a default value of 60 seconds. Previously was off by default.

Notes

The GitHub FRED-tutorial repository is now publicly accessible. See the FRED Language Tutorials document for details.