On 09-09-13 16:13, Andrew Varner wrote:
Optaplanners,
I'm looking to add some dynamic goodness to ValueRangeProvider. The only way I see to
specify a ValueRangeProvider is via annotation.
I'd like to be able to generate the id and Collection of candidate values
dynamically. Is it possible to generate the ValueRangeProvider data outside of an
annotation?
For example:
public class MyDataSource {
public Collection getValues(String id) {
…
return values;
}
}
First, I thought you were asking for this issue:
https://issues.jboss.org/browse/PLANNER-190
That would allow you to generate the Collection dynamically (although
you can already do that now with an entity based value range and
somewhat with a solution based value range).
But you want to "generate the id of ValueRangeProvider dynamically"?!
Interesting :) Why?
That implies that you also want to generate the planning entities and
their variables dynamically,
because there's no use in generating a provider id if you're not going
to use it.
Long term we 'll support this because we'll support an alternative to
annotations too,
but why does your use case need it now?
Also, you might want to read these references:
http://stackoverflow.com/questions/18343221/does-optaplanner-support-opti...
https://issues.jboss.org/browse/PLANNER-160
Note: 160 won't allow you to generate the value provider id at runtime.
Thanks,
Drew
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users