constraint based jgap

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

constraint based jgap

Naeem Shakir
sir my code is like this

        Configuration conf=new DefaultConfiguration();
        
    FitnessFunction fun=new func();
    conf.setFitnessFunction(fun);
    Gene [] gene=new Gene[8];
  gene[0]=new DoubleGene(conf,85,setRange(0.928,0.91,0.0,400)); //makeup gene
    gene[1]=new DoubleGene(conf,307,320);//recycle
     gene[2]=new DoubleGene(conf,90,setRange(0.876,0.85,0.0,600));//makeup gene
    gene[3]=new DoubleGene(conf,455,470);//recycle
    gene[4]=new DoubleGene(conf,11,15);//makeup gene
    gene[5]=new DoubleGene(conf,187,200);//recycle
    gene[6]=new DoubleGene(conf,40,50);//makeup gene
    gene[7]=new DoubleGene(conf,187,200)//recycle;
  
Sir when i set lower bound like above it satisfy the equcation below,but when i set lower bound to 0 equation is not satisfied.Search space is increased.please help me to find out result in search space.


        Chromosome sampleChromosome = new Chromosome(conf, gene );
        conf.setSampleChromosome(sampleChromosome);    
                conf.setPopulationSize( 400 );
        return Genotype.randomInitialGenotype( conf );
   
   }
   public double setRange(double sinkPurity,double sourcePurity,double fuel,double inputFlow){
       double makeUp;
       makeUp=((inputFlow*sinkPurity-(inputFlow-fuel)*sourcePurity))/(0.99-sourcePurity);
       return makeUp;
   }


I am interested in values of genes that must full fill an equation

sinkFlow*sinkPurity-0.1<makeupGene*makeupPurity+recycleGene*recyclePurity+fuel*fuelPurity)&&(sinkFlow*sinkPurity+0.1>makeupGene*makeupPurity+recycleGene*recyclePurity+fuel*fuelPurity)

it does not satisfy the above equation.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Loading...