> 2. Question about the cloneSolution. > > I have 3 properties in my Solution implementation. > ArrayList<Material> materials; // Problem Facts > ArrayList<ServiceRequest> serviceRequests; // Planning Entities > SimpleScore score; > > In example, I noticed that Planning Entity is cloned but Problem Facts is > not cloned. > Why problem facts not cloned? It's a waste of performance time: they don't change during planning. Only entity classes changes during planning. The clone() method is called every time a new best solution is found (to recall it later while the workingSolution proceeds).
This works even in the face of real-time planning, where the problem facts look like they change during planning, but actually the problem facts only change "in between" planning, not during. -- With kind regards, Geoffrey De Smet _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
