LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-25-2015, 11:47 AM   #1
Rizwanamalek
Member
 
Registered: Jan 2015
Posts: 56

Rep: Reputation: Disabled
How to apply K-means algorithm


I have .c and .h file for k-means algo. I want to apply it to leach protocol so in which file i have to apply it. I have installed ns2.34 .
 
Old 02-25-2015, 01:59 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
To do this I believe you need to start by not just installing but instead building from source and then installing. And from that point there are tutorials which help you make new network simulation scenarios or add new network components, there are examples of how to do this in the tutorials.

Download NS-2 Source and Compile
Mark Greis' Tutorial
WPI's NS by Example
 
1 members found this post helpful.
Old 02-25-2015, 03:18 PM   #3
Rizwanamalek
Member
 
Registered: Jan 2015
Posts: 56

Original Poster
Rep: Reputation: Disabled
sir mean to say that i have to create new network simulator?
 
Old 02-26-2015, 06:30 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
I believe you need to familiarize yourself with how to create a new network component that suits your needs and then run it under the frameworks. Some examples are shown in the links provided especially in the NS by Example one.
 
1 members found this post helpful.
Old 03-02-2015, 05:50 AM   #5
Rizwanamalek
Member
 
Registered: Jan 2015
Posts: 56

Original Poster
Rep: Reputation: Disabled
Sir please give me some detail description for k-means implemenation on leach protocol in ns2.34.I have read all the releted link given post #2. So i have still confusion that ,based on these i have to linking otcl and c++? I have to create wireless scenario, nodes,links,agents, Traffic etc component? Please give me some hint. I have found k-mean algo with header and class file.
Attached Files
File Type: pdf kmeans1.pdf (100.8 KB, 61 views)
File Type: pdf kmeans.pdf (162.1 KB, 53 views)
 
Old 03-02-2015, 12:14 PM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
You're asking a very large topic. Yes it involves designing a simulation and creating network elements to match what you require. People aren't going to just do this task for you. Someone may have something ready or a reference which fits very well, and if so they'll consider posting it.

Creating multiple question threads with the same question will not help you accomplish this task.

Using your own effort, learn how to create a simulation and add new network elements, then try to create the specific simulation and elements to match what you're looking for. If/When you get stuck, post a summary of your efforts and then likely someone will be able to provide you some further guidance. Asking in repetition without showing that you've even attempted this task does not help. If you can't even get started, then post where you get stuck and ask for help getting started.
 
Old 03-20-2015, 04:00 AM   #7
Rizwanamalek
Member
 
Registered: Jan 2015
Posts: 56

Original Poster
Rep: Reputation: Disabled
Sir ,From studied the above link i have created one .tcl file for the k-means algo. And i have to configure nodes.For this what i have to do?
 
Old 04-13-2016, 07:48 AM   #8
haitam09
Member
 
Registered: Jan 2015
Posts: 30

Rep: Reputation: Disabled
apply Kmeans algorithm to leach or leach-c protocol?

Hi ,
I would like to apply k means algorithm in a hierarchical WSN protocol. What do you advise me to apply it to leach or leach-c protocol?
Thanks for your help

Best regards
 
  


Reply

Tags
k-means, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to apply K-means algorithm Rizwanamalek Linux - Networking 1 02-26-2015 12:17 PM
help with an algorithm Calin956 Programming 6 01-15-2012 07:27 AM
token bucket algorithm vs Leaky bucket algorithm xeon123 Linux - Networking 2 03-26-2007 04:57 AM
hash algorithm scanner Programming 17 07-18-2006 08:08 AM
Which sorting algorithm? nodger Programming 6 01-28-2005 06:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration