On 08-05-14 10:08, dBijkoo wrote:
Im dealing with the almost the same problem as the original poster.
The only
difference is that the subset of entity specific variables and the total
amount of possible variables spread over all entity specific variables has a
factor of up to 24 in between them. This combined with the amount of enities
makes it a huge increase in total amount of possibilities. This gives me the
feeling that using the evaluation class wastes a lot of time evaluation
solution which would never be viable.
Since the original post is 1 and a half years old and a lot of new versions
have been released since then, I was wondering if the same solution applies
to my problem aswell and how it compares to my solution which i described
below.
At the moment i solved it as follows:
PlanningEntity A has the following @PlanningVariable annotation
a class x where the @ValueRangeProvider of x is provided by the
@PlanningSolution annotated class.
a class y where the @ValueRangeProvider uses x to provide the subset of
classes y if x is not null, otherwise it returns an empty list<Y> (code
below)
@ValueRangeProvider(id = "timePeriods")
public List<Period> getTimePeriods(){
ScheduleBlock s = getScheduleBlock();
if(s == null) {
return new ArrayList<Period>();
}
return getScheduleBlock().getTimePeriods();
}
This feels like a hack/workaround for the problem but feel free to let me
know what you think,
In OptaPlanner's architecture current philosophy, this is not legal:
a value range should be stable for each variable (of each entity) during
solving.
This not guaranteed to work (and it is guaranteed not to work if you do
phase caching of moves:
it will invalidly exclude part of the search space).
If it does work for you, I am interested to know more about this - so I
can consider to make this approach legal.
Thanks
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-Drools-Planner-what-if-poss...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users