Skip to content

Take a more principled approach to simulation startup and shutdown #804

@RobertJacobsonCDC

Description

@RobertJacobsonCDC

Now that negative time exists, the exact time a simulation both begins and ends may not be known at the code cite that needs that information. We have no mechanism to "run this code at simulation start time, whenever that time may be," nor to "run this code at simulation end time, whenever that time may be."

We can carefully manage our model in our client code so that we know these times, but this is fragile and a burden on the modeler. It'd be much better to have it as an ixa primitive.

Use Cases

Startup

  • create the ValueChangeCounter at startup (which starts recording value changes)
  • create other indexes at startup

Shutdown:

  • Handle final reporting events
  • Handle "partial pertiods" at the end of the simulation for reports that run at regular periods
  • A hook to inspect remaining plans, callback queues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs discussionNeeds discussion before implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions