We're working towards fully supporting continuous variables. But currently (in 6.0.0.CR2) it's not decently supported yet.
Value ranges can indeed be continuous ranges, but the plumbing to actually use them isn't there yet. We have made good progress recently, see https://issues.jboss.org/browse/PLANNER-160.
Here's how it will work:
You 'll be able to use a @ValueRangeProvider
annotation on a method that returns a ValueRange
(instead of a Collection
) too.
A ValueRange
will be an interface supports selecting a random value, getting a size, ...
Out-of-the-box we will support IntValueRange
, DoubleValueRange
, BigDecimalValueRange
, ...
(Implementation detail: we'll retro-fit those Collection-returning methods into a CollectionValueRange
.)
Then the ValueSelector implementations will use that directly.
As for the suitability to optimize continuous variables:
- JIT random selection will be blazing fast and be very memory-efficient.
- If you have an NP-complete/NP-hard problem, then OptaPlanner will be a great match. If you have only continuous variables (and not a single discrete variable), then it's unlikely that your problem is NP-complete (unless your constraints counterprove that) and in that case you're better off with a custom, handmade, polynomial algorithm anyway (because it's not NP-complete, so there's an "easy" solution).