Skip to content

Instantly share code, notes, and snippets.

@ge0ffrey
Created December 19, 2017 13:41
Show Gist options
  • Save ge0ffrey/63c8aca8b6f5c94a4a42eea6d4a4c9b7 to your computer and use it in GitHub Desktop.
Save ge0ffrey/63c8aca8b6f5c94a4a42eea6d4a4c9b7 to your computer and use it in GitHub Desktop.
rule "totalMakespan" // This is line 95
when
accumulate(
Allocation(jobType == JobType.SINK, $endDate : endDate);
$maxProjectEndDate : max($endDate)
)
then
scoreHolder.addSoftConstraintMatch(kcontext, 1, -$maxProjectEndDate); // Line 102
end
Output:
14:39:01.975 [EventQueue-0] ERROR Unable to build KieBaseModel:defaultKieBase
Rule Compilation error : [Rule name='totalMakespan']
org/optaplanner/examples/projectjobscheduling/solver/Rule_totalMakespan1885837891.java (14:1984) : The operator - is undefined for the argument type(s) Comparable
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: There are errors in a score DRL:
Error Messages:
// ===============> Why does is say line 95 and not line 102? <==========================
Message [id=1, kieBase=defaultKieBase, level=ERROR, path=org/optaplanner/examples/projectjobscheduling/solver/projectJobSchedulingScoreRules.drl, line=95, column=0
text=Rule Compilation error The operator - is undefined for the argument type(s) Comparable]
---
Warning Messages:
---
Info Messages:
at org.optaplanner.core.config.score.director.ScoreDirectorFactoryConfig.buildDroolsScoreDirectorFactory(ScoreDirectorFactoryConfig.java:507)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment