优化规划师;如何使用benchmarkCofigTemplate.xml.ftl?

Optaplanner; How to use the benchmarkCofigTemplate.xml.ftl?

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

我使用了 benchmarkConfig.xml 并且我得到了很好的结果,但是我想通过调整它来使用算法并且我从文档中了解到这是使用 benchmarkConfigTemplate.xml.ftl 配置的,但是我可以't 运行 它。

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

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

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