Skip to content

The error as " Attempting to connect to the environment" #6

@easten-sea

Description

@easten-sea

Due to the size of matrix of channelTypesBetweenLayers is different of the shape of NO_LAYERS * NO_LAYERS. Even if I explicitly specify the shape of channelTypesBetweenLayers such as "protocol.urt.channelTypesBetweenLayers": "0,1;1,0", there is still an error that the shape is incorrect.

For example, in config, config = {
"SIZE": "6", # Network size, defines the number of nodes in the simulation
"network.size": "SIZE", # Use SIZE to define the size of the network

"CYCLES": "1000", # Number of simulation executions, defines the total number of complete cycles (ticks) starting from 0
"CYCLE": "1", # Defines the step size for rescheduling offline decisions (make a decision once per time step)

"simulation.endtime": "CYCLE*CYCLES", # Simulation end time = CYCLE * CYCLES

"MINDELAY": "0", # Minimum message delay
"MAXDELAY": "0", # Maximum message delay, set to 0 for no delay

"DROP": "0", # Probability of message loss, message loss is allowed

"CONTROLLERS": "0", # Node index of controller function, specifies which nodes have controller function

"clientLayers": "0", # Define which layers are clients, and these layers will generate tasks

"CLOUD_EXISTS": "1", # Cloud existence flag, 1 means existence, 0 means non-existence, 1 means there is an additional cloud node in the network

"random.seed": "1234567890", # Random seed to ensure repeatable simulation

"utility_reward": "1", # Utility reward parameter in the reward function, as the weight for calculating reward utility

"delay_weight": "1", # Delay weight parameter in the reward function, as the weight for calculating delay cost

"overload_weight": "150", # Overload weight parameter in the reward function, calculating the cost of node overload

"protocol.mng.cycle": "1", # Frequency of action, indicating how many time steps after which the environment will wait for a new set of actions

"protocol.clt.taskArrivalRate": "0.1", # The arrival rate of tasks for each client, defining the exponential distribution event rate of generated tasks

"clientIsSelf": "1", # Specifies whether the client generates tasks only to its own nodes (1 for yes, 0 for no)

Task parameters

"protocol.clt.minDeadline": "100", # Maximum possible task deadline, <=0 means deadline is disabled
"protocol.clt.numberOfTasks": "2", # Total number of task types in simulation
"protocol.clt.weight": "4,6", # Weight of each task type, comma separated
"protocol.clt.CPI": "1,1", # Average number of cycles per task type, comma separated
"protocol.clt.T": "150,100", # Size of each task type in bytes (in Mbytes), comma separated
"protocol.clt.I": "200e6,250e6", # Number of instructions per task type, comma separated

Global parameters

"NO_LAYERS": "2", # Number of layers in simulation, must be equal to the number of entries in NO_NODES_PER_LAYERS
"layersThatGetTasks": "1", # Layer indices that can receive tasks directly from the client, comma separated

Node parameters

"NO_NODES_PER_LAYERS": "5,1", # Number of nodes per layer, comma separated
"NO_CORES": "4,8", # Number of cores per layer, comma separated
"FREQS": "10000000,30000000", # Basic CPU frequency (instructions/second) of nodes per layer, comma separated
"VARIATIONS": "1e3,1e3", # Frequency fluctuation range of nodes per layer, comma separated
"Q_MAX": "10,50", # Maximum queue length of nodes per layer, comma separated

Network topology configuration

"RANDOMIZEPOSITIONS": "true", # Whether to place nodes randomly

"RANDOMIZETOPOLOGY": "true", # Whether to use a radius-based method to randomly link nodes

"RANDOMIZETOPOLOGY": "true",

"init.Net1.r": "50", # Neighborhood radius, defines node communication range

Link configuration

"protocol.props.B": "2", # Link bandwidth (MHz)
"protocol.props.Beta1": "0.001", # Link path loss constant
"protocol.props.Beta2": "4", # Link path loss exponent
"protocol.props.P_ti": "20", # Node transmission power (dbm)

Channel type configuration

"protocol.urt.channelTypes": "PeersimSimulator.peersim.env.Transport.OpticalFiberSNR;PeersimSimulator.peersim.env.Transport.WirelessSNR", # Channel type
"protocol.urt.channelTypesBetweenLayers": "0,1;1,0", # Channel type matrix for inter-layer communication

Cloud access configuration

"CLOUD_ACCESS": "0,1", # Specifies which layers can access the cloud (0: no access, 1: access)

Cloud configuration

"protocol.cld.no_vms": "3", # Number of virtual machines available in the cloud
"protocol.cld.VMProcessingPower": "1e8", # Processing power of the virtual machine (number of instructions per time step)
"CLOUD_POS": "50,50", # Cloud coordinates in the network, in "X,Y" format

Ether topology configuration

"MANUAL_CONFIG": "true", # Flag to enable Ether topology
"MANUAL_CORES": "4,8", # Number of cores per node in the Ether topology, comma separated
"MANUAL_FREQS": "1e7,3e7", # CPU frequencies per node in the Ether topology, comma separated
"MANUAL_QMAX": "10,50", # Maximum queue size per node in the Ether topology, comma separated
}.

The error content is:
EDSimulator: resetting
Network: no node defined, using GeneralNode
�[0;33m|0000| MNG ( -01 )| DEBUG | msg:[ 0 ]�[0m
PeersimSimulator.peersim.config.IllegalParameterException: Parameter "protocol.urt.NO_LAYERS": The channelTypesBetweenLayers should be a square matrix of size no_layers per no_layers. Current size is 8 per 6; And no_layers: 2.
At PeersimSimulator.peersim.env.Transport.MaxCapacityTransport.:81

It seems that when processing the matrix, channelTypesBetweenLayers contains fixed values, because when I set the network size to 1, the wrong channelTypesBetweenLayers matrix is ​​4*2. How should I solve this problem? How should I understand the code logic? Thank you for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions