Conditions | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | package it.cnr.istc.pst.platinum.ai.deliberative.heuristic; |
||
28 | @Override |
||
29 | public Set<Flaw> choose() |
||
30 | throws UnsolvableFlawException, NoFlawFoundException { |
||
31 | |||
32 | // detect flaws |
||
33 | List<Flaw> flaws = this.pdb.detectFlaws(); |
||
34 | // check flaws found |
||
35 | if (flaws.isEmpty()) { |
||
36 | // throw exception |
||
37 | throw new NoFlawFoundException("No flaw has been found in the current plan"); |
||
38 | } |
||
39 | |||
40 | // consider all flaws for plan refinement |
||
41 | return new HashSet<>(flaws); |
||
42 | } |
||
55 |