[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Solving the problem...
Hi to all...
i'm finding to resolve my topology problem
I think that the server generated the core dumped file because fuenteN
aren't agents but nodes...
Now my problem is :
Exist an agent that take the packets and send to next node and if node
have a sink agent work like sink node ???
The code is
set ns [new Simulator]
puts "Creac�on de los ficheros de nam..."
set f [open ./output/out.tr w]
$ns trace-all $f
set nf [open ./output/out.nam w]
$ns namtrace-all $nf
puts "Generac�on de la topologia de la red..."
set fuente1 [$ns node] ;# Nodos fuentes
set fuente2 [$ns node]
set fuente3 [$ns node]
set fuente4 [$ns node]
set fuente5 [$ns node]
set fuente6 [$ns node]
set fuente7 [$ns node]
set fuente8 [$ns node]
set fuente9 [$ns node]
set fuente10 [$ns node]
set fuente11 [$ns node]
set fuente12 [$ns node]
set fuente13 [$ns node]
set fuente14 [$ns node]
set fuente15 [$ns node]
set fuente16 [$ns node]
set switcher [$ns node] ;# Nodo switch
set pozo [$ns node] ;# Nodo pozo
set null0 [new Agent/Null]
$ns attach-agent $pozo $null0
;# Links entre los nodos
puts "Creac�on de los links de la topologia..."
set linkwidth [expr 10000*1024*1024]
$ns simplex-link $fuente1 $switcher linkwidth 1us DropTail ;#
fuente1 ------\
$ns simplex-link $fuente2 $switcher linkwidth 1us DropTail ;#
fuente2 ------\\
$ns simplex-link $fuente3 $switcher linkwidth 1us DropTail ;#
... ------\\\
$ns simplex-link $fuente4 $switcher linkwidth 1us DropTail ;#
... ------\\\\
$ns simplex-link $fuente5 $switcher linkwidth 1us DropTail ;#
... ------\\\\\
$ns simplex-link $fuente6 $switcher linkwidth 1us DropTail ;#
... ------\\\\\\
$ns simplex-link $fuente7 $switcher linkwidth 1us DropTail ;#
... ------\\\\\\\
;# -----------
$ns simplex-link $fuente8 $switcher linkwidth 1us DropTail ;#
... ----->| switch |
$ns simplex-link $fuente9 $switcher linkwidth 1us DropTail ;#
... ----->| + |--------> pozo
;# | cola FIFO |
;# -----------
$ns simplex-link $fuente10 $switcher linkwidth 1us DropTail ;#
... -------///////
$ns simplex-link $fuente11 $switcher linkwidth 1us DropTail ;#
... -------//////
$ns simplex-link $fuente12 $switcher linkwidth 1us DropTail ;#
... -------/////
$ns simplex-link $fuente13 $switcher linkwidth 1us DropTail ;#
... -------////
$ns simplex-link $fuente14 $switcher linkwidth 1us DropTail ;#
... -------///
$ns simplex-link $fuente15 $switcher linkwidth 1us DropTail ;# fuente
15 -------//
$ns simplex-link $fuente16 $switcher linkwidth 1us DropTail ;# fuente
16 -------/
$ns simplex-link $switcher $pozo linkwidth 1us DropTail
;# numero maximo de paquetes en la cola del switch
puts "Limitacion de la cola entre switch y pozo a 30 paquetes..."
$ns queue-limit $switcher $pozo 30
set rho [expr 1]
set rate_generador [expr $rho*$linkwidth/1.6]
puts "Creac�on de los generadores..."
set exp_ON_OFF_1 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_1 set packet_size_ 1505 ;# para la
fuente1
$exp_ON_OFF_1 set burst_time_ 0.1s
$exp_ON_OFF_1 set idle_time_ 0.9s
$exp_ON_OFF_1 set rate_ rate_generador
set exp_ON_OFF_2 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_2 set packet_size_ 1505 ;# para la
fuente2
$exp_ON_OFF_2 set burst_time_ 0.1s
$exp_ON_OFF_2 set idle_time_ 0.9s
$exp_ON_OFF_2 set rate_ rate_generador
set exp_ON_OFF_3 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_3 set packet_size_ 1505 ;# para la
fuente3
$exp_ON_OFF_3 set burst_time_ 0.1s
$exp_ON_OFF_3 set idle_time_ 0.9s
$exp_ON_OFF_3 set rate_ rate_generador
set exp_ON_OFF_4 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_4 set packet_size_ 1505 ;# para la
fuente4
$exp_ON_OFF_4 set burst_time_ 0.1s
$exp_ON_OFF_4 set idle_time_ 0.9s
$exp_ON_OFF_4 set rate_ rate_generador
set exp_ON_OFF_5 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_5 set packet_size_ 1505 ;# para la
fuente5
$exp_ON_OFF_5 set burst_time_ 0.1s
$exp_ON_OFF_5 set idle_time_ 0.9s
$exp_ON_OFF_5 set rate_ rate_generador
set exp_ON_OFF_6 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_6 set packet_size_ 1505 ;# para la
fuente6
$exp_ON_OFF_6 set burst_time_ 0.1s
$exp_ON_OFF_6 set idle_time_ 0.9s
$exp_ON_OFF_6 set rate_ rate_generador
set exp_ON_OFF_7 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_7 set packet_size_ 1505 ;# para la
fuente7
$exp_ON_OFF_7 set burst_time_ 0.1s
$exp_ON_OFF_7 set idle_time_ 0.9s
$exp_ON_OFF_7 set rate_ rate_generador
set exp_ON_OFF_8 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_8 set packet_size_ 1505 ;# para la
fuente8
$exp_ON_OFF_8 set burst_time_ 0.1s
$exp_ON_OFF_8 set idle_time_ 0.9s
$exp_ON_OFF_8 set rate_ rate_generador
set exp_ON_OFF_9 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_9 set packet_size_ 1505 ;# para la
fuente9
$exp_ON_OFF_9 set burst_time_ 0.1s
$exp_ON_OFF_9 set idle_time_ 0.9s
$exp_ON_OFF_9 set rate_ rate_generador
set exp_ON_OFF_10 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_10 set packet_size_ 1505 ;# para la
fuente10
$exp_ON_OFF_10 set burst_time_ 0.1s
$exp_ON_OFF_10 set idle_time_ 0.9s
$exp_ON_OFF_10 set rate_ rate_generador
set exp_ON_OFF_11 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_11 set packet_size_ 1505 ;# para la
fuente11
$exp_ON_OFF_11 set burst_time_ 0.1s
$exp_ON_OFF_11 set idle_time_ 0.9s
$exp_ON_OFF_11 set rate_ rate_generador
set exp_ON_OFF_12 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_12 set packet_size_ 1505 ;# para la
fuente12
$exp_ON_OFF_12 set burst_time_ 0.1s
$exp_ON_OFF_12 set idle_time_ 0.9s
$exp_ON_OFF_12 set rate_ rate_generador
set exp_ON_OFF_13 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_13 set packet_size_ 1505 ;# para la
fuente13
$exp_ON_OFF_13 set burst_time_ 0.1s
$exp_ON_OFF_13 set idle_time_ 0.9s
$exp_ON_OFF_13 set rate_ rate_generador
set exp_ON_OFF_14 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_14 set packet_size_ 1505 ;# para la
fuente14
$exp_ON_OFF_14 set burst_time_ 0.1s
$exp_ON_OFF_14 set idle_time_ 0.9s
$exp_ON_OFF_14 set rate_ rate_generador
set exp_ON_OFF_15 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_15 set packet_size_ 1505 ;# para la
fuente15
$exp_ON_OFF_15 set burst_time_ 0.1s
$exp_ON_OFF_15 set idle_time_ 0.9s
$exp_ON_OFF_15 set rate_ rate_generador
set exp_ON_OFF_16 [new Application/Traffic/Exponential] ;# generador
exponencial lambda = 0.1
$exp_ON_OFF_16 set packet_size_ 1505 ;# para la
fuente16
$exp_ON_OFF_16 set burst_time_ 0.1s
$exp_ON_OFF_16 set idle_time_ 0.9s
$exp_ON_OFF_16 set rate_ rate_generador
puts "Conectendo los generadores exponencial a los nodos fuentes..."
$exp_ON_OFF_1 attach-agent $fuente1
$exp_ON_OFF_2 attach-agent $fuente2
$exp_ON_OFF_3 attach-agent $fuente3
$exp_ON_OFF_4 attach-agent $fuente4
$exp_ON_OFF_5 attach-agent $fuente5
$exp_ON_OFF_6 attach-agent $fuente6
$exp_ON_OFF_7 attach-agent $fuente7
$exp_ON_OFF_8 attach-agent $fuente8
$exp_ON_OFF_9 attach-agent $fuente9
$exp_ON_OFF_10 attach-agent $fuente10
$exp_ON_OFF_11 attach-agent $fuente11
$exp_ON_OFF_12 attach-agent $fuente12
$exp_ON_OFF_13 attach-agent $fuente13
$exp_ON_OFF_14 attach-agent $fuente14
$exp_ON_OFF_15 attach-agent $fuente15
$exp_ON_OFF_16 attach-agent $fuente16
;# Se activan los generadores esponencial al tiempo 0
$ns_ at 0.0 "$exp_ON_OFF_1 start"
$ns_ at 0.0 "$exp_ON_OFF_2 start"
$ns_ at 0.0 "$exp_ON_OFF_3 start"
$ns_ at 0.0 "$exp_ON_OFF_4 start"
$ns_ at 0.0 "$exp_ON_OFF_5 start"
$ns_ at 0.0 "$exp_ON_OFF_6 start"
$ns_ at 0.0 "$exp_ON_OFF_7 start"
$ns_ at 0.0 "$exp_ON_OFF_8 start"
$ns_ at 0.0 "$exp_ON_OFF_9 start"
$ns_ at 0.0 "$exp_ON_OFF_10 start"
$ns_ at 0.0 "$exp_ON_OFF_11 start"
$ns_ at 0.0 "$exp_ON_OFF_12 start"
$ns_ at 0.0 "$exp_ON_OFF_13 start"
$ns_ at 0.0 "$exp_ON_OFF_14 start"
$ns_ at 0.0 "$exp_ON_OFF_15 start"
$ns_ at 0.0 "$exp_ON_OFF_16 start"
$ns at 1.204s "termina" ;# la simulac�on se para despues 1.204 segundos
(10^6 paquetes) llamando el procedimiento termina
proc termina {} ;# Procedimiento che se ejecuta para acabar la
simulac�on
{
global ns f nf
$ns flush-trace
close $f
close $nf
puts "Ejecutando nam..."
exec nam out.nam &
exit(0)
}
$ns run
The errores are (I think):
set fuente1 [$ns node] ;# Nodos fuentes
set fuente2 [$ns node]
set fuente3 [$ns node]
set fuente4 [$ns node]
set fuente5 [$ns node]
set fuente6 [$ns node]
set fuente7 [$ns node]
set fuente8 [$ns node]
set fuente9 [$ns node]
set fuente10 [$ns node]
set fuente11 [$ns node]
set fuente12 [$ns node]
set fuente13 [$ns node]
set fuente14 [$ns node]
set fuente15 [$ns node]
set fuente16 [$ns node]
$exp_ON_OFF_1 attach-agent $fuente1
$exp_ON_OFF_2 attach-agent $fuente2
$exp_ON_OFF_3 attach-agent $fuente3
$exp_ON_OFF_4 attach-agent $fuente4
$exp_ON_OFF_5 attach-agent $fuente5
$exp_ON_OFF_6 attach-agent $fuente6
$exp_ON_OFF_7 attach-agent $fuente7
$exp_ON_OFF_8 attach-agent $fuente8
$exp_ON_OFF_9 attach-agent $fuente9
$exp_ON_OFF_10 attach-agent $fuente10
$exp_ON_OFF_11 attach-agent $fuente11
$exp_ON_OFF_12 attach-agent $fuente12
$exp_ON_OFF_13 attach-agent $fuente13
$exp_ON_OFF_14 attach-agent $fuente14
$exp_ON_OFF_15 attach-agent $fuente15
$exp_ON_OFF_16 attach-agent $fuente16
Someone knows a solucion to this problem ?????
I don't think that i make a code for a new agent !!!!
Vincenzo Mazzotta
([email protected])
begin:vcard
n:Mazzotta;Vincenzo
tel;cell:+34-600831910
tel;home:+34-93-4430581
x-mozilla-html:FALSE
org:FIB - UPC (Catalunya Politecnic University) - Spain;Computer Arquitecture (AC)
adr:;;Calle Sancho Marraco 4 , 3� 2�;Barcelona;BCN;08004;Spain
version:2.1
email;internet:[email protected]
title:Carrer Final Project (Doble Tiulation)
fn:Vincenzo Mazzotta
end:vcard