I have solved a problem using optaPlanner using incremental java in which one planning variable and one planning Entity, But now in our project there is requirement in which many planning variables like we have to find the best Room(capacity, isAC etc etc) , Car(totalSeatsLeft , isAC etc etc ) and we do not know how many of resources are , Because everyday we need to add more resources as per the user requirement like conference room facility etc, So give me some idea so that we can make the Domain for Opta Planner. Thanks.
1
votes
Why don't you know how many resources are needed? Try lab201 of the training zip. It will teach how to reverse your thinking and pick the right class/field to be a planning entity/variable.
- Geoffrey De Smet
I know about all these , but let me clarify our problem to you .For Example we have to plan a Event , and for Event there are resources needed like Human Resource(depend on skills) , Rooms(depend on parking facility , A.C. etc) . Car Pooling facility depend on (Car and Location) etc . There are a lot of resources we have to plan , and may be the resource requirement change . Now We solve it for two planning variables Car and Rooms using incremental java . So , now my question is there any problem if we make many planning variables in a single planning Entity ? Thanks
- user3884200
1 Answers
1
votes
Each planning variable in an entity needs to be field. Currently OptaPlanner does not support having an array (or list) which is a planning variable. It's unclear if we 'll ever want to do that (because it introduces other issues).
Why doesn't something like this work?
@PlanningEntity class Event {
long eventId;
long eventName;
@PlanningVariable Car car;
@PlanningVariable Room room;
}