[ns] can't read "req_trace_" error in NS simulation (WebTraf) ?

Anis Masmoudi Anis.Masmoudi at int-evry.fr
Fri May 28 06:38:36 PDT 2004


Hello sir,

I have the following urgent problem when I ran a ns simulation (WebTraf connection):

 Simulation is running ... please wait ...
ns: _o299 launch-req 1 1 _o80 _o127 _o181 _o188 41 141985008: can't read
"req_trace_": no such variable
    while executing
"if {$req_trace_} {
puts "req + $id $pid $size [$clnt id] [$svr id] [$ns now]"
}       "
    (procedure "_o299" line 36)
    (PagePool/WebTraf launch-req line 36)
    invoked from within
"_o299 launch-req 1 1 _o80 _o127 _o181 _o188 41 141985008"



My NS-2 code is the mainly the following Web traffic procedure:

proc http_connections { launchTime } {


global self node2 ue

global tcp sink

# Create Web page pool

set pool [new PagePool/WebTraf]

# Setup servers and clients

$pool set-num-session 7

$pool set-num-client 2

$pool set-num-server 1

$pool set-server 0 $node2

for { set i 3 } { $i < 5 } { incr i 1 } {

set k [expr $i - 3]

$pool set-client $k $ue($i)

}


for { set i 3 } { $i < 5 } { incr i 1 } {

set k [expr $i - 1]

$pool recycle $tcp($k) $sink($k)

}


# Number of Sessions

#set numSession 400


# Random seed at every run

global defaultRNG

$defaultRNG seed 0

# Create sessions

#$pool set-num-session $numSession

#set launchTime 0

set i 0

while { $launchTime < 100.0 } {

# Inter-session Interval

set interSession [new RandomVariable/Exponential]

$interSession set avg_ 30

## Number of Pages per Session

set sessionSize [new RandomVariable/Constant]

$sessionSize set val_ 5

set numPage [$sessionSize value]

#puts "Session $i has $numPage pages"

set interPage [new RandomVariable/Exponential]

$interPage set avg_ 12

set pageSize [new RandomVariable/Pareto]

$pageSize set avg_ 6.64

$pageSize set shape_ 1.1

set interObj [new RandomVariable/Exponential]

$interObj set avg_ 0.5

set objSize [new RandomVariable/LogNormal]

$objSize set avg_ 6.5

$objSize set std_ 2.2

$pool create-session $i $numPage $launchTime \

$interPage $pageSize $interObj $objSize

set launchTime [expr $launchTime + [$interSession value]]

incr i

}

}

then I launched the simulation by:

http_connections 0.0

puts " Simulation is running ... please wait ..."

$ns run



Please, tell me what is the problem and how to fix it ?

Thank you in advance...

Best regards.


______________________________________
                         Anis Masmoudi
                     Thésard / Doctorant
                   Maisel - Chambre 1412
               5, rue Charles Fourier 91011
                    Evry Cedex FRANCE
          Téléphone : +33 (0)1 60 76 64 73
          E-mail : Anis.Masmoudi at int-evry.fr
______________________________________


More information about the Ns-users mailing list