nrel.hive.initialization.sample_requests

Module Contents

Functions

default_request_sampler(...)

samples count requests uniformly across time and space

nrel.hive.initialization.sample_requests.default_request_sampler(count: int, simulation_state: nrel.hive.state.simulation_state.simulation_state.SimulationState, environment: nrel.hive.runner.Environment, allow_pooling: bool = False, random_seed: int = 0) Tuple[nrel.hive.model.request.Request, Ellipsis][source]

samples count requests uniformly across time and space

Parameters:
  • count – the number of requests to sample

  • simulation_state – the simulation state

  • environment – the environment

  • random_seed – the random seed used for the random selections

Returns:

a tuple of the sampled requests