From: Gary P. <gpa...@gm...> - 2009-02-02 17:31:37
|
Hi, The email server was down for the weekend, some maintenance required the servers to be powered off. I'm still looking at the question regarding the dimension instead of the i-th dimension. I'll need to find that paper describing the process again just to double check. Yeah, that is correct. Strictly speaking though, the comparison should be done with Double.compare(). I'm currently working on the Type system and doing a large refactor to make the API a little simpler to use. I'll make sure this is corrected. Regards, Gary lab...@gm... wrote: > Also, I think that to handle mutation for a bit vector, the setReal > method in Bit.java should be: > > public void setReal(double value) { > if (value <= 0.5) > this.state = false; > else this.state = true; > > } > > instead of > public void setReal(double value) { > if (value == 0.0) > this.state = false; > else this.state = true; > > } > Do you agree? > > > On Jan 30, 2009 10:52am, lab...@gm... wrote: > > Yes, that works but it seems to me that there is a bug in the > dimension that is set. Shouldn't it be: > > position.setReal(dimension,tmp) instead of position.setReal(i,tmp) in > the mutate(particle) function. Do you agree? > > TIA. > > > > On Jan 30, 2009 8:23am, Gary Pampara gpa...@gm...> wrote: > > > Patch attached. > > > > > > > > > > > > I've had no means to test it and the change is very small. Please > let me know if it works. From the looks of the error, this should solve it. > > > > > > > > > > > > I've committed the patch to the master branch already. > > > > > > > > > > > > Regards, > > > > > > Gary > > > > > > > > > > > > Gary Pampara wrote: > > > > > > > > > Sure thing. > > > > > > > > > > > > I'll post the patch once it's done. Should be a very minor change. > > > > > > > > > > > > Regards, > > > > > > Gary > > > > > > > > > > > > lab...@gm... wrote: > > > > > > > > > Hello, > > > > > > > > > > > > If the patch for this problem could be posted on the mailing list, > I could update my local version before waiting for the new version. TIA. > > > > > > > > > > > > > > > > > > On Jan 29, 2009 11:09am, Gary Pampara gpa...@gm...> wrote: > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > > > > > > > Yes, this is definitely a bug. It should work for Ints as well. > I'll post a patch for a correction to this issue in a while. > > > > > > > > > > > > > > > > > > > > > > > > > > > > We are currently refactoring quite a bit in the library to make > various operations / usage issues better, as well as a major update to > the Javadoc. I'll just need to create a branch to apply the fix. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Would you like the patch posted on the mailing list, or a direct > email? This will then also be included in the next release. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for raising this :) > > > > > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > > > Gary > > > > > > > > > > > > > > > > > > > > > > > > > > > > myriam abramson wrote: > > > > > > > > > > > > > > > > > > > > > Hello, > > > > > > > > > > > > > > I am trying to evolve integers for an allocation problem, > Z(0,20)^10, and I tried to specific MutationPositionUpdateStrategy but > unfortunately it does not seem to work for integers. See trace below. Is > there a rational for that that I'm missing? I was thinking that instead > of evolving a position by incremental velocity changes, mutation would > sometimes just produce a new integer. Please let me know if that makes > sense. It wouldn't be too hard to implement it on my end. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Exception in thread "main" java.lang.ClassCastException: > net.sourceforge.cilib.type.types.Int > http://net.sourceforge.cilib.type.types.Int> cannot be cast to > net.sourceforge.cilib.type.types.Real > > > > > > > > > > > > > > at > net.sourceforge.cilib.pso.positionupdatestrategies.MutationPositionUpdateStrategy.mutate(MutationPositionUpdateStrategy.java:141) > > > > > > > > > > > > > > at > net.sourceforge.cilib.pso.positionupdatestrategies.MutationPositionUpdateStrategy.updatePosition(MutationPositionUpdateStrategy.java:118) > > > > > > > > > > > > > > at > net.sourceforge.cilib.pso.particle.StandardParticle.updatePosition(StandardParticle.java:156) > > > > > > > > > > > > > > at > net.sourceforge.cilib.pso.iterationstrategies.SynchronousIterationStrategy.performIteration(SynchronousIterationStrategy.java:70) > > > > > > > > > > > > > > at > net.sourceforge.cilib.pso.iterationstrategies.SynchronousIterationStrategy.performIteration(SynchronousIterationStrategy.java:36) > > > > > > > > > > > > > > at net.sourceforge.cilib.pso.PSO.algorithmIteration(PSO.java:125) > > > > > > > > > > > > > > at > net.sourceforge.cilib.algorithm.Algorithm.performIteration(Algorithm.java:140) > > > > > > > > > > > > > > at > net.sourceforge.cilib.algorithm.Algorithm.run(Algorithm.java:182) > > > > > > > > > > > > > > at > mil.navy.nrl.optimization.route.RoutePlanning.run(RoutePlanning.java:142) > > > > > > > > > > > > > > at > mil.navy.nrl.optimization.route.RoutePlanning.main(RoutePlanning.java:192) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > > > > > > > > > > This SF.net email is sponsored by: > > > > > > > > > > > > > > SourcForge Community > > > > > > > > > > > > > > SourceForge wants to tell your story. > > > > > > > > > > > > > > http://p.sf.net/sfu/sf-spreadtheword > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > > > > > Cilib-users mailing list > > > > > > > > > > > > > > Cil...@li... > > > > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/cilib-users > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > > This SF.net email is sponsored by: > > > > > > SourcForge Community > > > > > > SourceForge wants to tell your story. > > > > > > http://p.sf.net/sfu/sf-spreadtheword > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > > > > > > > _______________________________________________ > > > > > > Cilib-users mailing list > > > > > > Cil...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/cilib-users > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > > This SF.net email is sponsored by: > > > > > > SourcForge Community > > > > > > SourceForge wants to tell your story. > > > > > > http://p.sf.net/sfu/sf-spreadtheword > > > > > > _______________________________________________ > > > > > > Cilib-users mailing list > > > > > > Cil...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/cilib-users > > > > > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > > > ------------------------------------------------------------------------ > > _______________________________________________ > Cilib-users mailing list > Cil...@li... > https://lists.sourceforge.net/lists/listinfo/cilib-users |