当前位置: 首页>>代码示例>>Java>>正文


Java Solver.getProperties方法代码示例

本文整理汇总了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());
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:17,代码来源:SimpleSearch.java

示例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());
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:15,代码来源:BacktrackSelection.java

示例3: NeighbourSelectionWithSuggestions

import org.cpsolver.ifs.solver.Solver; //导入方法依赖的package包/类
public NeighbourSelectionWithSuggestions(Solver<Lecture, Placement> solver) throws Exception {
    this(solver.getProperties());
    init(solver);
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:5,代码来源:NeighbourSelectionWithSuggestions.java

示例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()));
}
 
开发者ID:UniTime,项目名称:cpsolver,代码行数:60,代码来源:StudentSctNeighbourSelection.java


注:本文中的org.cpsolver.ifs.solver.Solver.getProperties方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。