Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Components

Simulation components are the basic building blocks of any GWR model.

The GWR Engine runs components that are connected together using ports.

The gwr_components library provides a collection of connectable component primitives to be used when building models.

Creating new components

Components are designed to be composable and connectable simulation blocks. When creating a new one it is important to consider all of the following steps:

  1. Design the component
  2. Create a struct
  3. Add ports
  4. Create subcomponents
  5. Implement any custom functionality
  6. Provide default implementations for other methods

This documentation will take you through designing a custom component that will be used to drop a random number of objects that pass through it.