当前位置: 首页>>代码示例>>Java>>正文


Java DataProperties.getPropertyDoubleArry方法代码示例

本文整理汇总了Java中org.cpsolver.ifs.util.DataProperties.getPropertyDoubleArry方法的典型用法代码示例。如果您正苦于以下问题:Java DataProperties.getPropertyDoubleArry方法的具体用法?Java DataProperties.getPropertyDoubleArry怎么用?Java DataProperties.getPropertyDoubleArry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.cpsolver.ifs.util.DataProperties的用法示例。


在下文中一共展示了DataProperties.getPropertyDoubleArry方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configure

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
@Override
public void configure(DataProperties properties) {
    super.configure(properties);
    if (getPlacementSelectionWeightName() != null) {
        iPlacementSelectionWeight = new double[] { 0.0, 0.0, 0.0 };
        for (int i = 0; i < 3; i++)
            iPlacementSelectionWeight[i] = properties.getPropertyDouble(getPlacementSelectionWeightName() + (1 + i), getPlacementSelectionWeightDefault(i));
        iPlacementSelectionAdjusts = new Double[][] { null, null, null};
        for (int i = 0; i < 3; i++) {
            iPlacementSelectionAdjusts[i] = properties.getPropertyDoubleArry(getPlacementSelectionAdjustmentsName() + (1 + i), properties.getPropertyDoubleArry(getPlacementSelectionAdjustmentsName(), null));
        }
    }
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:14,代码来源:TimetablingCriterion.java

示例2: SimulatedAnnealing

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
/**
 * Constructor. Following problem properties are considered:
 * <ul>
 * <li>SimulatedAnnealing.InitialTemperature ... initial temperature (default 1.5)
 * <li>SimulatedAnnealing.TemperatureLength ... temperature length (number of iterations between temperature decrements, default 25000)
 * <li>SimulatedAnnealing.CoolingRate ... temperature cooling rate (default 0.95)
 * <li>SimulatedAnnealing.ReheatLengthCoef ... temperature re-heat length coefficient (multiple of temperature length, default 5)
 * <li>SimulatedAnnealing.ReheatRate ... temperature re-heating rate (default (1/coolingRate)^(reheatLengthCoef*1.7))
 * <li>SimulatedAnnealing.RestoreBestLengthCoef ... restore best length coefficient (multiple of re-heat length, default reheatLengthCoef^2)
 * <li>SimulatedAnnealing.StochasticHC ... true for stochastic search acceptance criterion, false for simulated annealing acceptance (default false)
 * <li>SimulatedAnnealing.RelativeAcceptance ... true for relative acceptance (different between the new and the current solutions, if the neighbour is accepted), false for absolute acceptance (difference between the new and the best solutions, if the neighbour is accepted)
 * <li>SimulatedAnnealing.Neighbours ... semicolon separated list of classes implementing {@link NeighbourSelection}
 * <li>SimulatedAnnealing.AdditionalNeighbours ... semicolon separated list of classes implementing {@link NeighbourSelection}
 * <li>SimulatedAnnealing.Random ... when true, a neighbour selector is selected randomly
 * <li>SimulatedAnnealing.Update ... when true, a neighbour selector is selected using {@link NeighbourSelector#getPoints()} weights (roulette wheel selection)
 * </ul>
 * 
 * @param properties
 *            problem properties
 */
public SimulatedAnnealing(DataProperties properties) {
    super(properties);
    iInitialTemperature = properties.getPropertyDouble(getParameterBaseName() + ".InitialTemperature", iInitialTemperature);
    iReheatRate = properties.getPropertyDouble(getParameterBaseName() + ".ReheatRate", iReheatRate);
    iCoolingRate = properties.getPropertyDouble(getParameterBaseName() + ".CoolingRate", iCoolingRate);
    iRelativeAcceptance = properties.getPropertyBoolean(getParameterBaseName() + ".RelativeAcceptance", iRelativeAcceptance);
    iStochasticHC = properties.getPropertyBoolean(getParameterBaseName() + ".StochasticHC", iStochasticHC);
    iTemperatureLength = properties.getPropertyLong(getParameterBaseName() + ".TemperatureLength", iTemperatureLength);
    iReheatLengthCoef = properties.getPropertyDouble(getParameterBaseName() + ".ReheatLengthCoef", iReheatLengthCoef);
    iRestoreBestLengthCoef = properties.getPropertyDouble(getParameterBaseName() + ".RestoreBestLengthCoef", iRestoreBestLengthCoef);
    iCoolingRateAdjusts = properties.getPropertyDoubleArry(getParameterBaseName() + ".CoolingRateAdjustments", null);
    iTrainingValues = properties.getPropertyInt(getParameterBaseName() + ".TrainingValues", iTrainingValues);
    iTrainingProbability = properties.getPropertyDouble(getParameterBaseName() + ".TrainingProbability", iTrainingProbability);
    if (iReheatRate < 0)
        iReheatRate = Math.pow(1 / iCoolingRate, iReheatLengthCoef * 1.7);
    if (iRestoreBestLengthCoef < 0)
        iRestoreBestLengthCoef = iReheatLengthCoef * iReheatLengthCoef;
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:39,代码来源:SimulatedAnnealing.java

示例3: StepCountingHillClimber

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
/**
 * Constructor
 * <ul>
 * <li>HillClimber.CounterLimit ... number of moves after which the bound is reset (defaults to 1000)
 * <li>HillClimber.CounterMode ... counter mode (all: count all moves, accepted: count accepted moves, improving: count improving moves)
 * </ul>
 * @param properties solver configuration
 */
public StepCountingHillClimber(DataProperties properties) {
    super(properties);
    iSetHCMode = false;
    iCounterLimit = properties.getPropertyInt(getParameterBaseName() + ".CounterLimit", iCounterLimit);
    iCounterMode = Mode.valueOf(properties.getProperty(getParameterBaseName() + ".CounterMode", iCounterMode.name()).toUpperCase());
    iCounterLimitAdjusts = properties.getPropertyDoubleArry(getParameterBaseName() + ".CounterLimitAdjustments", null);
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:16,代码来源:StepCountingHillClimber.java

示例4: GreatDeluge

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
/**
 * Constructor. Following problem properties are considered:
 * <ul>
 * <li>GreatDeluge.CoolRate ... bound cooling rate (default 0.99999995)
 * <li>GreatDeluge.UpperBoundRate ... bound upper bound relative to best solution ever found (default 1.05)
 * <li>GreatDeluge.LowerBoundRate ... bound lower bound relative to best solution ever found (default 0.95)
 * <li>GreatDeluge.Neighbours ... semicolon separated list of classes implementing {@link NeighbourSelection}
 * <li>GreatDeluge.AdditionalNeighbours ... semicolon separated list of classes implementing {@link NeighbourSelection}
 * <li>GreatDeluge.Random ... when true, a neighbour selector is selected randomly
 * <li>GreatDeluge.Update ... when true, a neighbour selector is selected using {@link NeighbourSelector#getPoints()} weights (roulette wheel selection)
 * </ul>
 * 
 * @param properties
 *            problem properties
 */
public GreatDeluge(DataProperties properties) {
    super(properties);
    iCoolRate = properties.getPropertyDouble(getParameterBaseName() + ".CoolRate", iCoolRate);
    iUpperBoundRate = properties.getPropertyDouble(getParameterBaseName() + ".UpperBoundRate", iUpperBoundRate);
    iLowerBoundRate = properties.getPropertyDouble(getParameterBaseName() + ".LowerBoundRate", iLowerBoundRate);
    iCoolRateAdjusts = properties.getPropertyDoubleArry(getParameterBaseName() + ".CoolRateAdjustments", null);
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:23,代码来源:GreatDeluge.java


注:本文中的org.cpsolver.ifs.util.DataProperties.getPropertyDoubleArry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。