Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/23/2011 in all areas

  1. Name: Waptia - genetic optimization algorithm Submitter: vugie Submitted: 10 Sep 2009 File Updated: 23 Jan 2011 Category: General LabVIEW Version: 8.2 License Type: BSD (Most common) Waptia - genetic optimization algorithm Copyright © 2009, Wojciech Golebiowski All rights reserved. Author: Wojciech Golebiowski (w_golebiowski (at) tlen.pl) Name: Waptia - genetic optimization algorithm Type: library LabVIEW version: 8.2 Distribution: This code was downloaded from: http://www.lavag.org Description: Waptia is general genetic optimization algorithm - it tries to maximize user supplied function of N variables (so called "Fitness Function"). Function is given as strictly typed VI reference. So the optimization goal may be described as: find such set of N numbers for which Fitness Function value is highest. Waptia is LabVIEW implementation of quite well known genetic optimization algorithm Pikaia by Paul Charbonneau & Barry Knapp developed in Fortran-77. For more information on Pikaia and some background informatio on genetic algorithms visit: http://www.hao.ucar....kaia/pikaia.php Pikaia name comes from lancelet-like creature which lived ages ago in Cambrian sea and waptia was another Cambrian being. Original Pikaia was developed for educational purposes, but it grew up and became widely used routine. Waptia is almost 1:1 conversion of Pikaia code (which is public domain) to LabVIEW - parts of original Fortran code are placed in related VIs - with some cosmetic modifications and improvements. Although Waptia already does real job I treat this code as starting point for further development to create sophisticated, but still easy to use genetic algorithm. Here are Waptia's core features: - decimal genotype encoding - two-point crossover operator - optional dynamically adjustable mutation rate - optional "creep" (smoothly changing) mutation mode - three possible reproduction plans - elitism - optionally stops optimization when fitness criterion is satisfied - optimization progress may be traced on-line with notifiers Usage is very simple - just put Waptia.vi on block diagram and provide number of independent variables and fitness function VI reference (which may be created using included template). There is of course a lot of parameters to tune, but default set usually does good job. Installation Preferably install VIP package with VI Package Manager Alternatively extract ZIP to User.lib. There are no external dependencies. Documentation Documentation is provided in "Waptia docs.rtf" file. It's just a description of all controls of Waptia.vi with some background information. Same information may be found in context help. Information on how to write your own fitness function is provided as comments in "Fitness Function Template.vit" If you want to understand how Waptia works, whole code is extensively commented. Examples There is one quite complex example (but I hope that still understandable) located in _examples folder - "multimodal optimise.vi" If you want any support on general or specifically genetic optimization problems, just contact me. License (BSD): Copyright © 2009 Wojciech Golebiowski All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Click here to download this file
    1 point
  2. And if you're looking to use the complex numeric data type instead of keeping the real/imaginary components separate, then use a Re/Im To Complex function instead of a Build Array in hooovahh's instructions above. -D
    1 point
  3. I would use the Spreadsheet String to Array function converting the whole thing to a 1D array using the comma character as a delimiter. I'd then remove white space from each element in the array from the front and back. This will give you a 1D array, where every even index is real, every odd index is imaginary. Then you can use the Decimate 1D Array function getting a 1D array of real, and 1D array of imaginary. Then you can take these two 1D arrays, and make a 2D array (using Build Array) which will make a 2D array with two columns (or two rows using transpose 2D array). Hope this helps.
    1 point
  4. Benchmarked in 7.1.: 1 million iterations straight wire through 186 ms error case structure 306 ms so the case structure costs about 120 ns. Hey, just checked without any wire (so a clear error vi). 424 ms! So this is most likely slower due to the buffer reuse in above cases. Test in newer version: takes more than 500ms and the difference between straight wire and error case struct is almost gone. Felix
    1 point
  5. So I whipped up a little table that correlates the locations from 'Get System Directory.vi' and the Windows Installer variables (used with the built-in install builder) with Windows XP and Windows 7. None of the locations that you can easily get to via Get System Directory and Windows Installer are appropriate for a machine-wide config file. If you create the config file at run time instead of installing it, the Public Documents tag for Get System Directory will work. You can avoid having them show up in each users' My Documents folder by stripping "Documents" and appending "AppData\MyApp\MyApp.ini." It's not ideal, but it's workable. Windows 7 has a %PUBLIC% environment variable that maps directly to Users\Public, but that variable doesn't exist in XP so it's not much help with cross-os compatibility.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.