Examples of PlanningVariableDescriptor


Examples of org.drools.planner.core.domain.variable.PlanningVariableDescriptor

                if (propertyDescriptor.getWriteMethod() == null) {
                    throw new IllegalStateException("The planningEntityClass (" + planningEntityClass
                            + ") has a PlanningVariable annotated property (" + propertyDescriptor.getName()
                            + ") that should have a setter.");
                }
                PlanningVariableDescriptor planningVariableDescriptor = new PlanningVariableDescriptor(
                        this, propertyDescriptor);
                planningVariableDescriptorMap.put(propertyDescriptor.getName(), planningVariableDescriptor);
            }
        }
        if (noPlanningVariableAnnotation) {
View Full Code Here

Examples of org.drools.planner.core.domain.variable.PlanningVariableDescriptor

    public void doStep() {
        WorkingMemory workingMemory = greedyFitSolverPhaseScope.getWorkingMemory();
        FactHandle factHandle = workingMemory.getFactHandle(planningEntity);
        for (Map.Entry<PlanningVariableDescriptor, Object> entry : variableToValueMap.entrySet()) {
            PlanningVariableDescriptor planningVariableDescriptor = entry.getKey();
            Object value = entry.getValue();
            planningVariableDescriptor.setValue(planningEntity, value);
        }
        workingMemory.update(factHandle, planningEntity);
        // there is no need to recalculate the score, but we still need to set it
        greedyFitSolverPhaseScope.getWorkingSolution().setScore(score);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.