001 package net.sf.cpsolver.coursett.criteria.additional;
002
003 import java.util.Collection;
004 import java.util.Map;
005
006 import net.sf.cpsolver.coursett.model.Lecture;
007 import net.sf.cpsolver.ifs.util.DataProperties;
008
009 /**
010 * Important student hard conflicts. Same as {@link ImportantStudentConflict}, but
011 * only hard student conflicts are counted (between classes that do not have alternatives,
012 * see {@link Lecture#isSingleSection()}). Weighted by Comparator.ImportantHardStudentConflictWeight
013 * parameter.
014 * .
015 * <br>
016 *
017 * @version CourseTT 1.2 (University Course Timetabling)<br>
018 * Copyright (C) 2006 - 2011 Tomas Muller<br>
019 * <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
020 * <a href="http://muller.unitime.org">http://muller.unitime.org</a><br>
021 * <br>
022 * This library is free software; you can redistribute it and/or modify
023 * it under the terms of the GNU Lesser General Public License as
024 * published by the Free Software Foundation; either version 3 of the
025 * License, or (at your option) any later version. <br>
026 * <br>
027 * This library is distributed in the hope that it will be useful, but
028 * WITHOUT ANY WARRANTY; without even the implied warranty of
029 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
030 * Lesser General Public License for more details. <br>
031 * <br>
032 * You should have received a copy of the GNU Lesser General Public
033 * License along with this library; if not see
034 * <a href='http://www.gnu.org/licenses/'>http://www.gnu.org/licenses/</a>.
035 */
036 public class ImportantStudentHardConflict extends ImportantStudentConflict {
037
038 @Override
039 public boolean isApplicable(Lecture l1, Lecture l2) {
040 return super.isApplicable(l1, l2) && hard(l1, l2);
041 }
042
043 @Override
044 public double getWeightDefault(DataProperties config) {
045 return config.getPropertyDouble("Comparator.ImportantHardStudentConflictWeight",
046 3.0 * config.getPropertyDouble("Comparator.HardStudentConflictWeight", 5.0));
047 }
048
049 @Override
050 public String getPlacementSelectionWeightName() {
051 return "Placement.NrImportantHardStudConfsWeight";
052 }
053
054 @Override
055 public void getInfo(Map<String, String> info) {
056 }
057
058 @Override
059 public void getInfo(Map<String, String> info, Collection<Lecture> variables) {
060 }
061 }