Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: help for simulation code

  1. #1
    DeSiGneR is offline Newbie
    Join Date
    Oct 2008
    Posts
    5
    Rep Power
    0

    help for simulation code

    Hi there...

    I try to write a program to simulate a wireless network WLAN

    Let us suppose that the network consists of 5 nodes (A to E) and the simulation time is 300 seconds.

    Also, let us assume the algorithm used as follow: when a node intents to send, it checks the receiver status. If it is a free which means it does not receive or send data from another node, the node starts transmission. If not it delay for a while then try a gain.

    let's take the simple scenario:

    at T=2 (second no. 2) node A starts sending to B.

    at T=3, node C want to send to B. It will check the receiver status and then find the node B is busy. So, it will defer the transmission for a period of time then start a gain.

    My question is: I want a way to pick up a transmitter and receiver randomly during simulation time.

    for example, at t=4 A sends to C
    at t=4.5 D sends to B and so on.

    Thank you very much in advance.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,489
    Blog Entries
    75
    Rep Power
    143

    Re: help for simulation code

    It sounds like you'll need a random number generator.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    DeSiGneR is offline Newbie
    Join Date
    Oct 2008
    Posts
    5
    Rep Power
    0

    Re: help for simulation code

    Not exact..

    I have one... but I don't know how can I use it?!!

  5. #4
    Steve.L's Avatar
    Steve.L is offline Programming Expert
    Join Date
    Sep 2008
    Location
    Ottawa,ON
    Posts
    445
    Rep Power
    15

    Re: help for simulation code

    Then you need to RTFM.

  6. #5
    Join Date
    Jul 2006
    Posts
    16,489
    Blog Entries
    75
    Rep Power
    143

    Re: help for simulation code

    Are you asking how to use a random number generator, or how to use it to solve your problem?
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  7. #6
    DeSiGneR is offline Newbie
    Join Date
    Oct 2008
    Posts
    5
    Rep Power
    0

    Re: help for simulation code

    I am asking how to use it to solve your problem?!!

  8. #7
    Join Date
    Jul 2006
    Posts
    16,489
    Blog Entries
    75
    Rep Power
    143

    Re: help for simulation code

    You will need a list of inactive nodes. Count those nodes and generate a random number between 1 and n (the number of inactive nodes). That node becomes the new transmitter.

    Next you will need a list of all the nodes except the transmitter. Generate another random number between 1 and m (the number of other nodes). That node becomes the new desired receiver.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  9. #8
    Join Date
    Jul 2006
    Posts
    16,489
    Blog Entries
    75
    Rep Power
    143

    Re: help for simulation code

    You will need a list of inactive nodes. Count those nodes and generate a random number between 1 and n (the number of inactive nodes). That node becomes the new transmitter.

    Next you will need a list of all the nodes except the transmitter. Generate another random number between 1 and m (the number of other nodes). That node becomes the new desired receiver.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  10. #9
    DeSiGneR is offline Newbie
    Join Date
    Oct 2008
    Posts
    5
    Rep Power
    0

    Re: help for simulation code

    Ok ... but that means I simulate one transmission (between one transmitter and one receiver) .

    what about the others nodes? Are they still inactive ?!!

    I want simulate a number of transmitter and receivers at the same time

  11. #10
    Join Date
    Jul 2006
    Posts
    16,489
    Blog Entries
    75
    Rep Power
    143

    Re: help for simulation code

    How many are going to be starting at any given second? You will need to model which ones are busy, of course.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Simulation
    By rapidcybey in forum Java Help
    Replies: 4
    Last Post: 08-28-2011, 01:55 PM
  2. help in simulation
    By swa in forum Computer Software/OS
    Replies: 3
    Last Post: 04-24-2011, 01:48 PM
  3. wa-to simulation
    By rhouzer in forum C and C++
    Replies: 1
    Last Post: 12-16-2009, 06:30 PM
  4. Rally Simulation
    By TcM in forum Technology Ramble
    Replies: 4
    Last Post: 06-11-2008, 08:07 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts