home Forums # Technical Support fuzzylite plus NS-3

Tagged: ,

Viewing 10 posts - 1 through 10 (of 18 total)
  • Author
    Posts
  • #1065
    Unknown
    Member

    Hello 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

    #1071

    Hi 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.

    #1075
    Unknown
    Member

    Thanx 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.

    • This reply was modified 8 years, 6 months ago by Unknown.
    • This reply was modified 8 years, 6 months ago by Unknown.
    #1078

    Hi,

    To incorporate fuzzylite into any project, you need to make sure:

    1. you have #include <fl/Headers.h> in the source file where you intend to use fuzzylite
    2. you add to your INCLUDE_PATH the path where fuzzylite is located such that the file fl/Headers.h is accessible from your project working directory
    3. you add to your LIBRARY_PATH the path where the binary files fuzzylite.(dll|lib|so|dylib) or fuzzylite-static.(lib|a) are located
    4. 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 the INCLUDE_PATH, -L refers to the LIBRARY_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.

    #1088
    Unknown
    Member

    Hello 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 status

    #1104

    Hi,

    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.

    #1846
    Unknown
    Member

    Hello 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!!

    #1964
    Unknown
    Member

    First 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. 🙂

    #1965

    Hi,

    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

    #1966

    Hi,

    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

Viewing 10 posts - 1 through 10 (of 18 total)
  • You must be logged in to reply to this topic.