Class dispatcher
Defined in File dispatcher.hpp
Inheritance Relationships
Base Type
public rer::client< dispatcher >
Class Documentation
-
class dispatcher : public rer::client<dispatcher>
Dispatches call to distribute blocks (or a single block), as configured in simulation input file.
Single and dual source distribution assumes left-right rectangular arena.
Power law, quad source, random distribution assume square arena.
Public Functions
-
dispatcher(cads::arena_grid *grid, const rtypes::discretize_ratio &resolution, const config::block_dist_config *config)
-
dispatcher(const dispatcher&) = delete
-
~dispatcher(void)
-
inline const std::string &dist_type(void)
-
inline const rmath::rangez &distributable_cellsx(void) const
-
inline const rmath::rangez &distributable_cellsy(void) const
-
dist_status distribute_block(crepr::sim_block3D *block)
Distribute a block in the arena.
- Parameters:
block – The block to distribute.
- Returns:
TRUE
iff distribution was successful,FALSE
otherwise.
-
dist_status distribute_blocks(cds::block3D_vectorno &blocks)
Distribute all blocks in the arena.
- Returns:
TRUE
iff distribution was successful,FALSE
otherwise.
-
inline base_distributor *distributor(void)
-
inline const base_distributor *distributor(void) const
-
bool initialize(carena::base_arena_map *map, const cds::const_spatial_entity_vector &entities, const rmath::vector3d &block_bb, const cspatial::conflict_checker::map_cb_type &conflict_check, const base_distributor::dist_success_cb_type &dist_success, rmath::rng *rng)
Initialize the selected block distributor. This is a separate function, rather than happening in the constructor, so that error handling can be done without exceptions.
- Parameters:
entities – The entities that (might) need to be avoided when clusters are initialized.
block_bb – A bounding box large enough to hold any block in the arena.
- Returns:
TRUE
if initialization successful,FALSE
otherwise.
-
dispatcher &operator=(const dispatcher&) = delete