[jboss-svn-commits] JBL Code SVN: r19215 - in labs/jbossrules/trunk/drools-solver/drools-solver-examples: src/main/java/org/drools/solver/examples/itc2007/curriculumcourse/domain and 4 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sun Mar 23 08:52:56 EDT 2008
Author: ge0ffrey
Date: 2008-03-23 08:52:54 -0400 (Sun, 23 Mar 2008)
New Revision: 19215
Modified:
labs/jbossrules/trunk/drools-solver/drools-solver-examples/data/itc2007/curriculumcourse/validation/comp01_validation.txt
labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/java/org/drools/solver/examples/itc2007/curriculumcourse/domain/Lecture.java
labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/benchmark/curriculumCourseShortSolverBenchmarkConfig.xml
labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/benchmark/curriculumCourseSolverBenchmarkConfig.xml
labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/solver/curriculumCourseScoreRules.drl
labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/solver/curriculumCourseSolverConfig.xml
labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/benchmark/examinationShortSolverBenchmarkConfig.xml
labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/benchmark/examinationSolverBenchmarkConfig.xml
labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/solver/examinationSolverConfig.xml
Log:
curriculumCompactness
Modified: labs/jbossrules/trunk/drools-solver/drools-solver-examples/data/itc2007/curriculumcourse/validation/comp01_validation.txt
===================================================================
--- labs/jbossrules/trunk/drools-solver/drools-solver-examples/data/itc2007/curriculumcourse/validation/comp01_validation.txt 2008-03-23 12:12:08 UTC (rev 19214)
+++ labs/jbossrules/trunk/drools-solver/drools-solver-examples/data/itc2007/curriculumcourse/validation/comp01_validation.txt 2008-03-23 12:52:54 UTC (rev 19215)
@@ -1,182 +1,110 @@
-[H] Too few lectures for course c0001
-[H] Too few lectures for course c0002
-[H] Too few lectures for course c0004
-[H] Too few lectures for course c0016
-[H] Too few lectures for course c0025
-[H] Too few lectures for course c0030
-[H] Too few lectures for course c0033
-[H] Too few lectures for course c0057
-[H] Too few lectures for course c0061
-[H] Too few lectures for course c0063
-[H] Too few lectures for course c0064
-[H] Too few lectures for course c0069
-[H] Too few lectures for course c0070
-[H] Too few lectures for course c0071
-[H] Course c0001 has a lecture at unavailable period 24 (day 4, timeslot 0)
-[H] Course c0001 has a lecture at unavailable period 25 (day 4, timeslot 1)
-[H] Course c0004 has a lecture at unavailable period 4 (day 0, timeslot 4)
-[H] Course c0025 has a lecture at unavailable period 16 (day 2, timeslot 4)
-[H] Course c0025 has a lecture at unavailable period 22 (day 3, timeslot 4)
-[H] Course c0033 has a lecture at unavailable period 21 (day 3, timeslot 3)
-[H] Course c0033 has a lecture at unavailable period 28 (day 4, timeslot 4)
-[H] Course c0071 has a lecture at unavailable period 0 (day 0, timeslot 0)
-[S(30)] Room rC too small for course c0001 the period 3 (day 0, timeslot 3)
-[S(110)] Room rG too small for course c0001 the period 24 (day 4, timeslot 0)
-[S(45)] Room rS too small for course c0002 the period 7 (day 1, timeslot 1)
-[S(45)] Room rF too small for course c0002 the period 15 (day 2, timeslot 3)
-[S(55)] Room rG too small for course c0002 the period 23 (day 3, timeslot 5)
-[S(97)] Room rG too small for course c0004 the period 4 (day 0, timeslot 4)
-[S(17)] Room rC too small for course c0004 the period 9 (day 1, timeslot 3)
-[S(108)] Room rE too small for course c0004 the period 11 (day 1, timeslot 5)
-[S(97)] Room rG too small for course c0004 the period 20 (day 3, timeslot 2)
-[S(97)] Room rG too small for course c0004 the period 29 (day 4, timeslot 5)
-[S(66)] Room rE too small for course c0005 the period 12 (day 2, timeslot 0)
-[S(66)] Room rE too small for course c0005 the period 14 (day 2, timeslot 2)
-[S(56)] Room rE too small for course c0014 the period 8 (day 1, timeslot 2)
-[S(56)] Room rE too small for course c0015 the period 0 (day 0, timeslot 0)
-[S(35)] Room rF too small for course c0015 the period 3 (day 0, timeslot 3)
-[S(56)] Room rE too small for course c0015 the period 5 (day 0, timeslot 5)
-[S(35)] Room rF too small for course c0015 the period 11 (day 1, timeslot 5)
-[S(35)] Room rF too small for course c0015 the period 16 (day 2, timeslot 4)
-[S(56)] Room rE too small for course c0015 the period 17 (day 2, timeslot 5)
-[S(56)] Room rE too small for course c0016 the period 2 (day 0, timeslot 2)
-[S(56)] Room rE too small for course c0016 the period 19 (day 3, timeslot 1)
-[S(35)] Room rF too small for course c0016 the period 25 (day 4, timeslot 1)
-[S(45)] Room rG too small for course c0016 the period 26 (day 4, timeslot 2)
-[S(35)] Room rS too small for course c0017 the period 18 (day 3, timeslot 0)
-[S(45)] Room rG too small for course c0017 the period 22 (day 3, timeslot 4)
-[S(25)] Room rF too small for course c0024 the period 7 (day 1, timeslot 1)
-[S(35)] Room rG too small for course c0024 the period 14 (day 2, timeslot 2)
-[S(25)] Room rF too small for course c0025 the period 4 (day 0, timeslot 4)
-[S(35)] Room rG too small for course c0025 the period 6 (day 1, timeslot 0)
-[S(46)] Room rE too small for course c0025 the period 16 (day 2, timeslot 4)
-[S(25)] Room rS too small for course c0025 the period 28 (day 4, timeslot 4)
-[S(25)] Room rF too small for course c0078 the period 2 (day 0, timeslot 2)
-[S(25)] Room rF too small for course c0078 the period 26 (day 4, timeslot 2)
-[S(25)] Room rS too small for course c0078 the period 27 (day 4, timeslot 3)
-[S(11)] Room rE too small for course c0030 the period 24 (day 4, timeslot 0)
-[S(2)] Room rE too small for course c0031 the period 7 (day 1, timeslot 1)
-[S(1)] Room rF too small for course c0032 the period 19 (day 3, timeslot 1)
-[S(1)] Room rS too small for course c0033 the period 15 (day 2, timeslot 3)
-[S(1)] Room rS too small for course c0033 the period 16 (day 2, timeslot 4)
-[S(1)] Room rS too small for course c0033 the period 21 (day 3, timeslot 3)
-[S(1)] Room rF too small for course c0033 the period 28 (day 4, timeslot 4)
-[S(1)] Room rE too small for course c0071 the period 21 (day 3, timeslot 3)
-[S(5)] The course c0005 has only 2 days of lecture
-[S(5)] The course c0017 has only 1 days of lecture
-[S(5)] The course c0024 has only 2 days of lecture
+[S(25)] Room rS too small for course c0025 the period 13 (day 2, timeslot 1)
+[S(25)] Room rS too small for course c0078 the period 15 (day 2, timeslot 3)
+[S(1)] Room rF too small for course c0032 the period 20 (day 3, timeslot 2)
+[S(1)] Room rS too small for course c0033 the period 1 (day 0, timeslot 1)
+[S(1)] Room rF too small for course c0033 the period 10 (day 1, timeslot 4)
[S(5)] The course c0078 has only 3 days of lecture
-[S(5)] The course c0031 has only 3 days of lecture
+[S(5)] The course c0030 has only 2 days of lecture
[S(5)] The course c0033 has only 3 days of lecture
-[S(5)] The course c0057 has only 2 days of lecture
-[S(5)] The course c0059 has only 3 days of lecture
-[S(5)] The course c0061 has only 3 days of lecture
-[S(5)] The course c0062 has only 3 days of lecture
+[S(5)] The course c0057 has only 3 days of lecture
[S(5)] The course c0063 has only 3 days of lecture
-[S(5)] The course c0071 has only 3 days of lecture
-[S(2)] Curriculum q000 has an isolated lecture at period 7 (day 1, timeslot 1)
+[S(5)] The course c0067 has only 3 days of lecture
+[S(5)] The course c0068 has only 2 days of lecture
+[S(2)] Curriculum q000 has an isolated lecture at period 5 (day 0, timeslot 5)
[S(2)] Curriculum q000 has an isolated lecture at period 12 (day 2, timeslot 0)
-[S(2)] Curriculum q000 has an isolated lecture at period 18 (day 3, timeslot 0)
-[S(2)] Curriculum q000 has an isolated lecture at period 23 (day 3, timeslot 5)
-[S(2)] Curriculum q000 has an isolated lecture at period 29 (day 4, timeslot 5)
-[S(2)] Curriculum q001 has an isolated lecture at period 0 (day 0, timeslot 0)
-[S(2)] Curriculum q001 has an isolated lecture at period 5 (day 0, timeslot 5)
-[S(2)] Curriculum q001 has an isolated lecture at period 8 (day 1, timeslot 2)
[S(2)] Curriculum q001 has an isolated lecture at period 11 (day 1, timeslot 5)
-[S(2)] Curriculum q001 has an isolated lecture at period 14 (day 2, timeslot 2)
-[S(2)] Curriculum q001 has an isolated lecture at period 22 (day 3, timeslot 4)
-[S(2)] Curriculum q002 has an isolated lecture at period 0 (day 0, timeslot 0)
-[S(2)] Curriculum q002 has an isolated lecture at period 12 (day 2, timeslot 0)
+[S(2)] Curriculum q001 has an isolated lecture at period 19 (day 3, timeslot 1)
+[S(2)] Curriculum q002 has an isolated lecture at period 17 (day 2, timeslot 5)
[S(2)] Curriculum q002 has an isolated lecture at period 18 (day 3, timeslot 0)
+[S(2)] Curriculum q002 has an isolated lecture at period 20 (day 3, timeslot 2)
[S(2)] Curriculum q002 has an isolated lecture at period 22 (day 3, timeslot 4)
-[S(2)] Curriculum q003 has an isolated lecture at period 3 (day 0, timeslot 3)
[S(2)] Curriculum q003 has an isolated lecture at period 6 (day 1, timeslot 0)
+[S(2)] Curriculum q003 has an isolated lecture at period 10 (day 1, timeslot 4)
[S(2)] Curriculum q003 has an isolated lecture at period 13 (day 2, timeslot 1)
-[S(2)] Curriculum q003 has an isolated lecture at period 19 (day 3, timeslot 1)
-[S(2)] Curriculum q003 has an isolated lecture at period 24 (day 4, timeslot 0)
-[S(2)] Curriculum q003 has an isolated lecture at period 28 (day 4, timeslot 4)
-[S(2)] Curriculum q004 has an isolated lecture at period 7 (day 1, timeslot 1)
-[S(2)] Curriculum q004 has an isolated lecture at period 13 (day 2, timeslot 1)
-[S(2)] Curriculum q004 has an isolated lecture at period 19 (day 3, timeslot 1)
-[S(2)] Curriculum q004 has an isolated lecture at period 21 (day 3, timeslot 3)
-[S(2)] Curriculum q004 has an isolated lecture at period 28 (day 4, timeslot 4)
-[S(2)] Curriculum q005 has an isolated lecture at period 0 (day 0, timeslot 0)
-[S(2)] Curriculum q005 has an isolated lecture at period 2 (day 0, timeslot 2)
-[S(2)] Curriculum q005 has an isolated lecture at period 4 (day 0, timeslot 4)
-[S(2)] Curriculum q005 has an isolated lecture at period 20 (day 3, timeslot 2)
-[S(2)] Curriculum q006 has an isolated lecture at period 17 (day 2, timeslot 5)
-[S(2)] Curriculum q006 has an isolated lecture at period 25 (day 4, timeslot 1)
-[S(2)] Curriculum q007 has an isolated lecture at period 1 (day 0, timeslot 1)
-[S(2)] Curriculum q007 has an isolated lecture at period 5 (day 0, timeslot 5)
-[S(2)] Curriculum q007 has an isolated lecture at period 8 (day 1, timeslot 2)
-[S(2)] Curriculum q007 has an isolated lecture at period 12 (day 2, timeslot 0)
-[S(2)] Curriculum q007 has an isolated lecture at period 18 (day 3, timeslot 0)
+[S(2)] Curriculum q004 has an isolated lecture at period 1 (day 0, timeslot 1)
+[S(2)] Curriculum q004 has an isolated lecture at period 6 (day 1, timeslot 0)
+[S(2)] Curriculum q004 has an isolated lecture at period 15 (day 2, timeslot 3)
+[S(2)] Curriculum q004 has an isolated lecture at period 18 (day 3, timeslot 0)
+[S(2)] Curriculum q004 has an isolated lecture at period 20 (day 3, timeslot 2)
+[S(2)] Curriculum q005 has an isolated lecture at period 11 (day 1, timeslot 5)
+[S(2)] Curriculum q005 has an isolated lecture at period 12 (day 2, timeslot 0)
+[S(2)] Curriculum q005 has an isolated lecture at period 27 (day 4, timeslot 3)
+[S(2)] Curriculum q005 has an isolated lecture at period 29 (day 4, timeslot 5)
+[S(2)] Curriculum q006 has an isolated lecture at period 1 (day 0, timeslot 1)
+[S(2)] Curriculum q006 has an isolated lecture at period 12 (day 2, timeslot 0)
+[S(2)] Curriculum q006 has an isolated lecture at period 19 (day 3, timeslot 1)
+[S(2)] Curriculum q006 has an isolated lecture at period 23 (day 3, timeslot 5)
+[S(2)] Curriculum q006 has an isolated lecture at period 29 (day 4, timeslot 5)
+[S(2)] Curriculum q007 has an isolated lecture at period 9 (day 1, timeslot 3)
+[S(2)] Curriculum q007 has an isolated lecture at period 17 (day 2, timeslot 5)
[S(2)] Curriculum q007 has an isolated lecture at period 20 (day 3, timeslot 2)
+[S(2)] Curriculum q007 has an isolated lecture at period 23 (day 3, timeslot 5)
[S(2)] Curriculum q007 has an isolated lecture at period 24 (day 4, timeslot 0)
-[S(2)] Curriculum q008 has an isolated lecture at period 11 (day 1, timeslot 5)
-[S(2)] Curriculum q008 has an isolated lecture at period 17 (day 2, timeslot 5)
-[S(2)] Curriculum q008 has an isolated lecture at period 23 (day 3, timeslot 5)
-[S(2)] Curriculum q009 has an isolated lecture at period 12 (day 2, timeslot 0)
-[S(2)] Curriculum q009 has an isolated lecture at period 15 (day 2, timeslot 3)
-[S(2)] Curriculum q009 has an isolated lecture at period 17 (day 2, timeslot 5)
-[S(2)] Curriculum q009 has an isolated lecture at period 24 (day 4, timeslot 0)
-[S(2)] Curriculum q010 has an isolated lecture at period 13 (day 2, timeslot 1)
-[S(2)] Curriculum q010 has an isolated lecture at period 15 (day 2, timeslot 3)
-[S(2)] Curriculum q010 has an isolated lecture at period 17 (day 2, timeslot 5)
-[S(2)] Curriculum q010 has an isolated lecture at period 21 (day 3, timeslot 3)
+[S(2)] Curriculum q007 has an isolated lecture at period 28 (day 4, timeslot 4)
+[S(2)] Curriculum q008 has an isolated lecture at period 5 (day 0, timeslot 5)
+[S(2)] Curriculum q008 has an isolated lecture at period 6 (day 1, timeslot 0)
+[S(2)] Curriculum q008 has an isolated lecture at period 8 (day 1, timeslot 2)
+[S(2)] Curriculum q008 has an isolated lecture at period 13 (day 2, timeslot 1)
+[S(2)] Curriculum q008 has an isolated lecture at period 19 (day 3, timeslot 1)
+[S(2)] Curriculum q008 has an isolated lecture at period 29 (day 4, timeslot 5)
+[S(2)] Curriculum q009 has an isolated lecture at period 16 (day 2, timeslot 4)
+[S(2)] Curriculum q010 has an isolated lecture at period 2 (day 0, timeslot 2)
+[S(2)] Curriculum q010 has an isolated lecture at period 4 (day 0, timeslot 4)
+[S(2)] Curriculum q010 has an isolated lecture at period 6 (day 1, timeslot 0)
+[S(2)] Curriculum q010 has an isolated lecture at period 12 (day 2, timeslot 0)
[S(2)] Curriculum q010 has an isolated lecture at period 24 (day 4, timeslot 0)
-[S(2)] Curriculum q010 has an isolated lecture at period 26 (day 4, timeslot 2)
[S(2)] Curriculum q010 has an isolated lecture at period 29 (day 4, timeslot 5)
-[S(2)] Curriculum q011 has an isolated lecture at period 7 (day 1, timeslot 1)
-[S(2)] Curriculum q011 has an isolated lecture at period 13 (day 2, timeslot 1)
-[S(2)] Curriculum q011 has an isolated lecture at period 17 (day 2, timeslot 5)
+[S(2)] Curriculum q011 has an isolated lecture at period 2 (day 0, timeslot 2)
+[S(2)] Curriculum q011 has an isolated lecture at period 4 (day 0, timeslot 4)
+[S(2)] Curriculum q011 has an isolated lecture at period 6 (day 1, timeslot 0)
+[S(2)] Curriculum q011 has an isolated lecture at period 8 (day 1, timeslot 2)
+[S(2)] Curriculum q011 has an isolated lecture at period 12 (day 2, timeslot 0)
[S(2)] Curriculum q011 has an isolated lecture at period 18 (day 3, timeslot 0)
-[S(2)] Curriculum q011 has an isolated lecture at period 24 (day 4, timeslot 0)
-[S(2)] Curriculum q011 has an isolated lecture at period 27 (day 4, timeslot 3)
-[S(2)] Curriculum q012 has an isolated lecture at period 4 (day 0, timeslot 4)
-[S(2)] Curriculum q012 has an isolated lecture at period 9 (day 1, timeslot 3)
-[S(2)] Curriculum q012 has an isolated lecture at period 11 (day 1, timeslot 5)
-[S(2)] Curriculum q012 has an isolated lecture at period 20 (day 3, timeslot 2)
-[S(2)] Curriculum q012 has an isolated lecture at period 29 (day 4, timeslot 5)
+[S(2)] Curriculum q012 has an isolated lecture at period 7 (day 1, timeslot 1)
+[S(2)] Curriculum q012 has an isolated lecture at period 12 (day 2, timeslot 0)
+[S(2)] Curriculum q012 has an isolated lecture at period 16 (day 2, timeslot 4)
+[S(2)] Curriculum q012 has an isolated lecture at period 18 (day 3, timeslot 0)
+[S(2)] Curriculum q012 has an isolated lecture at period 23 (day 3, timeslot 5)
+[S(2)] Curriculum q012 has an isolated lecture at period 25 (day 4, timeslot 1)
+[S(2)] Curriculum q012 has an isolated lecture at period 28 (day 4, timeslot 4)
+[S(2)] Curriculum q013 has an isolated lecture at period 5 (day 0, timeslot 5)
+[S(2)] Curriculum q013 has an isolated lecture at period 7 (day 1, timeslot 1)
+[S(2)] Curriculum q013 has an isolated lecture at period 9 (day 1, timeslot 3)
[S(2)] Curriculum q013 has an isolated lecture at period 12 (day 2, timeslot 0)
-[S(2)] Curriculum q013 has an isolated lecture at period 24 (day 4, timeslot 0)
-[S(2)] Course c0001 uses 3 different rooms
-[S(4)] Course c0002 uses 5 different rooms
-[S(2)] Course c0004 uses 3 different rooms
+[S(2)] Curriculum q013 has an isolated lecture at period 25 (day 4, timeslot 1)
+[S(1)] Course c0002 uses 2 different rooms
[S(1)] Course c0005 uses 2 different rooms
-[S(2)] Course c0015 uses 3 different rooms
-[S(3)] Course c0016 uses 4 different rooms
-[S(1)] Course c0017 uses 2 different rooms
-[S(2)] Course c0024 uses 3 different rooms
-[S(4)] Course c0025 uses 5 different rooms
-[S(3)] Course c0078 uses 4 different rooms
-[S(3)] Course c0030 uses 4 different rooms
-[S(3)] Course c0031 uses 4 different rooms
+[S(1)] Course c0015 uses 2 different rooms
+[S(1)] Course c0016 uses 2 different rooms
+[S(1)] Course c0024 uses 2 different rooms
+[S(2)] Course c0025 uses 3 different rooms
+[S(2)] Course c0078 uses 3 different rooms
+[S(2)] Course c0030 uses 3 different rooms
+[S(1)] Course c0031 uses 2 different rooms
[S(2)] Course c0033 uses 3 different rooms
-[S(1)] Course c0057 uses 2 different rooms
-[S(3)] Course c0058 uses 4 different rooms
-[S(3)] Course c0059 uses 4 different rooms
+[S(2)] Course c0057 uses 3 different rooms
+[S(1)] Course c0058 uses 2 different rooms
+[S(2)] Course c0059 uses 3 different rooms
[S(2)] Course c0061 uses 3 different rooms
-[S(3)] Course c0062 uses 4 different rooms
-[S(2)] Course c0063 uses 3 different rooms
-[S(2)] Course c0064 uses 3 different rooms
-[S(2)] Course c0065 uses 3 different rooms
-[S(3)] Course c0066 uses 4 different rooms
-[S(3)] Course c0067 uses 4 different rooms
+[S(2)] Course c0062 uses 3 different rooms
+[S(3)] Course c0063 uses 4 different rooms
+[S(4)] Course c0064 uses 5 different rooms
+[S(3)] Course c0065 uses 4 different rooms
+[S(2)] Course c0066 uses 3 different rooms
+[S(2)] Course c0067 uses 3 different rooms
[S(3)] Course c0068 uses 4 different rooms
-[S(2)] Course c0069 uses 3 different rooms
-[S(2)] Course c0070 uses 3 different rooms
-[S(4)] Course c0071 uses 5 different rooms
-[S(3)] Course c0072 uses 4 different rooms
+[S(3)] Course c0069 uses 4 different rooms
+[S(3)] Course c0070 uses 4 different rooms
+[S(2)] Course c0071 uses 3 different rooms
+[S(2)] Course c0072 uses 3 different rooms
-Violations of Lectures (hard) : 18
+Violations of Lectures (hard) : 0
Violations of Conflicts (hard) : 0
-Violations of Availability (hard) : 8
+Violations of Availability (hard) : 0
Violations of RoomOccupation (hard) : 0
-Cost of RoomCapacity (soft) : 1719
-Cost of MinWorkingDays (soft) : 65
-Cost of IsolatedLectures (soft) : 132
-Cost of RoomStability (soft) : 70
+Cost of RoomCapacity (soft) : 53
+Cost of MinWorkingDays (soft) : 45
+Cost of IsolatedLectures (soft) : 124
+Cost of RoomStability (soft) : 50
-There are 18 warnings!
-Summary: Violations = 26, Total Cost = 1986
\ No newline at end of file
+Summary: Total Cost = 272
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/java/org/drools/solver/examples/itc2007/curriculumcourse/domain/Lecture.java
===================================================================
--- labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/java/org/drools/solver/examples/itc2007/curriculumcourse/domain/Lecture.java 2008-03-23 12:12:08 UTC (rev 19214)
+++ labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/java/org/drools/solver/examples/itc2007/curriculumcourse/domain/Lecture.java 2008-03-23 12:52:54 UTC (rev 19215)
@@ -1,5 +1,7 @@
package org.drools.solver.examples.itc2007.curriculumcourse.domain;
+import java.util.List;
+
import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
@@ -54,10 +56,18 @@
return course.getStudentSize();
}
+ public List<Curriculum> getCurriculumList() {
+ return course.getCurriculumList();
+ }
+
public Day getDay() {
return period.getDay();
}
+ public int getTimeslotIndex() {
+ return period.getTimeslot().getTimeslotIndex();
+ }
+
public int compareTo(Lecture other) {
return new CompareToBuilder()
.append(period, other.period)
Modified: labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/benchmark/curriculumCourseShortSolverBenchmarkConfig.xml
===================================================================
--- labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/benchmark/curriculumCourseShortSolverBenchmarkConfig.xml 2008-03-23 12:12:08 UTC (rev 19214)
+++ labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/benchmark/curriculumCourseShortSolverBenchmarkConfig.xml 2008-03-23 12:52:54 UTC (rev 19215)
@@ -9,9 +9,6 @@
<inheritedLocalSearchSolver>
<scoreDrl>/org/drools/solver/examples/itc2007/curriculumcourse/solver/curriculumCourseScoreRules.drl</scoreDrl>
- <scoreCalculator>
- <scoreCalculatorType>HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>
- </scoreCalculator>
<startingSolutionInitializerClass>org.drools.solver.examples.itc2007.curriculumcourse.solver.solution.initializer.CurriculumCourseStartingSolutionInitializer</startingSolutionInitializerClass>
<finish>
<maximumStepCount>500</maximumStepCount>
@@ -21,7 +18,7 @@
<solverBenchmark>
<localSearchSolver>
<scoreCalculator>
- <scoreCalculatorType>DYNAMIC_HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>
+ <scoreCalculatorType>HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>
</scoreCalculator>
<selector>
<selector>
Modified: labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/benchmark/curriculumCourseSolverBenchmarkConfig.xml
===================================================================
--- labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/benchmark/curriculumCourseSolverBenchmarkConfig.xml 2008-03-23 12:12:08 UTC (rev 19214)
+++ labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/benchmark/curriculumCourseSolverBenchmarkConfig.xml 2008-03-23 12:52:54 UTC (rev 19215)
@@ -22,9 +22,6 @@
<inheritedLocalSearchSolver>
<scoreDrl>/org/drools/solver/examples/itc2007/curriculumcourse/solver/curriculumCourseScoreRules.drl</scoreDrl>
- <scoreCalculator>
- <scoreCalculatorType>HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>
- </scoreCalculator>
<startingSolutionInitializerClass>org.drools.solver.examples.itc2007.curriculumcourse.solver.solution.initializer.CurriculumCourseStartingSolutionInitializer</startingSolutionInitializerClass>
<finish>
<!--
@@ -39,7 +36,8 @@
<solverBenchmark>
<localSearchSolver>
<scoreCalculator>
- <scoreCalculatorType>DYNAMIC_HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>
+ <scoreCalculatorType>HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>
+ <!--<scoreCalculatorType>DYNAMIC_HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>-->
</scoreCalculator>
<selector>
<selector>
Modified: labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/solver/curriculumCourseScoreRules.drl
===================================================================
--- labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/solver/curriculumCourseScoreRules.drl 2008-03-23 12:12:08 UTC (rev 19214)
+++ labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/solver/curriculumCourseScoreRules.drl 2008-03-23 12:52:54 UTC (rev 19215)
@@ -128,7 +128,36 @@
// For a given curriculum we account for a violation every time there is one lecture not adjacent
// to any other lecture within the same day.
// Each isolated lecture in a curriculum counts as 2 points of penalty.
+rule "curriculumCompactness"
+ when
+ $curriculum : Curriculum();
+ $lecture : Lecture(curriculumList contains $curriculum,
+ $day : day, $timeslotIndex : timeslotIndex
+ );
+ not Lecture(curriculumList contains $curriculum,
+ day == $day, timeslotIndex == ($timeslotIndex - 1)
+ );
+ not Lecture(curriculumList contains $curriculum,
+ day == $day, timeslotIndex == ($timeslotIndex + 1)
+ );
+
+
+// $leftLecture : Lecture(curriculumList contains $curriculum,
+// $day : day, $leftTimeslotIndex : timeslotIndex
+// );
+// $rightLecture : Lecture(curriculumList contains $curriculum,
+// day == $day, timeslotIndex >= ($leftTimeslotIndex + 2), $rightTimeslotIndex : timeslotIndex
+// );
+// not Lecture(curriculumList contains $curriculum,
+// day == $day, timeslotIndex > $leftTimeslotIndex, timeslotIndex < $rightTimeslotIndex
+// );
+ then
+ insertLogical(new IntConstraintOccurrence("curriculumCompactness", ConstraintType.NEGATIVE_SOFT,
+ 2,
+ $lecture, $curriculum));
+end
+
// RoomStability: All lectures of a course should be given in the same room.
// Each distinct room used for the lectures of a course, but the first, counts as 1 point of penalty.
Modified: labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/solver/curriculumCourseSolverConfig.xml
===================================================================
--- labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/solver/curriculumCourseSolverConfig.xml 2008-03-23 12:12:08 UTC (rev 19214)
+++ labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/curriculumcourse/solver/curriculumCourseSolverConfig.xml 2008-03-23 12:52:54 UTC (rev 19215)
@@ -38,15 +38,5 @@
<forager>
<foragerType>MAX_SCORE_OF_ALL</foragerType>
</forager>
- <!--<selector>-->
- <!--<moveFactoryClass>org.drools.solver.examples.itc2007.examination.solver.move.factory.PeriodChangeExaminationMoveFactory</moveFactoryClass>-->
- <!--<shuffleMovesEveryStep>true</shuffleMovesEveryStep>-->
- <!--</selector>-->
- <!--<accepter>-->
- <!--<accepterType>SIMULATED_ANNEALING</accepterType>-->
- <!--</accepter>-->
- <!--<forager>-->
- <!--<foragerType>FIRST_RANDOMLY_ACCEPTED</foragerType>-->
- <!--</forager>-->
</localSearchSolver>
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/benchmark/examinationShortSolverBenchmarkConfig.xml
===================================================================
--- labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/benchmark/examinationShortSolverBenchmarkConfig.xml 2008-03-23 12:12:08 UTC (rev 19214)
+++ labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/benchmark/examinationShortSolverBenchmarkConfig.xml 2008-03-23 12:52:54 UTC (rev 19215)
@@ -8,9 +8,6 @@
<inheritedUnsolvedSolutionFile>data/itc2007/examination/unsolved/exam_comp_set1_initialized.xml</inheritedUnsolvedSolutionFile>
<inheritedLocalSearchSolver>
<scoreDrl>/org/drools/solver/examples/itc2007/examination/solver/examinationScoreRules.drl</scoreDrl>
- <scoreCalculator>
- <scoreCalculatorType>DYNAMIC_HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>
- </scoreCalculator>
<startingSolutionInitializerClass>org.drools.solver.examples.itc2007.examination.solver.solution.initializer.ExaminationStartingSolutionInitializer</startingSolutionInitializerClass>
<finish>
<maximumStepCount>100</maximumStepCount>
@@ -19,6 +16,9 @@
<solverBenchmark>
<localSearchSolver>
+ <scoreCalculator>
+ <scoreCalculatorType>DYNAMIC_HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>
+ </scoreCalculator>
<selector>
<selector>
<topSize>10</topSize>
Modified: labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/benchmark/examinationSolverBenchmarkConfig.xml
===================================================================
--- labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/benchmark/examinationSolverBenchmarkConfig.xml 2008-03-23 12:12:08 UTC (rev 19214)
+++ labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/benchmark/examinationSolverBenchmarkConfig.xml 2008-03-23 12:52:54 UTC (rev 19215)
@@ -16,9 +16,6 @@
<inheritedLocalSearchSolver>
<scoreDrl>/org/drools/solver/examples/itc2007/examination/solver/examinationScoreRules.drl</scoreDrl>
- <scoreCalculator>
- <scoreCalculatorType>HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>
- </scoreCalculator>
<startingSolutionInitializerClass>org.drools.solver.examples.itc2007.examination.solver.solution.initializer.ExaminationStartingSolutionInitializer</startingSolutionInitializerClass>
<finish>
<!--
Modified: labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/solver/examinationSolverConfig.xml
===================================================================
--- labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/solver/examinationSolverConfig.xml 2008-03-23 12:12:08 UTC (rev 19214)
+++ labs/jbossrules/trunk/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/solver/examinationSolverConfig.xml 2008-03-23 12:52:54 UTC (rev 19215)
@@ -2,7 +2,8 @@
<localSearchSolver>
<scoreDrl>/org/drools/solver/examples/itc2007/examination/solver/examinationScoreRules.drl</scoreDrl>
<scoreCalculator>
- <scoreCalculatorType>HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>
+ <!--<scoreCalculatorType>HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>-->
+ <scoreCalculatorType>DYNAMIC_HARD_AND_SOFT_CONSTRAINTS</scoreCalculatorType>
</scoreCalculator>
<startingSolutionInitializerClass>org.drools.solver.examples.itc2007.examination.solver.solution.initializer.ExaminationStartingSolutionInitializer</startingSolutionInitializerClass>
<finish>
More information about the jboss-svn-commits
mailing list