GridObjectCache

Package: inet.environment.objectcache

compound module GridObjectCache

This object cache model stores physical objects in a spatial grid. Each cell maintains a list of intersecting physical objects. The grid is aligned with the coordinate axes and it has a configurable cell size in all dimensions. The cell size parameters take precedence over the cell count parameters.

GridObjectCache

Inheritance diagram

Extends

Name

Type

Description

Module

compound module

Base module for all INET compound modules.

Parameters

Name

Type

Default value

Description

displayStringTextFormat

string

“”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

physicalEnvironmentModule

string

“^”

cellSizeX

double

nan m

NaN means use cell count

cellSizeY

double

nan m

NaN means use cell count

cellSizeZ

double

nan m

NaN means use cell count

cellCountX

int

10

Divide space into so many cells

cellCountY

int

10

Divide space into so many cells

cellCountZ

int

10

Divide space into so many cells

Properties

Name

Value

Description

class

GridObjectCache

display

i=block/table2

Source code

//
// This object cache model stores physical objects in a spatial grid. Each cell
// maintains a list of intersecting physical objects. The grid is aligned with
// the coordinate axes and it has a configurable cell size in all dimensions.
// The cell size parameters take precedence over the cell count parameters.
//
module GridObjectCache extends Module like IObjectCache
{
    parameters:
        string physicalEnvironmentModule = default("^");
        double cellSizeX @unit(m) = default(nan m); // NaN means use cell count
        double cellSizeY @unit(m) = default(nan m); // NaN means use cell count
        double cellSizeZ @unit(m) = default(nan m); // NaN means use cell count
        int cellCountX = default(10); // Divide space into so many cells
        int cellCountY = default(10); // Divide space into so many cells
        int cellCountZ = default(10); // Divide space into so many cells
        @display("i=block/table2");
        @class(GridObjectCache);
}

File: src/inet/environment/objectcache/GridObjectCache.ned