/*
Copyright 2014 ISTI-CNR
This file is part of SmartFed.
SmartFed is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
SmartFed is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with SmartFed. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* This file is part of JGAP.
*
* JGAP offers a dual license model containing the LGPL as well as the MPL.
*
* For licensing information please see the file license.txt included with JGAP
* or have a look at the top of class org.jgap.Chromosome which representatively
* includes the JGAP license policy applicable for any file delivered with JGAP.
*/
package it.cnr.isti.smartfed.metascheduler;
import java.util.List;
import java.util.Vector;
import org.jgap.BaseGeneticOperator;
import org.jgap.Configuration;
import org.jgap.Gene;
import org.jgap.Genotype;
import org.jgap.IChromosome;
import org.jgap.ICompositeGene;
import org.jgap.IGeneticOperatorConstraint;
import org.jgap.IUniversalRateCalculator;
import org.jgap.InvalidConfigurationException;
import org.jgap.Population;
import org.jgap.RandomGenerator;
/**
* The crossover operator randomly selects two Chromosomes from the
* population and "mates" them by randomly picking a gene and then
* swapping that gene and all subsequent genes between the two
* Chromosomes. The two modified Chromosomes are then added to the
* list of candidate Chromosomes.
*
* If you work with CompositeGenes, this operator expects them to contain
* genes of the same type (e.g. IntegerGene). If you have mixed types, please
* provide your own crossover operator.
*
* This CrossoverOperator supports both fixed and dynamic crossover rates.
* A fixed rate is one specified at construction time by the user. This
* operation is performed 1/m_crossoverRate as many times as there are
* Chromosomes in the population. Another possibility is giving the crossover
* rate as a percentage. A dynamic rate is determined by this class on the fly
* if no fixed rate is provided.
*
* @author Neil Rotstan
* @author Klaus Meffert
* @author Chris Knowles
* @since 1.0
*/
public class MyCrossoverOperator
extends BaseGeneticOperator implements Comparable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* The current crossover rate used by this crossover operator (mutual
* exclusive to m_crossoverRatePercent and m_crossoverRateCalc).
*/
private int m_crossoverRate;
/**
* Crossover rate in percentage of population size (mutual exclusive to
* m_crossoverRate and m_crossoverRateCalc).
*/
private double m_crossoverRatePercent;
/**
* Calculator for dynamically determining the crossover rate (mutual exclusive
* to m_crossoverRate and m_crossoverRatePercent)
*/
private IUniversalRateCalculator m_crossoverRateCalc;
/**
* true: x-over before and after a randomly chosen x-over point
* false: only x-over after the chosen point.
*/
private boolean m_allowFullCrossOver;
/**
* true: also x-over chromosomes with age of zero (newly created chromosomes)
*/
private boolean m_xoverNewAge;
/**
* Constructs a new instance of this CrossoverOperator without a specified
* crossover rate, this results in dynamic crossover rate being turned off.
* This means that the crossover rate will be fixed at populationsize/2.<p>
* Attention: The configuration used is the one set with the static method
* Genotype.setConfiguration.
*
* @throws InvalidConfigurationException
*
* @author Chris Knowles
* @since 2.0
*/
public MyCrossoverOperator()
throws InvalidConfigurationException {
super(Genotype.getStaticConfiguration());
init();
}
/**
* Constructs a new instance of this CrossoverOperator without a specified
* crossover rate, this results in dynamic crossover rate being turned off.
* This means that the crossover rate will be fixed at populationsize/2.
*
* @param a_configuration the configuration to use
* @throws InvalidConfigurationException
*
* @author Klaus Meffert
* @since 3.0
*/
public MyCrossoverOperator(final Configuration a_configuration)
throws InvalidConfigurationException {
super(a_configuration);
init();
}
/**
* Initializes certain parameters.
*
* @author Klaus Meffert
* @since 3.3.2
*/
protected void init() {
// Set the default crossoverRate.
// ------------------------------
m_crossoverRate = 6;
m_crossoverRatePercent = -1;
setCrossoverRateCalc(null);
setAllowFullCrossOver(true);
setXoverNewAge(true);
}
/**
* Constructs a new instance of this CrossoverOperator with a specified
* crossover rate calculator, which results in dynamic crossover being turned
* on.
*
* @param a_configuration the configuration to use
* @param a_crossoverRateCalculator calculator for dynamic crossover rate
* computation
* @throws InvalidConfigurationException
*
* @author Chris Knowles
* @author Klaus Meffert
* @since 3.0 (since 2.0 without a_configuration)
*/
public MyCrossoverOperator(final Configuration a_configuration,
final IUniversalRateCalculator
a_crossoverRateCalculator)
throws InvalidConfigurationException {
this(a_configuration, a_crossoverRateCalculator, true);
}
/**
* Constructs a new instance of this CrossoverOperator with a specified
* crossover rate calculator, which results in dynamic crossover being turned
* on.
*
* @param a_configuration the configuration to use
* @param a_crossoverRateCalculator calculator for dynamic crossover rate
* computation
* @param a_allowFullCrossOver true: x-over before AND after x-over point,
* false: only x-over after x-over point
* @throws InvalidConfigurationException
*
* @author Klaus Meffert
* @since 3.3.2
*/
public MyCrossoverOperator(final Configuration a_configuration,
final IUniversalRateCalculator
a_crossoverRateCalculator,
boolean a_allowFullCrossOver)
throws InvalidConfigurationException {
super(a_configuration);
setCrossoverRateCalc(a_crossoverRateCalculator);
setAllowFullCrossOver(a_allowFullCrossOver);
}
/**
* Constructs a new instance of this CrossoverOperator with the given
* crossover rate.
*
* @param a_configuration the configuration to use
* @param a_desiredCrossoverRate the desired rate of crossover
* @throws InvalidConfigurationException
*
* @author Chris Knowles
* @author Klaus Meffert
* @since 3.0 (since 2.0 without a_configuration)
*/
public MyCrossoverOperator(final Configuration a_configuration,
final int a_desiredCrossoverRate)
throws InvalidConfigurationException {
this(a_configuration, a_desiredCrossoverRate, true);
}
/**
* Constructs a new instance of this CrossoverOperator with the given
* crossover rate. No new chromosomes are x-overed.
*
* @param a_configuration the configuration to use
* @param a_desiredCrossoverRate the desired rate of crossover
* @param a_allowFullCrossOver true: x-over before AND after x-over point,
* false: only x-over after x-over point
* @throws InvalidConfigurationException
*
* @author Klaus Meffert
* @since 3.3.2
没有合适的资源?快使用搜索试试~ 我知道了~
基于遥感应用程序的使用DTG的联盟云工作流调度源码+项目说明.zip
共313个文件
java:263个
xml:20个
jar:18个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 154 浏览量
2024-04-11
00:11:22
上传
评论
收藏 12.48MB ZIP 举报
温馨提示
【资源说明】 1、该资源包括项目的全部源码,下载可以直接使用! 2、本项目适合作为计算机、数学、电子信息等专业的课程设计、期末大作业和毕设项目,作为参考资料学习借鉴。 3、本资源作为“参考资料”如果需要实现其他功能,需要能看懂代码,并且热爱钻研,自行调试。 基于遥感应用程序的使用DTG的联盟云工作流调度源码+项目说明.zip 实验步骤 1.生成遥感科学工作流实例 在workflowGenerator文件夹里RemoteSense实例生成方法
资源推荐
资源详情
资源评论
收起资源包目录
基于遥感应用程序的使用DTG的联盟云工作流调度源码+项目说明.zip (313个子文件)
data.csv 0B
RemoteSense_1.dot 3KB
Epigenomics_46.dot 3KB
Montage_25.dot 2KB
RemoteSense_.dot 831B
RemoteSense_13.dot 823B
.gitignore 176B
.gitignore 33B
smartfedtest.iml 573B
jgap_3.6.2_src.jar 6.5MB
pegasus.jar 1.52MB
commons-math3-3.0.jar 1.23MB
jgap-3.6.2.jar 633KB
log4j-1.2.16.jar 470KB
federation-core-0.1-SNAPSHOT.jar 452KB
workflowsim-1.0.jar 401KB
jdom-2.0.0.jar 286KB
cloudsim-3.0.2.jar 240KB
jgrapht-jdk1.6.jar 240KB
junit-4.11.jar 239KB
cloudsim-3.0.2-sources.jar 231KB
ovf-parser-1.0-SNAPSHOT.jar 109KB
super-csv-2.1.0.jar 89KB
hamcrest-core-1.1.jar 75KB
objenesis-1.2.jar 35KB
cloning-1.9.0.jar 23KB
cloning-1.8.5.jar 23KB
MyCrossoverOperator.java 21KB
MyMutationOperator.java 15KB
FederationDatacenter.java 14KB
Misc.java 13KB
WorkflowComputer.java 11KB
WorkflowMakespan.java 11KB
Federation.java 11KB
FederationDatacenter.java 10KB
Federation.java 10KB
CostComputer.java 9KB
ThreeTierSTRATOSApplicationTest.java 9KB
Application.java 9KB
DataSetMS.java 9KB
WorkflowApplication.java 9KB
BenchmarkTest.java 9KB
WorkflowGenerator.java 8KB
JGAPMapping.java 8KB
Application.java 8KB
GreedyRollbackAllocator.java 8KB
AbstractBrokageScalability.java 8KB
NetworkBWConstraint.java 8KB
MSPolicyFactory.java 7KB
DatacenterGenerator.java 7KB
EdgeTest.java 7KB
CostComputer.java 7KB
ApplicationEdgeTest.java 7KB
MSPolicyFactory.java 7KB
GreedyRollbackAllocatorAppliance.java 7KB
JGAPMapping.java 7KB
Allocation.java 7KB
ApplicationVertex.java 7KB
WorkflowCost.java 7KB
QueueExperiment.java 7KB
InternetEstimator.java 7KB
DatacenterGenerator.java 7KB
AppJob.java 7KB
BudgetConstraint.java 7KB
ExperimentDistance.java 6KB
BasicExperiment.java 6KB
WorkflowApplication1.java 6KB
MSProviderAdapter.java 6KB
XmlGenerator.java 6KB
JGAPMapping.java 6KB
SingleApplicationTest.java 6KB
SimpleTest.java 6KB
Allocation.java 6KB
MSProviderAdapter.java 6KB
BrokageLockin.java 6KB
GeneticAllocator.java 6KB
BudgetConstraint.java 6KB
ApplicationVertex.java 6KB
GreedyAllocator.java 6KB
MSPolicy.java 6KB
MSApplicationUtility.java 6KB
Experiment.java 5KB
BudgetConstraint.java 5KB
MSApplicationUtility.java 5KB
FormerBrokageScalability.java 5KB
WorkflowComputerTest.java 5KB
PolicyFactory.java 5KB
MSPolicy.java 5KB
ApplicationFromOVF.java 5KB
ApplicationVertex.java 5KB
MSPolicy.java 5KB
BrokageTuning.java 5KB
MOHEFT.java 5KB
MappingSolution.java 5KB
costConstraint.java 5KB
PolicyContainer.java 5KB
costConstraint.java 5KB
GeneticAllocator1.java 5KB
Experiment.java 4KB
PaperTestCost.java 4KB
共 313 条
- 1
- 2
- 3
- 4
资源评论
土豆片片
- 粉丝: 1557
- 资源: 5641
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功