Levy flight or firefly algorithm in Labview or matlab

Hello,
Has anyone used Levy flight algorithm with Labview. Is there any toolkit  or library to implement this algorithm in Labview or at least a Matlab code that can be coupled with Labview via Mathscript??
Thanks,
Zied

If you search the Web for "Levy Flight", you will find Matlab code.
Bob Schor

Similar Messages

  • Dijkstra's Algorithm in LabVIEW

    So I've attempted to undergo the painful task of trying to implement dijkstra's algorithm in LabVIEW. The problem is that I think I am going about doing this wrong, or at least not in the most efficient manner. I've attached my VI so people can take a look at it. I guess I'll also give a brief description of how I'm attempting to implement this. So the input from the user ( at this point) is three 1D arrays as well as a start and end vertex value. The three arrays are the weight values of the edges, V1, and V2. The way these arrays are filled out is so that in each array the coordinating values are all stored at the same index. So if there is a path from vertex 0 to 1, with a weight of 2 then 2 will be stored in the edge array, 0 in the V1 array, and 1 in the V2 array, and all at the same index. These values get fed into functions and the shortest path is found, yada yada yada. I'd explain it more, but I think it'll be easier if you look at the VIs. The problem is that the way I have it setup, creating a finished product to sort through even 20 vertexes would result in massive code. The VI i have is only about 25% complete I'd say, but i dont want to go any further as it is getting exponentially more complicated with each iteration and I feel there has to be a better way. So if anyone has any ideas I would greatly appreciate it!
    P.S. I realize that i can write the code in C and call it as a function in the LabVIEW program, but I'm kind of stubborn and want to make this work written solely in LabVIEW
    Attachments:
    Dijkstras.vi ‏23 KB
    Short path.vi ‏21 KB
    Short path 2.vi ‏24 KB

    Well I'm glad that there are others interested in this project. First I'd just like to give a little update. The program currently will give the length of the shortest path to the desired vertex, but it doesn't output what the path it took to get that shortest value yet. So that is what I am working on now, as well as verifying its scalability and trying to implement other features that will actually make this a useful program vs. mere curiosity. 
    As far as my references go, I've gotten all my info from the internet. Wikipedia, of course, was my starting place. I found a well explained article at http://eoinbailey.com/blog/dijkstras-algorithm-illustrated-explanation that helped me decide how I was going to try and implement the program. I also read pretty much the rest of the links that come up on google when you type in "dijkstras algorithm." Again, I have no formal CS background, Im studying engineering, so I'm working with a lot of trial and error here. My basic methodology behind all this was simply to read as much as I could, try to understand it, and then work on the program until I started getting somewhere. Maybe not the best strategy, but it works for me. Thank you also for the link, I wish I had read that before I had started this project lol
    I will post my latest version of the VI later today, This way I can get some feedback on how I can improve it and what works or doesn't work. Thanks again everyone for all ur help!

  • Perturbation & Observation algorithm using labview

    Hi
    i have a problem with the mppt (maximum power point tracking) algorithm in labview, if you know how to do it help me please

    السلام عليكم ورحمة الله وبركاته
    الرجاء طرح الأسئلة بشكل واضح و كامل وذلك للدفع بهذا المنتدى العربي إلى الأمام وبذلك تعم المنفعة للجميع.
    للإجابة على شيئ من السؤال التالي قد يفيدك
    Using NI CompactRIO to Design a Maximum Power Point Tracking Controller for Solar Energy Application...

  • Iterative signal processing algorithms in Labview

    Hi
    I am learning to program in Labview. I am trying to program an iterative algorithm in Labview and I am having difficultires. It is a short algorithm and thought that perhaps someone with Labview experience may be able to show me the way. Here I describe the algorithm:
    I have data in an I by K matrix A where i are the samples (rows) and k the variables (columns). For n number of runs, n = 1,2,...N need to compute u(subscript n) and r(subscript n) from A(subscript n-1). (Note that u is vector of length i and r is a vector of length k). Results are obatined for each run, n, iteratively by improving on estimates of u and r.
    First I need to select start values for u(subscript n) in the first iteration of the algorithm. These start values can be any one of the columns of A. Then I want to repeat the following steps (1 to 5) until convergence:
    (Note that ' represents transpositionof vector /matrix; ^ represents power)
    1. Improve estimate of r(subscript n) by:
    r(subscript n) = [u(subscript n)' u(subscript n)]^-1 u(subscript n)' A(subscript n-1)
    2. Scale length of r(subscript n) to 1.0 by:
    r(subscript n) = r(subscript n) [r(subscript n)' r(subscript n)]^0.5
    3. Improve estimate of u(subscript n) for this run by:
    u(subscript n) = A(subscript n-1) r(subscript n) [r(subscript n)' r(subscript n)]^-1
    4. Imprve estimate of tee(subscript n) by:
    tee(subscript n) = [u(subscript n)' u(subscript n)]
    5. check for convergence: if tee(subscript n) minus tee(subscript n) in the previous iteration is smaller than say e.g. 0.00001 times tee(subscript n), the method has converged for this run, if not, go to step 1.  
    The Substract the effect of this run:  A(subscript n) = A(subscript n -1) - u(subscript n) r(subscript n)'    and then go to the start for the next run.
    I have tried to do this with shift registers but the problems I am having aare to do with the start values for u and the iterative updating...
    I hope someone can help. I know that MAth script is probably the best way to do this but I don't yet have it and would like to do it in the block diagram with Labview vi for math.
    Cheers,

    for anyone trying to help me...i worked it out. Perseverance is certainly good!

  • I want to know memory manament and data display algorithm in LabViEW.Where can I get some materials about them?

    I want to know memory manament and data display algorithm in LabViEW.Where can I get some materials about them? I need them to complete my essay .Thank you for your help.

    Memory menagement:
    http://zone.ni.com/devzone/conceptd.nsf/2d17d611efb58b22862567a9006ffe76/732cec772aa4fbe586256a37005541d3?OpenDocument
    About data display: what type of data you wat display?

  • How to create a DLL for LabVIEW in MatLab

    I want to use MatLab-Code from an M-file in LabView without MatLab. So i decide to use external code in a DLL. Can anybody give me some hints - how to do? (How to create, how to use?)
    Used System Windows 98, LabVIEW 6.1, MatLab 6.1 R12.1
    Thanks

    Hi,
    I use Matlab-Code in Labview and it's don't need create a dll. The LV was a tool, matlab script, you can write your code Matlab here. see the examples of LV.I think the lV 6.1 have.
    Dll it's very complicated

  • Labview controlling Matlab

    I'm trying to get Labview 8.6 to programatically launch and run MATLAB 7.5.0.  We have routines currently written in MATLAB that interface with a third party's software to download data from some proprietary equipment.  Is there an ActiveX example or a better way to get Labview and MATLAB to talk nicely?  I've written a bare bones vi that will allow me to launch MATLAB but I keep getting an "Unexpected MATLAB operator" error when I try to use the Execute method on the MLAPP.DIMLApp Invoke Node.  I'm not even sure if this is the right approach for what I'm trying to do.
    I've searched the forums for hours and have found a couple of clues but most of the comments are to use MathScript or MATLAB Scripts and I don't think these will allow me to retain the comm functionality with the other software.  
    Ultimately, it would be nice if I could remotely launch MATLAB and run selected .m files.  I would also need to pass small amounts of data back and forth from the Labview GUI to the MATLAB back end.  Any help would be greatly appreciated!
    Larry 

    I agree, the VNC route is overkill.  What I think you should do is write a standalone LabVIEW application that reads an INI file and executes the desired M-files.  To control the program remotely over a network, simply incorporate a Remote Front Panel and webservices into theLabVIEW VI. Just go toTools --> Web Publishing Tool to add this functionality to your VI.  Also make sure that the appropriate settings are enabled in the Web Services section of Tools --> Option.  The LabVIEW help should have all the information you need to get going.
    Then what you will have is a LabVIEW executable (only LabVIEW runtime engine needs to be installed on that machine, and MatLAB of course) running on the remote machine that you can control through your web-browser on the machine you are sitting at.  Follow the links below for some more information.
    Developing Remote Front Panel LabVIEW Applications
    Web Publishing Tool Dialog Box
    Chris Bakker
    National Instruments
    Applications Engineer
    Check out LabVIEW 2009 and the New X-series DAQ!

  • How to interface LabVIEW to Matlab?

    Hallo everyone,
    I have a function written in Matlab that does some calculations, the final result which is a number should be sent to LabVIEW to do something else. I want to know what is the best method to do this, ActiveX, TCP/IP or something else. why do I need this? because both programms were developed apart from each other, but know should be connected and it would take more time to rewrite either one in another software.
    Thanks in advance!

    Ive tried but it doesnt help. My matlab code is extremely complicated its all about fuzzy logic stuff and the labview program communicates with a microcontroller to control a pump.
    to make it simple, Ive 2 programms one in Labview and the other in Matlab, i want to give the inputs of the "matlab code" in LabVIEW, then matlab code works, then the result is delivered to Labview to do sth else. does anybody have any idea how to do this or is it even possible?
    Attachments:
    pic.jpg ‏34 KB

  • Trasferire dati da Labview a Matlab e viceversa

    Buongiorno, ho iniziato da un paio di mesi ad utilizzare Labview, e per un progetto universitario mi hanno chiesto di sviluppare un software che mi permetta di trasferira dati da Matlab a Labview e da Labview a Matlab. So che le stesse analisi che posso fare in Matlab le posso fare in Labview ma mi hanno chiesto proprio un software apposta per il passaggio dei dati. Qualcuno può aiutarmi?

     How do I Transfer Data Between The MathWorks, Inc. MATLAB® Software Development Environment and LabVIEW?
    http://digital.ni.com/public.nsf/allkb/2F8ED0F588E​06BE1862565A90066E9BA?OpenDocument
    Reading TDM/TDMS Files with The MathWorks, Inc. MATLAB® Software
    http://zone.ni.com/devzone/cda/epd/p/id/5957
    Il primo documento spiega le due opzioni a tua disposizione:
    - o utilizzi il Mathscript Module per LabVIEW che ti consente di mandare in escuzione del codice MatLab, richiamandolo da LV e passandogli (o ricevendo) dati
    - o utilizzi un file di appogio nel quale scrivere i dati acquisiti, leggendoli poi da Matlab

  • Interface LabVIEW and matlab

    Hello, I want to interface LabVIEW with MATLAB using TCP/IP for data transfer. Can anyone, please give me a step-by-step instruction to how to do this? Or else can you point out where I can get them? Thanks.
    Solved!
    Go to Solution.

    Hi Sanchu,
    As TCP/IP is such a generic protocol then you should be able to fairly easily build TCP/IP interfaces for both your LabVIEW and Matlab code and transfer data using ASCII, or variants etc depending on what sort of data you are trying to transfer. I'm not too familiar with Matlab, but on the LabVIEW end there are some very good TCP/IP server and client examples that ship with LabVIEW.
    Another option that you may want to consider, and the reason I'm answering this is that I've recently done a project whereby we took some legacy Matlab code which we wanted to transpose into LabVIEW so that we could then fully automate a test system we have using TestStand. Much of it we were able to derive LabVIEW equivalent functions, but for some functions where LabVIEW didn't appear to have a suitable equivalent, or where it was simply more efficient, we simply copy and pasted the Matlab code into either in the first instance MathScript nodes (not dependant on Matlab) or Matlab script nodes (which will hopefully return to at a future date to fully transpose over to LabVIEW so that we are no longer dependant on a Matlab licence).
    In both instances the relative ease of doing this was very impressive, and we were able to wrap huge amounts of Matlab code within LabVIEW with very few issues. As an idea, have you considered wrapping your Matlab functionality in this way and then keeping all the TCP/IP client and server comms within LabVIEW?
    N.B. if you haven't found it search the palette for 'Matlab Script'
    Best of luck,
    David
    David Clark
    CLA | CTA
    CLA Design Ltd
    Hampshire, England

  • Interfacing a C++ Console Application Genetic Algorithm with LabVIEW

    Hi,
    I am have recently modified the GENESIS genetic algorithm using C++ so that it runs on a Windows machine (before it only ran under UNIX). In my experimental work the aim is to control everything using LabVIEW, including this Genetic algorithm.
    My problem comes from the fact that the Genetic Algorithm is set-up as a console application, a library file is created  containing the input parameters of the VI, then this is joined with an evaluation function that is dependant on the library file an an executable is created.
    I need to take some information collected from LabVIEW and give it to the genetic algorithm, but I don't know how to do this.
    Any Ideas?
    Thanks
    Alan Homer

    You can run most applications from a command line using the location/application.exe (where the location is where the executable is stored), all c++ applications run using:   int main (int argc, char **argv); where the argc is the number of arguments and argv is essentially a string table with the parameters passed to the program (will be used as code) the output if a command line application is the std out which can be piped to file or wired out from the standard out terminal.  To pass parameters from your LV code to the command line you should know the parameter list (sometimes empty). 
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Genetic Algorithms in Labview

    I'd like to implement some diagnostic applications in Labview, using
    genetic algorithms and fuzzy logic. Anyone can give me some guidelines
    to do this?
    Best Regards,
    Sérgio Cruz

    wrote:
    > I'd like to implement some diagnostic applications in Labview, using
    > genetic algorithms and fuzzy logic. Anyone can give me some guidelines
    > to do this?
    >
    I have implemented a genetic algorithm based control of a mobile robot
    using Mathematica Link for LabVIEW http://www.e-notebooks.com/products/
    link/. LabVIEW is in charge of communication with the robot, Mathematica
    was more suitable to implement the GA. I can provide with more details if
    you wish.
    Jean.
    e-NoteBooks Ltd
    http://www.e-notebooks.com
    http://www.sstreams.com
    Sent via Deja.com http://www.deja.com/
    Before you buy.

  • Error in Calling a dll built in labview from Matlab standalone

    hello,
    The problem I encountered is in the use of the math interface toolkit. I
    created a dll which performs data fitting using a labview vi which i converted into a dll using the
    math interface toolkit.
    This dll is then called from a standalone matlab program. It works fine in the computer where I
    create the matlab standalone program and labview dll. Howerver when i export to another
    computer the matlab part runs fine but an error is reported when it tries to
    call the labview created dll.
    "One or more output arguments not assigned during call Parfit.dll"
    The files related to this problem in the math interface toolkit (the labview vi, the corresponding dll and the matlab .m and .fig files and the standalone exe are in the attachment and named MathITproblem.zip
    The matlab run time engine(for matlab 7) and labview runtime engine(ver 7.1) must be installed for this matlab file to run. the run time engines are downloadable from the web.
    Does any one know the source of this error or encountered it before?
    thanks
    Attachments:
    MathITproblem.zip ‏1263 KB

    Hi Srinivas,
    Just another note, I noticed that the Math Interface Toolkit version (MIT) 1.0 is not compatible with LabVIEW 7.1. You’ll need version 1.0.1. of the MIT toolkit in order for it to work with LabVIEW 7.1.
    The LabVIEW 7.0 lvanlys.dll is also attached. I had to rename it with a .txt extension, so you’ll want to delete the extension.
    Kileen
    Attachments:
    lvanlys.dll.txt ‏516 KB

  • How do i pass a daqmx task from labview to matlab using the math interface toolkit?

    I want to use DAQMX functions from Matlab using the Math Interface Toolkit (MIT). How can I have a labview function output (return) the DAQMX task to matlab via the MIT?
    I want to do this so I can start a DAQMX task in Labview from a matlab function and return control to matlab without losing the task.

    Hi Mark,
    (I already posted this answer in your other thread, but let's keep THIS thread alive - it makes more sense here in the LabVIEW forum than in Instrument Control forum.)
    Since the DAQmx Task is not a native data type that can be passed directly to MATLAB from LAbVIEW, try flattening the DAQmx Task to a string before passing to MATLAB. However, I doubt that you can access the task from within MATLAB, but feel free to give it a try.
    Good luck!
    - Philip Courtois, Thinkbot Solutions

  • Same code gives different results in Matlab Script in Labview and Matlab

    I am implemeting a Matlab code into a LabVIEW application using Matlab script. When I import the exactly same code to the Matlab Script in LabVIEW it gives a different result than it is in Matlab. This code is a simulation code including first kind bessel functions. Using LabVIEW 7.1 and Matlab R14 service pack 3.

    Labview 8.5
    Matlab R2009b
    Attached are the graphs produced by matlab script in labview and in matlab.
    The minimum of graph produced by matlab code is below 1 and that in labview is above 1.
    Thanks a lot for your reply.
    Sorry, I haven't quantified the "sometimes" yet. 
    Attachments:
    matlabsResult.jpg ‏29 KB
    LV.png ‏84 KB

Maybe you are looking for