[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem to simulation ...



Thaks for ours answered.......
My problems continue to persist...
Someone knows me to say where the problem is in this script, and where I
have to look for the matter of this problem on ns2 facilities and
documentacion

The Script first.tcl is :

set ns [new Simulator ]

puts "Defining Tracing File for nam..."

set f [open out.tr w]
$ns trace-all $f
set nf [open out.nam w]
$ns namtrace-all $nf

puts "Creating Nodes..."

set source [$ns node]
set switcher [$ns node]
set sink [$ns node]

puts "Connecting sink to Null Agent..."

set null_sink [new Agent/Null]
$ns attach-agent $sink $null_sink

puts "Creating Link..."

$ns simplex-link source switcher 10000Mb 2ms DropTail
$ns simplex-link switcher sink 10000Mb 2ms DropTail

puts "Queue limit=50 packets..."

$ns queue-limit switch sink 50

puts "Creating ON/OFF generator..."

set exp_ON_OFF_1 [new Application/Traffic/Exponential]

;# exponencial generator lambda=0.1

$exp_ON_OFF_1 attach-agent $source
$exp_ON_OFF_1 set packet_size_ 1505  ;#  for source (like ATM)
$exp_ON_OFF_1 set burst_time_ 1.204us
$exp_ON_OFF_1 set idle_time_ 0,999998796s
$exp_ON_OFF_1 set rate 15.5M

puts "Simulating the net model..."

$ns at 0.0 "$exp_ON_OFF_1 start"
$ns at 5.0 "finish"

proc finish {}
    {
     global ns f nf
     $ns flush-trace
     close $f
     close $nf

     puts "Running Visualizator nam..."
     exec nam out.nam &
     exit 0
    }

$ns run


The Error Codes are :

rogent> ns first.tcl
Defining Tracing File for nam...
Creating Nodes...
Connecting sink to Null Agent...
Creating Link...
couldn't read file "id": no such file or directory
    while executing
"source.orig id"
    ("uplevel" body line 1)
    invoked from within
"uplevel source.orig $fileName"
    (procedure "source" line 12)
    invoked from within
"$n1 id"
    (procedure "_o3" line 3)
    (Simulator simplex-link line 3)
    invoked from within
"$ns simplex-link source switcher 10000Mb 2ms DropTail"
    (file "first.tcl" line 23)



Thanks

Vincenzo Mazzotta
([email protected])