Learn R Programming

OpenABMCovid19 (version 1.0.1)

Environment: R6Class Environment

Description

Class representing an environment object that defines the system.

See Simulation for examples.

Arguments

Methods

Public methods

Method new()

Usage

Environment$new(verbose = FALSE)

Arguments

verbose

Log verbosity.

Method step()

Method called at the start of each simulation

Usage

Environment$step(action)

Arguments

action

Action to perform.

Returns

A vector in the format c(reward=R,next_start=N).

Method end_simulation()

End the simulation.

Usage

Environment$end_simulation()

Method start_simulation()

Initialize the Environment object for the start of a simulation.

Usage

Environment$start_simulation()

Returns

Returns the starting state.

Method start()

Get the starting state.

Usage

Environment$start()

Returns

Returns the starting state.