home › Forums › # Technical Support › fuzzylite plus NS-3
Tagged: fuzzlylite, NS-3
- This topic has 17 replies, 5 voices, and was last updated 5 years, 9 months ago by
Juan Rada-Vilela (admin).
-
AuthorPosts
-
May 1, 2014 at 08:45 #1065
Unknown
MemberHello Everyone!!
As NS-3 usually works with waf script and fuzzylite is amazing in its own way any ideas about fusing both together ?? I have been working hard on it and so far tried a lot of things!! Also this little waf script which got fuzzylite running but lost touch with NS-3 libraries.
#! /usr/bin/env python # encoding: utf-8 import os def options(opt): opt.load('compiler_cxx') def configure(conf): conf.load('compiler_cxx' ) def build(bld): obj=bld.create_ns3_program('my-fuzzy') obj.source='main.cc' obj.target='my-fuzzy' obj.includes=['/home/jashan/Downloads/fuzzylite-3.1/src/fuzzylite'] obj.lib=['fuzzylite'] obj.libpath=['/home/jashan/Downloads/fuzzylite-3.1']
Any suggestions!!
Regards Jashanjot Singh
May 2, 2014 at 09:42 #1071Juan Rada-Vilela (admin)
KeymasterHi Jashanjot,
thanks for your post and kind words. I find it very interesting your suggestion of using waf. I will definitely explore that option at some point. As for your building script, I am not familiar with waf, but I think you could be removing the default includes and libraries, for which I would suggest you do:
obj.includes=[obj.includes, '/home/jashan/Downloads/fuzzylite-3.1/src/fuzzylite'] obj.lib=[obj.lib, 'fuzzylite'] obj.libpath=[obj.libpath, '/home/jashan/Downloads/fuzzylite-3.1']
Maybe that is the reason for “losing touch” with NS-3.
-
This reply was modified 9 years, 4 months ago by
Juan Rada-Vilela (admin).
May 8, 2014 at 07:40 #1075Unknown
MemberThanx Juan Sir,
Apart from above suggestion which seems perfect as per logical reasoning I found something worth sharing. How can we add fuzzylite as a custom module in NS-3 as referred in the paper in IV section respectively. Any thoughts? However, been working lately to figure it out but found no such resource to save me some time on it and come at any conclusion. As far I used the createmodule.py script provided by NS3 to create module named fuzzylite and copied all the source files and headers files in the module structure and also mentioned all of them in the waf script but during build it is not able to find header files associated. Since fuzzylite is your beloved child hopefully it will not be that stubborn with you!! Moreover its assoiciation with NS-3 will help a wide array of researchers to use Fuzzy Logic in almost every possible research area wherever applicable.
May 8, 2014 at 16:59 #1078Juan Rada-Vilela (admin)
KeymasterHi,
To incorporate fuzzylite into any project, you need to make sure:
- you have
#include <fl/Headers.h>
in the source file where you intend to use fuzzylite - you add to your
INCLUDE_PATH
the path where fuzzylite is located such that the filefl/Headers.h
is accessible from your project working directory - you add to your
LIBRARY_PATH
the path where the binary filesfuzzylite.(dll|lib|so|dylib)
orfuzzylite-static.(lib|a)
are located - you add to your linker the name of the library
In Unix-like OSs, the command to build your project would be:
g++ your-file.cpp -Ipath/to/fuzzylite -Lpath/to/fuzzylite/lib -lfuzzylite
where
-I
refers to theINCLUDE_PATH
,-L
refers to theLIBRARY_PATH
and-l
is the name of the library.Unfortunately, I have never worked with NS-3, for which I have no idea about specifically incorporating fuzzylite into NS-3. If someone knows how, let us hope that person posts some information about it in this topic.
Cheers.
May 30, 2014 at 22:49 #1088Unknown
MemberHello Juan Sir, I am currently working on ubuntu 64 bit platform and also using fuzzylite-3.1 64 bit but still the compilation is giving the following error. However, I have also added a fuzzylite.conf in /etc/ld.so.conf.d i.e. a permanent path to libfuzzylite.so
What is the logical reasoning of this error however I also have main function within fuzzy.cc
jashan@jashanjotsingh:~/Downloads/fuzzy/model$ g++ fuzzy.cc -I/home/jashan/Downloads/fuzzylite-3.1/src/fuzzylite -L/home/jashan/Downloads/fuzzylite-3.1 -lfuzzylite
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 10
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 4 has invalid symbol index 10
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 5 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 6 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 7 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 8 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 10 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 11 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 12 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 13 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 14 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 15 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 16 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 17 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 18 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 19 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 20 has invalid symbol index 19
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o: In function `_start’:
(.text+0x20): undefined reference to `main’
collect2: ld returned 1 exit statusJune 14, 2014 at 23:48 #1104Juan Rada-Vilela (admin)
KeymasterHi,
were you able to solve your issue? I have never come across your issue, which makes me think the problem might be on fuzzy.cc rather than on fuzzylite.
June 4, 2015 at 07:20 #1846Unknown
MemberHello guys,
First of all, I wish to thank you for the amazing work you are doing through this quite interesting project of yours!
I have a question for Jashanjot, related to the use of fuzzylite along side with NS-3. Have you figured out how It would be possible to integrate the fuzzylite within an NS-3 node??
I was wondering if you wouldn’t mind giving me some hints of may be a small peace of code explaining how I wan run a simple fuzzylite example within NS-3?
Thanks in advance!!
October 31, 2015 at 16:19 #1964Unknown
MemberFirst of all, I would like to apologize for a very late reply. Yes, I have figured out how to incorporate fuzzylite with NS-3. So, if you are still in need for any help just let me know!! I hope you might have figured it out yourself since it’s been long now. 🙂
October 31, 2015 at 16:56 #1965Juan Rada-Vilela (admin)
KeymasterHi,
Thank you for your post.
I was interested mostly to have a record for future reference. If you still remember, and have the time to describe the solution, it would be fine. Otherwise, no worries.
Cheers
October 31, 2015 at 16:56 #1966Juan Rada-Vilela (admin)
KeymasterHi,
Thank you for your post.
I was interested mostly to have a record for future reference. If you still remember, and have the time to describe the solution, it would be fine. Otherwise, no worries.
Cheers
-
This reply was modified 9 years, 4 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.