@@ 518-534 (lines=17) @@ | ||
515 | } |
|
516 | ||
517 | // check scheduling goal |
|
518 | if (flaw.getType().equals(FlawType.TIMELINE_BEHAVIOR_PLANNING)) |
|
519 | { |
|
520 | // get component |
|
521 | DomainComponent comp = flaw.getComponent(); |
|
522 | // update cost |
|
523 | if (!cost.containsKey(comp)) { |
|
524 | // set cost |
|
525 | cost.put(comp, new Double[] { |
|
526 | this.completionCost * (this.pdb.getDomainKnowledge().getHierarchicalLevelValue(comp) + 1), |
|
527 | this.completionCost * (this.pdb.getDomainKnowledge().getHierarchicalLevelValue(comp) + 1) |
|
528 | }); |
|
529 | } |
|
530 | else { |
|
531 | // update cost |
|
532 | cost.put(comp, new Double[] { |
|
533 | cost.get(comp)[0] + (this.completionCost * (this.pdb.getDomainKnowledge().getHierarchicalLevelValue(comp) + 1)), |
|
534 | cost.get(comp)[1] + (this.completionCost * (this.pdb.getDomainKnowledge().getHierarchicalLevelValue(comp) + 1)) |
|
535 | }); |
|
536 | } |
|
537 | } |
|
@@ 496-512 (lines=17) @@ | ||
493 | } |
|
494 | ||
495 | // check scheduling goal |
|
496 | if (flaw.getType().equals(FlawType.TIMELINE_OVERFLOW)) |
|
497 | { |
|
498 | // get component |
|
499 | DomainComponent comp = flaw.getComponent(); |
|
500 | // update cost |
|
501 | if (!cost.containsKey(comp)) { |
|
502 | // set cost |
|
503 | cost.put(comp, new Double[] { |
|
504 | this.schedulingCost * (this.pdb.getDomainKnowledge().getHierarchicalLevelValue(comp) + 1), |
|
505 | this.schedulingCost * (this.pdb.getDomainKnowledge().getHierarchicalLevelValue(comp) + 1) |
|
506 | }); |
|
507 | } |
|
508 | else { |
|
509 | // update cost |
|
510 | cost.put(comp, new Double[] { |
|
511 | cost.get(comp)[0] + (this.schedulingCost * (this.pdb.getDomainKnowledge().getHierarchicalLevelValue(comp) + 1)), |
|
512 | cost.get(comp)[1] + (this.schedulingCost * (this.pdb.getDomainKnowledge().getHierarchicalLevelValue(comp) + 1)) |
|
513 | }); |
|
514 | } |
|
515 | } |