From: Gary P. <gpa...@cs...> - 2008-05-19 06:31:44
|
Hi David, Calling the Java code from C# shouldn't be too much of a problem. Now for the search space: CIlib has the search space defined on the problem on which the algorithm executes. We use a notion of a "Domain String" to define the search space for the algorithm execution. For example, looking at the following problem definition as defined using XML: <problem id="spherical" class="problem.FunctionMinimisationProblem"> <function class="functions.continuous.Spherical" domain="R(-500, 500)^30" /> </problem> This states that the problem for the algorithm should be a FunctionMinimisationProblem with the Spherical function to be minimised. The crux here is the attribute domain="R(-500,500)^30" which specifies that the Spherical function has a search space defined in Real (continuous) space with a lower bound of -500 and upper bound of 500. The trailing ^30 means that the search space must be 30 dimensional, with each dimension defined to be within (-500,500). Programmatically, it is very similar. As you set up the algorithm with code, you will set the domain in a very similar manner. On the Spherical function there is a setDomain(String) method defined. You'll simply call sphericalInstance.setDomain("R(-500,500)^30") to achieve the same as the above XML example. For your own OptimisationProblem, you need not define the DataSet. It's merely there in case it is needed. You do not need to implement a DataSet. Most of the predefined Problem objects do not use a DataSet. I hope this helps :) Shout if we can help more. Regards, Gary PS: I know the documentation is a little lacking. We are currently working on the documentation to correct this issue. > Hi, > > I am new to CILib and am looking to call it from existing code (C#). In my > code I have the search domain (minmax values) already configured in a > collection (which includes some other parameters). Looking at the readme > on > using cilib in code it doesn't seem clear how the user can / should > specify > the search space. Some clarification on how I should approach passing my > search space to the algorithm will be appreciated. > > > > Also, will CILib bark if, in my custom OptimizationProblem, I leave the > dataset empty? As I plan to implement this, my fitness function will > understand the data domain and feedback to the algorithm based on it's > search of the parameter space. The way CILib seems to be written it > expects > the user to pass the test data into it. > > > > Any help / guidance offered will be warmly appreciated. > > > > > > Regards, > > David > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________ > Cilib-users mailing list > Cil...@li... > https://lists.sourceforge.net/lists/listinfo/cilib-users > |