Amr Qamar
Amr Qamar

Reputation: 109

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

In optaplanner version 6.2, how to use the benchmarkConfigTemplate.xml.ftl?

I used the benchmarkConfig.xml and I get good results, but I want to use the algorithms with tweaking it and I understand from the docs that this is configured using the benchmarkConfigTemplate.xml.ftl, but I can't run it.

Upvotes: 1

Views: 53

Answers (1)

Ondrej Skopek
Ondrej Skopek

Reputation: 798

Since you copied the BenchmarkApp from the examples, you can run the template config like this:

In your constructor, add it as an option when invoking CommonBenchmarkApp-s constructor:

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

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

Upvotes: 2

Related Questions