Dear all Thanks your response, I try the code you writed, but it also can't work.... the trace file is all empty, and nothing to run... I tried another way set node_(0) [$ns_ node] $ns_ at 20.0 [set node_(1) [$ns_ node]]
there are something in trace file, but it stop in 19.xxx sec(my stop time is 300sec...) so...it seems has some troubles in the way....... I really don't know why~~~ ------------------------------------------------------ Subject: Re: [ns] How to start the node at appointed time..... Hi. try this $ns_ at 10.0 [set node_(0) [$ns_ node]] yahia On Mon, 2006-03-06 at 17:40 +0800, Yung-Ling Yu wrote: > Assuming I have three wireless node, I want to set > Node0 power ON at 10s (in other words, deploying in network) > Node1 power ON at 20s > Node2 power ON at 30s > > But I've tried it in TCL code and its seems that it can't support a = > function like this. > > $ns_ at 10.0 "set node_(0) [$ns_ node]" > $ns_ at 20.0 "set node_(1) [$ns_ node]" > $ns_ at 30.0 "set node_(2) [$ns_ node]" > > Results were that it failed, because it needs to set node's location in = > the following code > > $node_(0) set X_ 800.0 > > it said node_(0) undefined, so it failed... > > > Finally, I use the command posted few day ago > > $ns at 10.0 "$node(0) start" > $ns at 20.0 "$node(1) start" > $ns at 30.0 "$node(2) start" > > it also failed... in the trace file.....other nodes(node1, node2) also > active at begging.. > s 17.677000000 _1_ MAC --- 0 mac 9 [0 9000000 100 200] [energy > 1000.000000] ------- [0:0 0:0 0 0] > N -t 17.677001 -n 0 -e 999.204400 > N -t 17.677001 -n 2 -e 999.204400 > > WHY??WHY??WHY?? > > Are there any "special" commands to support this function? > And in "node -config", there's nothing supporting this function. > I'm kind of confused, please, anyone, tell me how can I do it, Thank you = > very much!! > > Yung-Ling Yu