#include <rim_comm_model.h>


Public Member Functions | |
| RimCommModel (double alpha, double beta, double mean, double variance, double range, double min_range, double max_range, double doi, int granularity, double vsp, double epsilon, int rot, int sequence_count) | |
| Constructor. | |
| ~RimCommModel () | |
| virtual void | set_doi (double) throw () |
| Sets doi. | |
| virtual void | set_granu (int) throw () |
| Sets Granularity. | |
| virtual bool | can_communicate_bidi (const Node &, const Node &) const throw () |
| virtual bool | can_communicate_uni (Vec u, int uid, Vec v) const throw () |
| virtual double | angle (Vec u, Vec v) const throw () |
| virtual bool | can_communicate_uni (const Node &, const Node &) const throw () |
| virtual bool | exists_communication_upper_bound (void) const throw () |
| returns whether communication_upper_bound() returns a useful value | |
| virtual bool | exists_communication_lower_bound (void) const throw () |
| returns whether communication_lower_bound() returns a useful value | |
| virtual double | communication_upper_bound (void) const throw () |
| virtual double | communication_lower_bound (void) const throw () |
| Returns lower bound. | |
| virtual bool | is_status_available_on_construction (void) const throw () |
| virtual int | get_granularity (void) const throw () |
| virtual double | get_range (void) |
| virtual void | save_to_tag (SimulationEnvironment &se) throw () |
| Adds a tag named "ki_seq" to World which stores the entries of KiSeq. | |
| virtual bool | load_from_tag (const SimulationEnvironment &se) throw () |
| void | save_to_file () |
| void | generate_sequences () |
| virtual std::vector< double > | get_Ki (int sequence_index) |
| virtual double | interpolate_Ki (double, int) const throw () |
| Returs K(i) value for a non integer angle. | |
For further information, read www.cs.virginia.edu/~th7c/ Research/Publications/Papers/RAM_V11.pdf
The Radio Irregulation Model (RIM) is a communication model which models variation in sending power and transmission range depending on the direction of signal propagation. The Disk Graph Model simulates communication by using radial transmission range. But Radio Irregularity is a common phenomenom in wireless networks and so RIM is a much more realistic way of simulating and testing a wireless network environment.
To explain, how the several parameters affect the behavior of the simulation, it is neccessary to give a short introduction in the internals of this model: At time of initialisation, this model generates a sequence of 360 values, called KiSeq_Temp. Each of them models the transmission range percentage variation change per unit degree change in the direction of radio propagation.
These value are directly influenced by the parameter <DNF>doi, which is the maximum percentage variation change per unit degree change in the direction of radio propagation. By increasing the doi-value, the variance in transmission range becomes more irregluar. All these values are chosen randomly by a WeibullRandomVariable. This variable can be affected by the parameters alpha and beta. Furthermore, all values in the sequence are assured to be in the intervall from min_range to max_range, comprehended as minimum / maximum value of percentage variation in transmission range. If doi is set to zero, the RIM Model behaves like Disk Graph Model with transmission range range.
After generating the temporary KiSeq, granularity values are chosen and stored to the final KiSeq_. The parameters <DNF>variance and mean affect the behavior of a NormalRandomVariable. This Random Variable affects the maximum percentage variance of the signal sending power for this model (Parameter vsp). The final vsp_ is set during construction of the RIM Model.
Beware, each node in the simulation communicates with the same final vsp value and uses the same final KiSeq_. There is no difference between different nodes.
To use the the RIM in Shawn, task prepare_world gets value "rimm_comm" for the id "comm\_model". All of the parameters are optional:
double alpha (optional) (default: 3.0) double beta (optional) (default: 5.0) double mean (optional) (default: 0.0) double variance (optional) (default: 0.0) double range (optional) (default: 1.0) double min_range (optional) (default: 0.5) double max_range (optional) (default: 1.5) double doi (optional) (default: 0.0) int granularity (optional) (default: 360) double vsp (optional) (default: 0) | shawn::RimCommModel::RimCommModel | ( | double | alpha, | |
| double | beta, | |||
| double | mean, | |||
| double | variance, | |||
| double | range, | |||
| double | min_range, | |||
| double | max_range, | |||
| double | doi, | |||
| int | granularity, | |||
| double | vsp, | |||
| double | epsilon, | |||
| int | rot, | |||
| int | sequence_count | |||
| ) |
Constructor.
| alpha | Parameter for Weibull Random Variable | |
| beta | Parameter for Weibull Random Variable | |
| mean | Parameter for Normal Random Variable | |
| variance | Parameter for Normal Random Variable | |
| range | Transmission range if doi = 0 | |
| min_range | Minimum percentage variation in transmission range | |
| max_range | Maximum percentage variation in transmission range | |
| doi | Degree of Radio Irregularity | |
| granularity | Amount of values picked out of 360 | |
| vsp | Maximum percentage variation of signal sending power |
| shawn::RimCommModel::~RimCommModel | ( | ) |
| virtual void shawn::RimCommModel::set_doi | ( | double | ) | throw () [virtual] |
Sets doi.
| virtual void shawn::RimCommModel::set_granu | ( | int | ) | throw () [virtual] |
Sets Granularity.
| virtual bool shawn::RimCommModel::can_communicate_bidi | ( | const Node & | , | |
| const Node & | ||||
| ) | const throw () [virtual] |
true iff can_communicate_uni(u,v) and can_communicate_uni(v,u), therefore, whether the two nodes may exchange messages. Implements shawn::CommunicationModel.
| virtual bool shawn::RimCommModel::can_communicate_uni | ( | Vec | u, | |
| int | uid, | |||
| Vec | v | |||
| ) | const throw () [virtual] |
| virtual bool shawn::RimCommModel::can_communicate_uni | ( | const Node & | , | |
| const Node & | ||||
| ) | const throw () [virtual] |
true if the first passed node can send messages to the second. Implements shawn::CommunicationModel.
| virtual bool shawn::RimCommModel::exists_communication_upper_bound | ( | void | ) | const throw () [virtual] |
returns whether communication_upper_bound() returns a useful value
Implements shawn::CommunicationModel.
| virtual bool shawn::RimCommModel::exists_communication_lower_bound | ( | void | ) | const throw () [virtual] |
returns whether communication_lower_bound() returns a useful value
if exists_communication_upper_bound(), nodes whose euclidean distance exceeds communication_upper_bound() can never communicate in any direction
| virtual double shawn::RimCommModel::communication_upper_bound | ( | void | ) | const throw () [virtual] |
if exists_communication_lower_bound(), nodes whose euclidean distance exceeds communication_lower_bound() can always communicate in any direction
Implements shawn::CommunicationModel.
| virtual double shawn::RimCommModel::communication_lower_bound | ( | void | ) | const throw () [virtual] |
Returns lower bound.
| virtual bool shawn::RimCommModel::is_status_available_on_construction | ( | void | ) | const throw () [virtual] |
Implements shawn::CommunicationModel.
| virtual int shawn::RimCommModel::get_granularity | ( | void | ) | const throw () [virtual] |
name of the Model
| virtual double shawn::RimCommModel::get_range | ( | void | ) | [virtual] |
| virtual void shawn::RimCommModel::save_to_tag | ( | SimulationEnvironment & | se | ) | throw () [virtual] |
Adds a tag named "ki_seq" to World which stores the entries of KiSeq.
Used in basic_tasks.cpp The RIM Model provides the functionality of storing the values of the final KiSeq_ as a tag in an XML-File by running the task save_world. The tag is a integer-double-map-tag and stores the entry index i and the value of percentage radio irregulation. If an existing world is loaded and the RIM Model is set, saved values of a KiSeq_ are loaded and used during simulation.
| virtual bool shawn::RimCommModel::load_from_tag | ( | const SimulationEnvironment & | se | ) | throw () [virtual] |
| void shawn::RimCommModel::save_to_file | ( | ) |
| void shawn::RimCommModel::generate_sequences | ( | ) |
| virtual std::vector<double> shawn::RimCommModel::get_Ki | ( | int | sequence_index | ) | [virtual] |
| virtual double shawn::RimCommModel::interpolate_Ki | ( | double | , | |
| int | ||||
| ) | const throw () [virtual] |
Returs K(i) value for a non integer angle.
1.5.6