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


Java DataProperties.getPropertyDouble方法代码示例

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


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

示例1: LectureSelection

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
public LectureSelection(DataProperties properties) {
    iRouletteWheelSelection = properties.getPropertyBoolean("Lecture.RouletteWheelSelection", true);
    iUnassignWhenNotGood = properties.getPropertyBoolean("Lecture.UnassignWhenNotGood", false);
    iRW = properties.getPropertyBoolean("General.RandomWalk", true);
    iRandomWalkProb = (!iRW ? 0.0 : properties.getPropertyDouble("Lecture.RandomWalkProb", 1.00));
    iGoodValuesWeight = properties.getPropertyDouble("Lecture.GoodValueProb", 1.0);
    iDomainSizeWeight = properties.getPropertyDouble("Lecture.DomainSizeWeight", 30.0);

    iInteractiveMode = properties.getPropertyBoolean("General.InteractiveMode", false);

    iConstraintsWeight = properties.getPropertyDouble("Lecture.NrConstraintsWeight", 0.0);
    iMPP = properties.getPropertyBoolean("General.MPP", false);
    iInitialAssignmentWeight = (!iMPP ? 0.0 : properties.getPropertyDouble("Lecture.InitialAssignmentWeight", 20.0));

    iSubSetSelection = properties.getPropertyBoolean("Lecture.SelectionSubSet", true);
    iSelectionSubSetMinSize = properties.getPropertyInt("Lecture.SelectionSubSetMinSize", 10);
    iSelectionSubSetPart = properties.getPropertyDouble("Lecture.SelectionSubSetPart", 0.2);

    iTabuSize = properties.getPropertyInt("Lecture.TabuSize", 20);
    if (iTabuSize > 0)
        iTabu = new ArrayList<Lecture>(iTabuSize);
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:23,代码来源:LectureSelection.java

示例2: PriorityStudentWeights

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
public PriorityStudentWeights(DataProperties config) {
    iPriorityFactor = config.getPropertyDouble("StudentWeights.Priority", iPriorityFactor);
    iFirstAlternativeFactor = config.getPropertyDouble("StudentWeights.FirstAlternative", iFirstAlternativeFactor);
    iSecondAlternativeFactor = config.getPropertyDouble("StudentWeights.SecondAlternative", iSecondAlternativeFactor);
    iDistanceConflict = config.getPropertyDouble("StudentWeights.DistanceConflict", iDistanceConflict);
    iShortDistanceConflict = config.getPropertyDouble("StudentWeights.ShortDistanceConflict", iShortDistanceConflict);
    iTimeOverlapFactor = config.getPropertyDouble("StudentWeights.TimeOverlapFactor", iTimeOverlapFactor);
    iTimeOverlapMaxLimit = config.getPropertyDouble("StudentWeights.TimeOverlapMaxLimit", iTimeOverlapMaxLimit);
    iLeftoverSpread = config.getPropertyBoolean("StudentWeights.LeftoverSpread", iLeftoverSpread);
    iBalancingFactor = config.getPropertyDouble("StudentWeights.BalancingFactor", iBalancingFactor);
    iAlternativeRequestFactor = config.getPropertyDouble("StudentWeights.AlternativeRequestFactor", iAlternativeRequestFactor);
    iProjectedStudentWeight = config.getPropertyDouble("StudentWeights.ProjectedStudentWeight", iProjectedStudentWeight);
    iMPP = config.getPropertyBoolean("General.MPP", false);
    iPerturbationFactor = config.getPropertyDouble("StudentWeights.Perturbation", iPerturbationFactor);
    iSelectionFactor = config.getPropertyDouble("StudentWeights.Selection", iSelectionFactor);
    iSameChoiceWeight = config.getPropertyDouble("StudentWeights.SameChoice", iSameChoiceWeight);
    iSameTimeWeight = config.getPropertyDouble("StudentWeights.SameTime", iSameTimeWeight);
    iSameConfigWeight = config.getPropertyDouble("StudentWeights.SameConfig", iSameConfigWeight);
    iGroupFactor = config.getPropertyDouble("StudentWeights.SameGroup", iGroupFactor);
    iGroupBestRatio = config.getPropertyDouble("StudentWeights.GroupBestRatio", iGroupBestRatio);
    iGroupFillRatio = config.getPropertyDouble("StudentWeights.GroupFillRatio", iGroupFillRatio);
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:23,代码来源:PriorityStudentWeights.java

示例3: ExamGreatDeluge

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)
 * </ul>
 * 
 * @param properties
 *            problem properties
 */
@SuppressWarnings("unchecked")
public ExamGreatDeluge(DataProperties properties) {
    iCoolRate = properties.getPropertyDouble("GreatDeluge.CoolRate", iCoolRate);
    iUpperBoundRate = properties.getPropertyDouble("GreatDeluge.UpperBoundRate", iUpperBoundRate);
    iLowerBoundRate = properties.getPropertyDouble("GreatDeluge.LowerBoundRate", iLowerBoundRate);
    String neighbours = properties.getProperty("GreatDeluge.Neighbours", 
            ExamRandomMove.class.getName() + ";" +
            ExamRoomMove.class.getName() + ";" +
            ExamTimeMove.class.getName());
    neighbours += ";" + properties.getProperty("GreatDeluge.AdditionalNeighbours", "");
    iNeighbours = new ArrayList<NeighbourSelection<Exam,ExamPlacement>>();
    for (String neighbour: neighbours.split("\\;")) {
        if (neighbour == null || neighbour.isEmpty()) continue;
        try {
            Class<NeighbourSelection<Exam, ExamPlacement>> clazz = (Class<NeighbourSelection<Exam, ExamPlacement>>)Class.forName(neighbour);
            iNeighbours.add(clazz.getConstructor(DataProperties.class).newInstance(properties));
        } catch (Exception e) {
            sLog.error("Unable to use " + neighbour + ": " + e.getMessage());
        }
    }
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:35,代码来源:ExamGreatDeluge.java

示例4: deluge

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
public void deluge(DataProperties cfg, Assignment<CurVariable, CurValue> assignment) {
  	double f = cfg.getPropertyDouble("Curriculum.Deluge.Factor", 0.999999);
  	double ub = cfg.getPropertyDouble("Curriculum.Deluge.UpperBound", 1.25);
  	double lb = cfg.getPropertyDouble("Curriculum.Deluge.LowerBound", 0.75);
  	sLog.debug("  -- running great deluge");
int it = 0;
double total = getTotalValue(assignment);
double bound = ub * total;
double best = getTotalValue(assignment);
CurStudentSwap sw = new CurStudentSwap(cfg);
Solution<CurVariable, CurValue> solution = new Solution<CurVariable, CurValue>(this, assignment);
saveBest(assignment);
while (!getSwapCourses().isEmpty() && bound > lb * total && total > 0.0001 && canContinue()) {
	Neighbour<CurVariable, CurValue> n = sw.selectNeighbour(solution);
	if (n != null) {
		double value = n.value(assignment);
		if (value <= 0.0 || total + value < bound) {
			n.assign(assignment, it);
			if (total + value < best) {
				best = total + value;
				saveBest(assignment);
				sLog.debug("  -- best value: " + toString(assignment) + ", bound: " + bound);
			}
			total += value;
		}
	}
	bound *= f;
	it++;
}
// cfg.setProperty("Curriculum.Deluge.Iters", String.valueOf(it));
restoreBest(assignment);
// cfg.setProperty("Curriculum.Deluge.Value", String.valueOf(getTotalValue(assignment)));
sLog.debug("  -- final value: " + toString(assignment));
  }
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:35,代码来源:CurModel.java

示例5: SpreadConstraint

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
public SpreadConstraint(DataProperties config, String name) {
    this(name,
            config.getPropertyDouble("Spread.SpreadFactor", 1.20),
            config.getPropertyInt("Spread.Unassignments2Weaken", 250),
            config.getPropertyBoolean("General.InteractiveMode", false),
            config.getPropertyInt("General.FirstDaySlot", Constants.DAY_SLOTS_FIRST),
            config.getPropertyInt("General.LastDaySlot", Constants.DAY_SLOTS_LAST),
            config.getPropertyInt("General.FirstWorkDay", 0),
            config.getPropertyInt("General.LastWorkDay", Constants.NR_DAYS_WEEK - 1)
            );
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:12,代码来源:SpreadConstraint.java

示例6: DbtValueSelection

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
public DbtValueSelection(DataProperties properties) {
    iMPP = properties.getPropertyBoolean("General.MPP", false);

    if (iMPP) {
        iMPPLimit = properties.getPropertyInt("Value.MPPLimit", -1);
        iInitialSelectionProb = properties.getPropertyDouble("Value.InitialSelectionProb", 0.75);
        iWeightDeltaInitialAssignment = properties.getPropertyDouble("Value.WeightDeltaInitialAssignments", 0.0);
    }

    iRandomWalkProb = properties.getPropertyDouble("Value.RandomWalkProb", 0.0);
    iWeightValue = properties.getPropertyDouble("Value.WeightValue", 0.0);
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:13,代码来源:DbtValueSelection.java

示例7: ExamSimulatedAnnealing

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)
 * </ul>
 * 
 * @param properties
 *            problem properties
 */
@SuppressWarnings("unchecked")
public ExamSimulatedAnnealing(DataProperties properties) {
    iInitialTemperature = properties
            .getPropertyDouble("SimulatedAnnealing.InitialTemperature", iInitialTemperature);
    iReheatRate = properties.getPropertyDouble("SimulatedAnnealing.ReheatRate", iReheatRate);
    iCoolingRate = properties.getPropertyDouble("SimulatedAnnealing.CoolingRate", iCoolingRate);
    iRelativeAcceptance = properties.getPropertyBoolean("SimulatedAnnealing.RelativeAcceptance",
            iRelativeAcceptance);
    iStochasticHC = properties.getPropertyBoolean("SimulatedAnnealing.StochasticHC", iStochasticHC);
    iTemperatureLength = properties.getPropertyLong("SimulatedAnnealing.TemperatureLength", iTemperatureLength);
    iReheatLengthCoef = properties.getPropertyDouble("SimulatedAnnealing.ReheatLengthCoef", iReheatLengthCoef);
    iRestoreBestLengthCoef = properties.getPropertyDouble("SimulatedAnnealing.RestoreBestLengthCoef",
            iRestoreBestLengthCoef);
    if (iReheatRate < 0)
        iReheatRate = Math.pow(1 / iCoolingRate, iReheatLengthCoef * 1.7);
    if (iRestoreBestLengthCoef < 0)
        iRestoreBestLengthCoef = iReheatLengthCoef * iReheatLengthCoef;
    String neighbours = properties.getProperty("SimulatedAnnealing.Neighbours", 
            ExamRandomMove.class.getName() + ";" +
            ExamRoomMove.class.getName() + ";" +
            ExamTimeMove.class.getName());
    neighbours += ";" + properties.getProperty("SimulatedAnnealing.AdditionalNeighbours", "");
    iNeighbours = new ArrayList<NeighbourSelection<Exam,ExamPlacement>>();
    for (String neighbour: neighbours.split("\\;")) {
        if (neighbour == null || neighbour.isEmpty()) continue;
        try {
            Class<NeighbourSelection<Exam, ExamPlacement>> clazz = (Class<NeighbourSelection<Exam, ExamPlacement>>)Class.forName(neighbour);
            iNeighbours.add(clazz.getConstructor(DataProperties.class).newInstance(properties));
        } catch (Exception e) {
            sLog.error("Unable to use " + neighbour + ": " + e.getMessage());
        }
    }
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:61,代码来源:ExamSimulatedAnnealing.java

示例8: StudentCourseRequests

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
public StudentCourseRequests(DataProperties conf) {
	iBasePriorityWeight = conf.getPropertyDouble("StudentCourseRequests.BasePriorityWeight", iBasePriorityWeight);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:4,代码来源:StudentCourseRequests.java

示例9: CurTermination

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
public CurTermination(DataProperties properties) {
    iMaxIter = properties.getPropertyInt("Termination.MaxIters", -1);
    iTimeOut = properties.getPropertyDouble("Termination.TimeOut", -1.0);
    iStopWhenComplete = properties.getPropertyBoolean("Termination.StopWhenComplete", false);
    iMaxIdle = properties.getPropertyLong("Termination.MaxIdle", 10000);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:7,代码来源:CurTermination.java

示例10: LastLikeStudentCourseDemands

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
public LastLikeStudentCourseDemands(DataProperties properties) {
	iUsePriorities = properties.getPropertyBoolean("LastLikeStudentCourseDemands.UsePriorities", iUsePriorities);
	iBasePriorityWeight = properties.getPropertyDouble("LastLikeStudentCourseDemands.BasePriorityWeight", iBasePriorityWeight);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:5,代码来源:LastLikeStudentCourseDemands.java

示例11: getWeightDefault

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
@Override
public double getWeightDefault(DataProperties config) {
    return config.getPropertyDouble("Comparator.StudentConflictWeight", 1.0);
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:5,代码来源:StudentOverlapConflict.java

示例12: configure

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
@Override
public void configure(DataProperties properties) {
    iWeight = properties.getPropertyDouble(getWeightName(), getWeightDefault(properties));
    iDebug = properties.getPropertyBoolean("Debug." + getClass().getName().substring(1 + getClass().getName().lastIndexOf('.')), properties.getPropertyBoolean("Debug.Criterion", false));
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:6,代码来源:AbstractCriterion.java

示例13: getWeightDefault

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
@Override
public double getWeightDefault(DataProperties config) {
    return config.getPropertyDouble("Comparator.TimePreferenceWeight", 1.0);
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:5,代码来源:TimePreferences.java

示例14: getWeightDefault

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
@Override
public double getWeightDefault(DataProperties config) {
    return config.getPropertyDouble("Comparator.WorkDayStudentConflictWeight", 0.2);
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:5,代码来源:StudentWorkdayConflict.java

示例15: getWeightDefault

import org.cpsolver.ifs.util.DataProperties; //导入方法依赖的package包/类
@Override
public double getWeightDefault(DataProperties config) {
    return config.getPropertyDouble("Comparator.InstructorStudentConflictWeight", 10.0 * config.getPropertyDouble("Comparator.StudentConflictWeight", 1.0));
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:5,代码来源:InstructorStudentConflict.java


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