1

Hi I am currently trying to implment an OptaPlanner solution, and I am having difficulty with the syntax for 2 of the planning variables. The values are continuous doubles of a range that is required to be set dynamically before the solution is solved.

I have looked at the following 2 sites and am having difficulty in seeing how they should be implemented.

https://issues.jboss.org/browse/PLANNER-160

Does OptaPlanner support optimizations and constraints on continuous variables?

My current solution is failing to provide a vaible soluition and I belive it is down to the way that I have set these values up.

@PlanningVariable(valueRangeProviderRefs = {"yPosRange"})
public double getYCenter()

Please can someone let me know how this should be implemented. The value of the range can be anything between 0 and n.

Thanks.

Community
  • 1
  • 1
Jon
  • 95
  • 8

1 Answers1

0

Continuous variables are supported since 6.1, not in 6.0. In this docs section, see "4.3.5.2.4. ValueRangeFactory", such as ValueRangeFactory.createdDoubleValueRange(...).

Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120