Optaplanner;如何使用benchmarkCofigTemplate.xml.ftl?

时间:2015-11-17 11:58:18

标签: optaplanner

在optaplanner 6.2版中,如何使用benchmarkConfigTemplate.xml.ftl?

我使用了benchmarkConfig.xml并得到了很好的结果,但是我希望使用这些算法进行调整,我从文档中了解到这是使用benchmarkConfigTemplate.xml.ftl配置的,但我不能跑吧。

1 个答案:

答案 0 :(得分:2)

由于您从示例中复制了BenchmarkApp,因此您可以像这样运行模板配置:

在构造函数中,在调用CommonBenchmarkApp的构造函数时将其添加为选项:

public YourPersonalBenchmarkApp() {
    super(new ArgOption("template", "path/to/your/yourPersonalBenchmarkConfigTemplate.xml.ftl", true));
}

来源:https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-examples/src/main/java/org/optaplanner/examples/cloudbalancing/app/CloudBalancingBenchmarkApp.java