Re: [ns] ns/nam: respresentation problem when definingposition-fixed nodes (NEW question)

2007-03-22 Thread Pedro Estrela

I have the same situation.

I solve it by using the same delay in the real simualtion, and use different
delays just for debugging.

Pedro Estrela

On 3/22/07, Javier Chicote <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> Thank your very much for your reply.
>
> It is a good idea, but in my case all the links must have the same delay,
> so that is not a possibility.
>
> It is a pity that NAM does not support this facility.
>
> Best regards,
>
> Javier
>
> - Mensaje original 
> De: Pedro Vale Estrela <[EMAIL PROTECTED]>
> Para: Javier Chicote <[EMAIL PROTECTED]>; ns-users@ISI.EDU
> Enviado: miércoles, 21 de marzo, 2007 19:02:16
> Asunto: RE: [ns] ns/nam: respresentation problem when
> definingposition-fixed nodes (NEW question)
>
>
> I' tried to add XY coordinates for wired nodes, but nam doesn't support
> this
> facility.
>
> Instead, I achieve the same result by setting the length of the wired
> links
> via their delay
>
> Pedro Vale Estrela
> http://tagus.inesc-id.pt/~pestrela/ns2
>
>
>
>
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf
> > Of Javier Chicote
> > Sent: quarta-feira, 21 de Março de 2007 17:00
> > To: ns-users@ISI.EDU
> > Subject: Re: [ns] ns/nam: respresentation problem when definingposition-
> > fixed nodes (NEW question)
> >
> >
> > Hi ns-users,
> >
> > I learnt that the previous problem can be "solved" by using 'orient'
> > method at the link definition. However, this solution is not enough when
> > defining more complex structures. The next figure shows 4 nodes standing
> > in the imaginary vertexes of a square, which are all of them connected
> to
> > a master node like it is shown in the next picture:
> >
> >  node(1,0)node(1,1)
> >   (0,100) (100,100)__
> >  \___\__
> >  \___   \_
> >  \___ master
> >_/(200,50)
> >  _/ _/
> > /  /
> > (0,0)   (0,100)
> >  node(0,0)   node(100,0)
> >
> > ---> What I would like to know is if it is possible (or not) to define
> the
> > geographic position of the nodes when the coordinates of them are known
> in
> > a wired scenario, or other ideas to solve the problem.
> >
> > This is the code of the file:
> >
> > # Network configuration (x,y):##
> node(1,0)node(1,1)#  (0,100)
> > (100,100)__# \___\__ # \___
> > \_# \___ master#
> > _/(200,50)# _/ _/#/
> > /   #(0,0)   (0,100)# node(0,0)   node(100,0)#
> > # Create a simulator instanceset ns [new Simulator]
> > # Open the NAM trace fileset namfile [open position-out.nam w]$ns
> > namtrace-all $namfile
> > set rows2   ;# number of rowsset
> cols2
> > ;# number of nodes per row
> > # Define nodesfor {set i 0} {$i < $rows} {incr i} {for {set j 0}
> > {$j < $cols} { incr j } {set node($i,$j) [$ns node]
> > }}set master [$ns node]
> > # Provide initial (X,Y,Z) co-ordinates for nodesfor {set i 0} {$i <
> $rows}
> > {incr i} {set xj 0.0for {set j 0} {$j < $cols} { incr j
> }
> > {$node($i,$j) set X_ $xjif {$i == 0}
> then
> > { $node($i,$j) set Y_ 0.0} elseif {$i == 1} then {
> > $node($i,$j) set Y_ 100.0 } $node($i,$j) set Z_ 0.0
> > set xj [expr $xj + 200]}}$master set X_ 200.0$master set Y_
> > 50.0$master set Z_ 0.0
> > # Define links between nodes$ns duplex-link $node(0,0) $master 1Mb 100ms
> > DropTail$ns duplex-link $node(0,1) $master 1Mb 100ms DropTail$ns duplex-
> > link $node(1,0) $master 1Mb 100ms DropTail$ns duplex-link $node(1,1)
> > $master 1Mb 100ms DropTail
> > # Define link orientation$ns duplex-link-op $node(0,0) $master orient
> > rigth-up$ns duplex-link-op $node(0,1) $master orient rigth$ns
> duplex-link-
> > op $node(1,0) $master orient rigth$ns duplex-link-op $node(1,1) $master
> > orient rigth-down
> > # Define a 'finish' procedureproc finish {} {global ns tracefile
> > namfile$ns flush-traceclose $namfile exec nam
> > position-out.nam &exit 0}
> > # Stop the simulation$ns at [expr 5.0 - 0.01] "puts \"

Re: [ns] ns/nam: respresentation problem when definingposition-fixed nodes (NEW question)

2007-03-21 Thread Javier Chicote

Hi,

Thank your very much for your reply.

It is a good idea, but in my case all the links must have the same delay, so 
that is not a possibility.

It is a pity that NAM does not support this facility.

Best regards,

Javier

- Mensaje original 
De: Pedro Vale Estrela <[EMAIL PROTECTED]>
Para: Javier Chicote <[EMAIL PROTECTED]>; ns-users@ISI.EDU
Enviado: miércoles, 21 de marzo, 2007 19:02:16
Asunto: RE: [ns] ns/nam: respresentation problem when definingposition-fixed 
nodes (NEW question)


I' tried to add XY coordinates for wired nodes, but nam doesn't support this
facility.

Instead, I achieve the same result by setting the length of the wired links
via their delay

Pedro Vale Estrela
http://tagus.inesc-id.pt/~pestrela/ns2





> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Javier Chicote
> Sent: quarta-feira, 21 de Março de 2007 17:00
> To: ns-users@ISI.EDU
> Subject: Re: [ns] ns/nam: respresentation problem when definingposition-
> fixed nodes (NEW question)
> 
> 
> Hi ns-users,
> 
> I learnt that the previous problem can be "solved" by using 'orient'
> method at the link definition. However, this solution is not enough when
> defining more complex structures. The next figure shows 4 nodes standing
> in the imaginary vertexes of a square, which are all of them connected to
> a master node like it is shown in the next picture:
> 
>  node(1,0)node(1,1)
>   (0,100) (100,100)__
>  \___\__
>  \___   \_
>  \___ master
>_/(200,50)
>  _/ _/
> /  /
> (0,0)   (0,100)
>  node(0,0)   node(100,0)
> 
> ---> What I would like to know is if it is possible (or not) to define the
> geographic position of the nodes when the coordinates of them are known in
> a wired scenario, or other ideas to solve the problem.
> 
> This is the code of the file:
> 
> # Network configuration (x,y):## node(1,0)node(1,1)#  (0,100)
> (100,100)__# \___\__ # \___
> \_# \___ master#
> _/(200,50)# _/ _/#/
> /   #(0,0)   (0,100)# node(0,0)   node(100,0)#
> # Create a simulator instanceset ns [new Simulator]
> # Open the NAM trace fileset namfile [open position-out.nam w]$ns
> namtrace-all $namfile
> set rows2   ;# number of rowsset cols2
> ;# number of nodes per row
> # Define nodesfor {set i 0} {$i < $rows} {incr i} {for {set j 0}
> {$j < $cols} { incr j } {set node($i,$j) [$ns node]
> }}set master [$ns node]
> # Provide initial (X,Y,Z) co-ordinates for nodesfor {set i 0} {$i < $rows}
> {incr i} {set xj 0.0for {set j 0} {$j < $cols} { incr j }
> {$node($i,$j) set X_ $xjif {$i == 0} then
> { $node($i,$j) set Y_ 0.0} elseif {$i == 1} then {
> $node($i,$j) set Y_ 100.0 } $node($i,$j) set Z_ 0.0
> set xj [expr $xj + 200]}}$master set X_ 200.0$master set Y_
> 50.0$master set Z_ 0.0
> # Define links between nodes$ns duplex-link $node(0,0) $master 1Mb 100ms
> DropTail$ns duplex-link $node(0,1) $master 1Mb 100ms DropTail$ns duplex-
> link $node(1,0) $master 1Mb 100ms DropTail$ns duplex-link $node(1,1)
> $master 1Mb 100ms DropTail
> # Define link orientation$ns duplex-link-op $node(0,0) $master orient
> rigth-up$ns duplex-link-op $node(0,1) $master orient rigth$ns duplex-link-
> op $node(1,0) $master orient rigth$ns duplex-link-op $node(1,1) $master
> orient rigth-down
> # Define a 'finish' procedureproc finish {} {global ns tracefile
> namfile$ns flush-traceclose $namfile exec nam
> position-out.nam &exit 0}
> # Stop the simulation$ns at [expr 5.0 - 0.01] "puts \"Stopping
> Simulation...\" "$ns at 5.0 "finish ; $ns halt"
> # Start the simulationputs "Starting Simulation..."$ns run
> 
> 
> 
> - Mensaje original 
> De: Javier Chicote <[EMAIL PROTECTED]>
> Para: ns-users@isi.edu
> Enviado: miércoles, 21 de marzo, 2007 11:36:06
> Asunto: ns/nam: respresentation problem when defining position-fixed nodes
> 
> Hi ns-users,
> 
> I would like to simulate a position-fixed wired network with 2 lines and 3
> nodes per line, like it is shown above. The distance between the nodes
> should be 100 units (for example), so the first node of the matrix will be
> in (x=0,y=0) and the last node in (x=100, y=200).
> 
>   

Re: [ns] ns/nam: respresentation problem when definingposition-fixed nodes (NEW question)

2007-03-21 Thread Pedro Vale Estrela


I' tried to add XY coordinates for wired nodes, but nam doesn't support this
facility.

Instead, I achieve the same result by setting the length of the wired links
via their delay

Pedro Vale Estrela
http://tagus.inesc-id.pt/~pestrela/ns2





> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Javier Chicote
> Sent: quarta-feira, 21 de Março de 2007 17:00
> To: ns-users@ISI.EDU
> Subject: Re: [ns] ns/nam: respresentation problem when definingposition-
> fixed nodes (NEW question)
> 
> 
> Hi ns-users,
> 
> I learnt that the previous problem can be "solved" by using 'orient'
> method at the link definition. However, this solution is not enough when
> defining more complex structures. The next figure shows 4 nodes standing
> in the imaginary vertexes of a square, which are all of them connected to
> a master node like it is shown in the next picture:
> 
>  node(1,0)node(1,1)
>   (0,100) (100,100)__
>  \___\__
>  \___   \_
>  \___ master
>_/(200,50)
>  _/ _/
> /  /
> (0,0)   (0,100)
>  node(0,0)   node(100,0)
> 
> ---> What I would like to know is if it is possible (or not) to define the
> geographic position of the nodes when the coordinates of them are known in
> a wired scenario, or other ideas to solve the problem.
> 
> This is the code of the file:
> 
> # Network configuration (x,y):## node(1,0)node(1,1)#  (0,100)
> (100,100)__# \___\__ # \___
> \_# \___ master#
> _/(200,50)# _/ _/#/
> /   #(0,0)   (0,100)# node(0,0)   node(100,0)#
> # Create a simulator instanceset ns [new Simulator]
> # Open the NAM trace fileset namfile [open position-out.nam w]$ns
> namtrace-all $namfile
> set rows2   ;# number of rowsset cols2
> ;# number of nodes per row
> # Define nodesfor {set i 0} {$i < $rows} {incr i} {for {set j 0}
> {$j < $cols} { incr j } {set node($i,$j) [$ns node]
> }}set master [$ns node]
> # Provide initial (X,Y,Z) co-ordinates for nodesfor {set i 0} {$i < $rows}
> {incr i} {set xj 0.0for {set j 0} {$j < $cols} { incr j }
> {$node($i,$j) set X_ $xjif {$i == 0} then
> { $node($i,$j) set Y_ 0.0} elseif {$i == 1} then {
> $node($i,$j) set Y_ 100.0 } $node($i,$j) set Z_ 0.0
> set xj [expr $xj + 200]}}$master set X_ 200.0$master set Y_
> 50.0$master set Z_ 0.0
> # Define links between nodes$ns duplex-link $node(0,0) $master 1Mb 100ms
> DropTail$ns duplex-link $node(0,1) $master 1Mb 100ms DropTail$ns duplex-
> link $node(1,0) $master 1Mb 100ms DropTail$ns duplex-link $node(1,1)
> $master 1Mb 100ms DropTail
> # Define link orientation$ns duplex-link-op $node(0,0) $master orient
> rigth-up$ns duplex-link-op $node(0,1) $master orient rigth$ns duplex-link-
> op $node(1,0) $master orient rigth$ns duplex-link-op $node(1,1) $master
> orient rigth-down
> # Define a 'finish' procedureproc finish {} {global ns tracefile
> namfile$ns flush-traceclose $namfile exec nam
> position-out.nam &exit 0}
> # Stop the simulation$ns at [expr 5.0 - 0.01] "puts \"Stopping
> Simulation...\" "$ns at 5.0 "finish ; $ns halt"
> # Start the simulationputs "Starting Simulation..."$ns run
> 
> 
> 
> - Mensaje original 
> De: Javier Chicote <[EMAIL PROTECTED]>
> Para: ns-users@isi.edu
> Enviado: miércoles, 21 de marzo, 2007 11:36:06
> Asunto: ns/nam: respresentation problem when defining position-fixed nodes
> 
> Hi ns-users,
> 
> I would like to simulate a position-fixed wired network with 2 lines and 3
> nodes per line, like it is shown above. The distance between the nodes
> should be 100 units (for example), so the first node of the matrix will be
> in (x=0,y=0) and the last node in (x=100, y=200).
> 
>  node(1,1) node(1,2)node(1,3)
>   (100,0)__(100,100)(100,200)
>   |||
>   |||
>   |||
>   |||
> (0,0)(0,100)__(0,200)
>  node(0,1) node(0,2)node(0,3)
> 
> When I do not define the links, the nodes are shown correctly in NAM
> (without lines between them), but when I make some of the link definitions
>