You must be logged in to reply to this topic.
LoRaWAN The LoRa Alliance first defined the LoRaWAN standard with the objective of creating a medium access scheme and a set of network management policies that leverage the properties of […]
Low-power wide-area network (LPWAN). These networks use low-power radio signals, such as those in the sub-1 GHz range, to send small amounts of data over a large area. LPWANs are […]
SUMO has different tools for creating and customizing road networks and traffic flows and traffic signals. In this article, we will use some of those tools available in SUMO to […]
Spring Mobility Spring mobility is nothing but making a node to move in a path similar to that of an expanded circular coil spring. From the top or bottom point […]
Mobility Models of ns-3. The default ns-3 installation will contain the following mobility models. MobilityModel Subclasses ConstantPosition ConstantVelocity ConstantAcceleration GaussMarkov Hierarchical RandomDirection2D RandomWalk2D RandomWaypoint SteadyStateRandomWaypoint Waypoint PositionAllocator Position allocators […]
Aquatic Animal Tracking: Tracking marine animals can be extremely tricky due to GPS signals not functioning well underwater[1]. Underwater acoustic communication is a technique of sending and receiving messages below […]
I have to repeat a NS2 simulation a number of times, each time changing the number of network nodes, and calculate the average congestion window. Tcl script creates a file named “winfile” after the execution, in which the first column is the time, the second the value of the congestion window. I wrote a perl script to implement this:
$sum=0;
$average=0;
$j=0;
for($i=2; $i<=10;$i++){
system ("ns tesina.tcl $i");
open (DATA,"<$winfile")
|| die "Can't open $winfile $!";
while () {
@x=split(' ');
$sum=$sum+$x[1];
$j++;
}
$average=$sum/$j;
print STDOUT "$i $averagen";
$sum=0;
$average=0;
$j=0;
}
close DATA;
exit(0);
but when I run it tells me can not open the file, despite being created from the execution of the tcl files. By modifying the file in this way
$infile=argv[0];
...
it works. but I always get the same average value, which is impossible. It seems that the script does not run tcl but analyze a file previously created.
how can I fix that?
You must be logged in to reply to this topic.