本文整理汇总了Java中org.cpsolver.ifs.solver.Solver.getProperties方法的典型用法代码示例。如果您正苦于以下问题:Java Solver.getProperties方法的具体用法?Java Solver.getProperties怎么用?Java Solver.getProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.cpsolver.ifs.solver.Solver
的用法示例。
在下文中一共展示了Solver.getProperties方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.cpsolver.ifs.solver.Solver; //导入方法依赖的package包/类
/**
* Initialization
*/
@Override
public void init(Solver<V, T> solver) {
super.init(solver);
if (!solver.hasSingleSolution())
iCon = new ParallelConstruction<V, T>(solver.getProperties(), iCon == null ? iStd : iCon);
iStd.init(solver);
if (iCon != null)
iCon.init(solver);
iSA.init(solver);
iHC.init(solver);
iGD.init(solver);
iProgress = Progress.getInstance(solver.currentSolution().getModel());
}
示例2: init
import org.cpsolver.ifs.solver.Solver; //导入方法依赖的package包/类
public void init(Solver<Request, Enrollment> solver, String name) {
List<Request> variables = new ArrayList<Request>(iIncludeAssignedRequests ? solver.currentSolution().getModel().variables() : solver.currentSolution().getModel().unassignedVariables(solver.currentSolution().getAssignment()));
Collections.shuffle(variables);
iRequests = new LinkedList<Request>(variables);
if (iRBtNSel == null) {
try {
iRBtNSel = new RandomizedBacktrackNeighbourSelection(solver.getProperties());
iRBtNSel.init(solver);
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
Progress.getInstance(solver.currentSolution().getModel()).setPhase(name, variables.size());
}
示例3: NeighbourSelectionWithSuggestions
import org.cpsolver.ifs.solver.Solver; //导入方法依赖的package包/类
public NeighbourSelectionWithSuggestions(Solver<Lecture, Placement> solver) throws Exception {
this(solver.getProperties());
init(solver);
}
示例4: setup
import org.cpsolver.ifs.solver.Solver; //导入方法依赖的package包/类
public void setup(Solver<Request, Enrollment> solver) {
if (iMPP)
registerSelection(new AssignInitialSelection(solver.getProperties()));
// Phase 1: section all students using incremental branch & bound (no
// unassignments)
registerSelection(iUseConstruction ?
new PriorityConstructionSelection(solver.getProperties()) :
new BranchBoundSelection(solver.getProperties()));
// Phase 2: pick a student (one by one) with an incomplete schedule, try
// to find an improvement
registerSelection(new SwapStudentSelection(solver.getProperties()));
// Phase 3: use standard value selection for some time
registerSelection(new StandardSelection(solver.getProperties(), getVariableSelection(), getValueSelection()));
// Phase 4: use backtrack neighbour selection
registerSelection(new BacktrackSelection(solver.getProperties()));
// Phase 5: pick a student (one by one) with an incomplete schedule, try
// to find an improvement, identify problematic students
SwapStudentSelection swapStudentSelection = new SwapStudentSelection(solver.getProperties());
registerSelection(swapStudentSelection);
// Phase 6: random unassignment of some problematic students
registerSelection(new RndUnProblStudSelection(solver.getProperties(), swapStudentSelection));
// Phase 7: resection incomplete students
registerSelection(new ResectionIncompleteStudentsSelection(solver.getProperties()));
// Phase 8: resection of students that were unassigned in step 6
registerSelection(new ResectionUnassignedStudentsSelection(solver.getProperties()));
// Phase 9: pick a student (one by one) with an incomplete schedule, try
// to find an improvement
registerSelection(new SwapStudentSelection(solver.getProperties()));
// Phase 10: use standard value selection for some time
registerSelection(new StandardSelection(solver.getProperties(), new RouletteWheelRequestSelection(solver.getProperties()), getValueSelection()));
// Phase 11: pick a student (one by one) with an incomplete schedule,
// try to find an improvement
registerSelection(new SwapStudentSelection(solver.getProperties()));
// Phase 12: use backtrack neighbour selection
registerSelection(new BacktrackSelection(solver.getProperties()));
if (iShuffleStudentsSelection) {
// Phase 13: try shuffling students around request groups
registerSelection(new ShuffleStudentsSelection(solver.getProperties()));
// Phase 14: use backtrack neighbour selection to fix unassignments from the previous phase
registerSelection(new BacktrackSelection(solver.getProperties()));
}
// Phase 15: random unassignment of some students
registerSelection(new RandomUnassignmentSelection(solver.getProperties()));
}