deployment

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2020 License: Apache-2.0, LGPL-3.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ORIGIN  = complex(0, 0)
	FcInGHz = 2.1 /// Default carrier frequency
)
View Source
const (
	OMNIDIRECTION float64 = 9990
)

Variables

View Source
var DropTypes = [...]string{
	"Circular",
	"Hexagonal",
	"Rectangular",
	"Annular",
}
View Source
var MinDistance float64
View Source
var TxRxModes = [...]string{
	"TransmitOnly",
	"ReceiveOnly",
	"Duplex",
	"Inactive",
}

Functions

func AnnularPoint

func AnnularPoint(centre complex128, innerRadius, outerRadius float64) complex128

func AnnularRingEqPoints

func AnnularRingEqPoints(centre complex128, outerRadius float64, N int) vlib.VectorC

func AnnularRingPoints

func AnnularRingPoints(centre complex128, innerRadius, outerRadius float64, N int) vlib.VectorC

func CircularPoints

func CircularPoints(centre complex128, radius float64, N int) vlib.VectorC

func ClosestMirror

func ClosestMirror(mirrorTable []vlib.Location3D, pt vlib.Location3D) (distance float64, indx int, dv vlib.Location3D)

func ClosestMirror19Cell

func ClosestMirror19Cell(mirrorTable map[vlib.Location3D]int, pt vlib.Location3D, gap float64, prev int, ISD float64) int

func Cube2XY

func Cube2XY(cube vlib.Location3D, hexsize float64) vlib.Location3D

func CubeMirrors

func CubeMirrors(r int) []vlib.Location3D

func ForceMinDistance

func ForceMinDistance(in vlib.VectorC, d, hexradius float64) vlib.VectorC

func HexGrid

func HexGrid(N int, center vlib.Location3D, hexsize float64, RDEGREE float64) []vlib.Location3D

HexGrid generates a grid of N Hexgons centred at `center` of size hexsize, returns an array of 3D locations of the centres of the hexgonals, This centers can be used to place the base-stations for Multi-cell simulations. The function automatically adds more hexgonal out

func HexGridRandU

func HexGridRandU(GridCentre complex128, hexCellCount int, hexRadius float64, NperHexCell int, rdegree float64) vlib.VectorC

% In the code, I will create a hexagon centered at (0,0) with radius R. % The snipplets can be used in mobile capacity predicts and general % systems level simulation of cellular networks.

func HexRandPoints

func HexRandPoints(N int, hexRadius float64) vlib.VectorC

HexRandPoints generates N points uniformly distributed inside a hexagon of radius hexRadius centre complex128, hexRadius float64, Npoints int, rdegree float64 based on DOI: 10.1109/CAMAD.2009.5161465

func HexRandU

func HexRandU(centre complex128, hexRadius float64, Npoints int, rdegree float64) vlib.VectorC

% This will create a hexagon centered at (0,0) with radius R. % The snipplets can be used in mobile capacity predicts and general % systems level simulation of cellular networks. rdegree=30, is vertex on top.. rdegree=0, vertex on left & right

func HexVertices

func HexVertices(centre complex128, length float64, degree float64) vlib.VectorC

func HexWrapGrid

func HexWrapGrid(N int, center vlib.Location3D, hexsize float64, RDEGREE float64, TrueCells int) (pts []vlib.Location3D, vCellIDs vlib.VectorI)

func HexWrapGrid19Cell

func HexWrapGrid19Cell(N int, center vlib.Location3D, hexsize float64, RDEGREE float64, TrueCells int) (pts []vlib.Location3D, vCellIDs []int)

func RandPoint

func RandPoint(centre complex128, radius float64) complex128

func RandPointR

func RandPointR(size float64) complex128

/ Simplest point for origin centred, rectangular region of length size

func RectGrid

func RectGrid(NCells int, isd float64, dimensions complex128) (bsCellLocations []vlib.Location3D, vCellIDs vlib.VectorI)

func RectangularEqPoints

func RectangularEqPoints(centre complex128, length, angle float64, N int) vlib.VectorC

func RectangularNPoints

func RectangularNPoints(centre complex128, width, height, angleInDegree float64, N int) vlib.VectorC

func RectangularPoint

func RectangularPoint(centre complex128, width, height, angleInDegree float64) complex128

Types

type Area

type Area struct {
	Celltype   DropType
	Dimensions vlib.VectorF
}

func CircularCoverage

func CircularCoverage(radius float64) Area

func RectangularCoverage

func RectangularCoverage(length float64) Area

type DropParameter

type DropParameter struct {
	Centre     vlib.Location3D
	Type       DropType
	Randomnoss bool // if true, uniformly distributed else equallyspaced in region

	//Radius in meters
	Radius      float64 `json:"radius"`
	InnerRadius float64

	/// Angles are in degree
	RotationDegree      float64
	InnerRotationDegree float64

	// Number of Drops
	NCount int
}

func (DropParameter) MarshalJSON

func (d DropParameter) MarshalJSON() ([]byte, error)
func (n Node) MarshalJSON() ([]byte, error) {
	return json.Marshal(n.Meta)
}

type DropSetting

type DropSetting struct {
	NodeTypes []NodeType
	Centre    vlib.Location3D
	// minDistance    map[NodePair]float64 `json:"-"`
	CoverageRegion Area // For circular its just radius, Rectangular, its length, width
	// contains filtered or unexported fields
}

func NewDropSetting

func NewDropSetting() *DropSetting

func (*DropSetting) AddNodeType

func (d *DropSetting) AddNodeType(ntype NodeType)

func (*DropSetting) GetNodeIndex

func (d *DropSetting) GetNodeIndex(ntype string) int

func (*DropSetting) GetNodeTypesOfMode

func (d *DropSetting) GetNodeTypesOfMode(mode TxRxMode) []string

func (*DropSetting) GetRxNodeNames

func (d *DropSetting) GetRxNodeNames() []string

Returns the name of the nodetypes which are configured as Receive capabilities

func (*DropSetting) GetTxNodeNames

func (d *DropSetting) GetTxNodeNames() []string

Returns the name of the nodetypes which are configured as Transmit capabilities

func (*DropSetting) Init

func (d *DropSetting) Init()

func (*DropSetting) NodeCount

func (d *DropSetting) NodeCount(ntype string) int

func (*DropSetting) SetCoverage

func (d *DropSetting) SetCoverage(area Area)

func (*DropSetting) SetDefaults

func (d *DropSetting) SetDefaults()

func (*DropSetting) SetNodeCount

func (d *DropSetting) SetNodeCount(ntype string, count int)

func (*DropSetting) SetRxNodeNames

func (d *DropSetting) SetRxNodeNames(typename ...string)

Set NodeTypes of typename(s) as Receive Capabilities

func (*DropSetting) SetTxNodeNames

func (d *DropSetting) SetTxNodeNames(typename ...string)

Set NodeTypes of typename(s) as Transmit Capabilities

type DropSystem

type DropSystem struct {
	*DropSetting
	Nodes map[int]Node
	// contains filtered or unexported fields
}

func (*DropSystem) Drop

func (d *DropSystem) Drop(dp *DropParameter) (vlib.VectorC, error)

func (*DropSystem) DropNodeType

func (d *DropSystem) DropNodeType(nodetype string) error

func (*DropSystem) GetNodeIDs

func (d *DropSystem) GetNodeIDs(ntypes ...string) vlib.VectorI

func (*DropSystem) GetNodeType

func (d *DropSystem) GetNodeType(ntype string) *NodeType

func (*DropSystem) GetNodesOfType

func (d *DropSystem) GetNodesOfType(ntype string) []Node

func (DropSystem) GetSetting

func (d DropSystem) GetSetting() *DropSetting

func (*DropSystem) Init

func (d *DropSystem) Init()

func (*DropSystem) Locations

func (d *DropSystem) Locations(ntype string) vlib.VectorC

func (*DropSystem) Locations3D

func (d *DropSystem) Locations3D(ntype string) []vlib.Location3D

func (*DropSystem) MarshalJSON

func (d *DropSystem) MarshalJSON() ([]byte, error)

func (*DropSystem) NewNode

func (d *DropSystem) NewNode(ntype string) *Node

func (*DropSystem) PopulateHeight

func (d *DropSystem) PopulateHeight(ntype string)

func (*DropSystem) SetAllNodeLocation

func (d *DropSystem) SetAllNodeLocation(ntype string, locations vlib.VectorC)

func (*DropSystem) SetAllNodeLocation3D

func (d *DropSystem) SetAllNodeLocation3D(ntype string, locations []vlib.Location3D)

func (*DropSystem) SetAllNodeProperty

func (d *DropSystem) SetAllNodeProperty(ntype, property string, data interface{})

func (*DropSystem) SetNodeLocation

func (d *DropSystem) SetNodeLocation(ntype string, nid int, location complex128)

func (*DropSystem) SetNodeLocationOf

func (d *DropSystem) SetNodeLocationOf(ntype string, nodeIDs vlib.VectorI, locations vlib.VectorC)

func (*DropSystem) SetSetting

func (d *DropSystem) SetSetting(setting *DropSetting)

func (*DropSystem) UnmarshalJSON

func (d *DropSystem) UnmarshalJSON(jsondata []byte) error

type DropType

type DropType int
const (
	Circular DropType = iota
	Hexagonal
	Rectangular
	Annular
)

func (DropType) String

func (c DropType) String() string

type Node

type Node struct {
	Type     string
	ID       int
	Location vlib.Location3D
	// Height      float64	/// moved Location member variable
	Meta         string
	Indoor       bool
	InCar        bool
	IndoorCenter vlib.Location3D /// Location of the center of Building if its Indoor , assumed at Node at Center if not set
	Orientation  vlib.VectorF
	AntennaType  int
	Direction    float64
	VTilt        float64
	GeoCellID    int
	TxPowerDBm   float64
	FreqGHz      vlib.VectorF
	Mode         TxRxMode `json:"TxRxMode"`

	Active           bool
	RxNoiseFigureDbm float64 // NoiseFigure of the receiver
	// contains filtered or unexported fields
}

func (Node) Alias

func (n Node) Alias() int

func (*Node) SetAlias

func (n *Node) SetAlias(a int)

type NodeType

type NodeType struct {
	Name  string
	Hmin  float64
	Hmax  float64
	Count int

	NodeIDs          vlib.VectorI `json:",strings"`
	Params           DropParameter
	TxPowerDBm       float64
	Direction        float64 // Direction in degree 0 to 360, for omni set to constant 'OMNIDIRECTION'
	RxNoiseFigureDbm float64 // NoiseFigure of these type of nodes

	Mode TxRxMode `json:"TxRxMode"`
	// contains filtered or unexported fields
}

func NewNodeType

func NewNodeType(name string, heights ...float64) *NodeType

type TxRxMode

type TxRxMode int
const (
	TransmitOnly TxRxMode = iota
	ReceiveOnly
	Duplex
	Inactive
)

func (TxRxMode) String

func (c TxRxMode) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL