跪求一份多目标多约束遗传算法的代码,matlab ,c ,c++都可以!不胜感激
发布网友
发布时间:2022-05-26 08:15
我来回答
共2个回答
热心网友
时间:2023-10-09 09:16
BitGene::BitGene( RandomNr& rn,
double pm )
throw ( ProbabilityException )
: Gene( rn, pm )
{
}
void
BitGene::initRandom()
{
allele = randomNr.flipP( 0.5 );
}
void
BitGene::mutate()
{
allele = !allele;
}
Gene*
BitGene::clone()
{
BitGene* bg = new BitGene( randomNr, pMutation );
bg->allele = allele;
return bg;
}
void
BitGene::setAllele( bool a )
{
allele = a;
}
bool
BitGene::getAllele()
{
return allele;
}
热心网友
时间:2023-10-09 09:16
我把你要的多目标遗传算法程序给你发到邮箱了
请你查收,望采纳!