13.12. 视觉化热计划实体


在 UI 中显示 heat 映射,它突出显示了对分数影响的规划实体和问题事实。

流程

  • ScoreExplanation 中获取 Indictment 映射:

    Map<Object, Indictment<HardSoftScore>> indictmentMap = scoreExplanation.getIndictmentMap();
    for (CloudProcess process : cloudBalance.getProcessList()) {
        Indictment<HardSoftScore> indictment = indictmentMap.get(process);
        if (indictment == null) {
            continue;
        }
        // The score impact of that planning entity
        HardSoftScore totalScore = indictment.getScore();
    
        for (ConstraintMatch<HardSoftScore> constraintMatch : indictment.getConstraintMatchSet()) {
            String constraintName = constraintMatch.getConstraintName();
            HardSoftScore score = constraintMatch.getScore();
            ...
        }
    }

    每个字典 都是涉及合理对象的所有限制总和。所有 Indictment.getScoreTotal () 的总和与整体分数不同,因为多个字典实体可以共享相同的 ConstraintMatch

    注意

    约束流和 Drools 分数计算支持约束自动匹配,但增量 Java 分数计算需要实施额外的接口。

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部