本文整理汇总了Java中org.cpsolver.coursett.Constants.sPreferenceLevelStronglyDiscouraged方法的典型用法代码示例。如果您正苦于以下问题:Java Constants.sPreferenceLevelStronglyDiscouraged方法的具体用法?Java Constants.sPreferenceLevelStronglyDiscouraged怎么用?Java Constants.sPreferenceLevelStronglyDiscouraged使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.cpsolver.coursett.Constants
的用法示例。
在下文中一共展示了Constants.sPreferenceLevelStronglyDiscouraged方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTooBigRoomPreference
import org.cpsolver.coursett.Constants; //导入方法依赖的package包/类
public static int getTooBigRoomPreference(Placement value) {
if (value.isMultiRoom()) {
PreferenceCombination pref = PreferenceCombination.getDefault();
for (RoomLocation r : value.getRoomLocations()) {
if (r.getRoomSize() > getStronglyDiscouragedRoomSize(value))
pref.addPreferenceInt(Constants.sPreferenceLevelStronglyDiscouraged);
else if (r.getRoomSize() > getDiscouragedRoomSize(value))
pref.addPreferenceInt(Constants.sPreferenceLevelDiscouraged);
}
return pref.getPreferenceInt();
} else {
if (value.getRoomLocation().getRoomSize() > getStronglyDiscouragedRoomSize(value))
return Constants.sPreferenceLevelStronglyDiscouraged;
else if (value.getRoomLocation().getRoomSize() > getDiscouragedRoomSize(value))
return Constants.sPreferenceLevelDiscouraged;
else
return Constants.sPreferenceLevelNeutral;
}
}
示例2: getBounds
import org.cpsolver.coursett.Constants; //导入方法依赖的package包/类
@Override
public double[] getBounds(Assignment<Lecture, Placement> assignment, Collection<Lecture> variables) {
double[] bounds = new double[] { 0.0, 0.0 };
for (Lecture lect: variables) {
if (lect.getNrRooms() > 0)
bounds[0] += Constants.sPreferenceLevelStronglyDiscouraged;
}
return bounds;
}
示例3: getWorstPreference
import org.cpsolver.coursett.Constants; //导入方法依赖的package包/类
/** Worst back-to-back preference of this instructor
* @return worst possible distance preference
**/
public int getWorstPreference() {
return Constants.sPreferenceLevelStronglyDiscouraged * (variables().size() - 1);
}
示例4: getWeightDefault
import org.cpsolver.coursett.Constants; //导入方法依赖的package包/类
@Override
public double getWeightDefault(DataProperties config) {
return Constants.sPreferenceLevelStronglyDiscouraged * config.getPropertyDouble("Comparator.UselessSlotWeight", 0.1);
}