[ns] segmentation fault when increase number of nodes

2012-04-19 Thread CHALIDA

Hello,
I've change code in c++,everything is run normal but when i increase number
of nodes,it state "segmentation fault".Can anyone tell me what is the cause
of this error?

Kindly Regards,
chalida


[ns] how to set Pt_consume in wireless-phy.cc

2012-04-15 Thread CHALIDA

Dear all,
Can anyone tell me how to what's the difference between Pt_ and Pt_consume
in wireless-phy.cc under mac folder and how to change these two value.

Best Regards,
chalida


Re: [ns] change transmission power in ns

2012-04-15 Thread CHALIDA

How to set related parameter correctly?Please kindly help

Best Regards

On Wed, Apr 11, 2012 at 7:00 PM, CHALIDA  wrote:

> Dear all,
> do you know how to change an tranmitted power in ns2?If i change it,any
> other parameters have to change also i.e range threshold?
>
> Best Regards
> chalida
>
>


[ns] Floating exception

2012-04-13 Thread CHALIDA

*Dear all,*
*I have edit some path in routing protocol and when i run tcl scrip,it give
this error "Floating exception".It happen only when I use more number of
nodes i.e.40-50 but it can run normal when use 20 nodes.Could anyone tell
me how to trace where is this error?*
*
*
*Best Regards*
*chalida*


[ns] elect a route in multiple interface

2012-04-12 Thread CHALIDA

Dear all,
Can you give me some example how to select a route for multiple interface
in ns?

Best Regards
Chalida


[ns] printing routing table on file

2012-03-07 Thread CHALIDA

Dear All,
Could you guide me how to change sprintf to print and keep in file
instead.I try to chabge but it's not work.

OLSR::command(int argc, const char*const* argv) {
.

else if (strcasecmp(argv[1], "print_rtable") == 0) {

if (logtarget_ != NULL) {

sprintf(logtarget_->pt_->buffer(), "P %f _%d_ Routing Table",

CURRENT_TIME,

OLSR::node_id(ra_addr()));

logtarget_->pt_->dump();

rtable_.print(logtarget_);

}

void

OLSR_rtable::print(Trace* out) {

sprintf(out->pt_->buffer(), "P\tdest\tnext\tiface\tdist");

out->pt_->dump();

for (rtable_t::iterator it = rt_.begin(); it != rt_.end(); it++) {

OLSR_rt_entry* entry = (*it).second;

sprintf(out->pt_->buffer(), "P\t%d\t%d\t%d\t%d",

OLSR::node_id(entry->dest_addr()),

OLSR::node_id(entry->next_addr()),

OLSR::node_id(entry->iface_addr()),

entry->dist());

out->pt_->dump();

}
}


Best Regards,
chalida


[ns] configure node for heterogeneous technologies in ns2

2012-02-28 Thread CHALIDA

Dear all,
Can anyone tell me how to configure node to support multiple interface i.e
wifi and wimax and let node select which interface they will forward a
packet? What is a necessarily configulation(patch,installation,file,..)

Best Regards,
Chalida


[ns] time series prediction

2012-02-20 Thread CHALIDA

Dear all,
Could anyone tell me how to predict a future value from a time series in
ns2? how to modify a code?


Best Regards,
Chalida


[ns] configure olsr for multiple interface

2012-02-18 Thread CHALIDA

Dear all,
Could someone tell me how to configure olsr protocol for multiple
interface?I understand that a configuration has to deal with mid message
but I don't know which part that I need to modify in olsr.cc.I'm not
familiar with c++ programming.


Best Regards
Chalida


[ns] wimax patch

2012-02-17 Thread CHALIDA

Dear all,
Can someone provide me a wimax patch for ns2.34 that can install successful?

Regards,


[ns] energy model in ns2

2012-02-07 Thread CHALIDA

Dear all,
Could someone tell me how to add energy model for new format of trace
file,I have an example to add the model in tcl script like
 set opt(energymodel)EnergyModel ;
set opt(radiomodel) RadioModel ;
set opt(initialenergy)  1000;# Initial energy in Joules

-energyModel $opt(energymodel) \
 -idlePower 1.0 \
 -rxPower 1.0 \
 -txPower 1.0 \
   -sleepPower 0.001 \
   -transitionPower 0.2 \
   -transitionTime 0.005 \
 -initialEnergy $opt(initialenergy)

but when i add it for olsr protocol is not work.

Normally the trace file using new trace will get sth like this

s -t 0.000169789 -Hs 0 -Hd -1 -Ni 0 -Nx 333.43 -Ny 322.49 -Nz 0.00 -Ne
> -1.00 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.255 -Id -1.255 -It
> OLSR -Il 48 -If 0 -Ii 0 -Iv 32 -P olsr -Pn 1 -Ps 0 [-Pt HELLO -Po 0 -Ph 0
> -Pms 0]


when adding that model.The trace file change to

s 0.044156336 _1_ MAC  --- 1 OLSR 106 [0  1 800] [energy
> 1000.00 ei 0.000 es 0.000 et 0.000 er 0.000] --- [1:255 -1:255 32
> 0] [1 0 [HELLO 1 0 0]]
> N -t 0.044157 -n 12 -e 999.954995


where  ei=energy of idle (joules)

es=energy of sense

et = energy of transmitting and

er=energy of receive


if i configure to use new trace,it got

> s -t 0.000169789 -Hs 0 -Hd -1 -Ni 0 -Nx 37.09 -Ny 422.33 -Nz 0.00 -Ne
> 1000.00 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.255 -Id -1.255
> -It OLSR -Il 48 -If 0 -Ii 0 -Iv 32 -P olsr -Pn 1 -Ps 0 [-Pt HELLO -Po 0 -Ph
> 0 -Pms 0]
> N -t 0.000545 -n 15 -e 999.998607


I understand that  -Ne field is when the node send/receive some data and
 -e is some time after when the node doesn't exchange data.



Best Regards,
Chalida


[ns] how to measure energy consumption

2011-12-27 Thread CHALIDA

Dear everyone,
i've load an example for measuring energy comsumption but i'm wondering
about a trace file.what dose it means when the trace state
"s -t 0.182646019 -Hs 3 -Hd -1 -Ni 3 -Nx 342.85 -Ny 419.96 -Nz 0.00 -Ne
19.998848 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 3.255 -Id -1.255 -It
message -Il 32 -If 0 -Ii 2 -Iv 32
and
N -t 0.182961 -n 1 -e 19.998848"
what the different between this two line value,

Another thing is the value getting from this tcl is it a comption in
sending and receiving per link or not?

thank you

Best Regards
Chalida


[ns] residual energy

2011-11-27 Thread CHALIDA

Hello,
Any one know how to find a residual energy left for each node in network
using awk?D i need to add energy model in tcl script to find it?

Regards,
Chalida


Re: [ns] urgently need help on tcl&awk file

2011-11-24 Thread CHALIDA SRIPRECHANUN

I'm not sure that do i need to attach evry node with agent or only a source
and destination only.
best regards,
Chalida



On Thu, Nov 24, 2011 at 9:19 PM, CHALIDA SRIPRECHANUN
wrote:

> Hello
> I'm a new user of ns2 and I need your guys help on it.I'd like to define
> topology from 5 node in olsr,aodv,dsdv protocol and compare performance
> i.e. throughput,delay.However the result it really strange as it show
> throughput=-0.06 and delat parameter of those three file are almost the
> same.I;m not sure what did i do wrong.Can you help me solve this problem?
>
> best regards,
> Chalida
>


[ns] urgently need help on tcl&awk file

2011-11-24 Thread CHALIDA SRIPRECHANUN

Hello
I'm a new user of ns2 and I need your guys help on it.I'd like to define
topology from 5 node in olsr,aodv,dsdv protocol and compare performance
i.e. throughput,delay.However the result it really strange as it show
throughput=-0.06 and delat parameter of those three file are almost the
same.I;m not sure what did i do wrong.Can you help me solve this problem?

best regards,
Chalida