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


Java ValueRangeProvider类代码示例

本文整理汇总了Java中org.optaplanner.core.api.domain.valuerange.ValueRangeProvider的典型用法代码示例。如果您正苦于以下问题:Java ValueRangeProvider类的具体用法?Java ValueRangeProvider怎么用?Java ValueRangeProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ValueRangeProvider类属于org.optaplanner.core.api.domain.valuerange包,在下文中一共展示了ValueRangeProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAllRooms

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@ValueRangeProvider(id = "roomTimeslots")
@ProblemFactCollectionProperty
@JsonIgnore
public List<RoomTimeslot> getAllRooms() {
    Set<RoomTimeslot> res = new LinkedHashSet<>();
    Map<Room, List<RoomTimeslot>> customAvailable = groupSlots(getRoomAvailability());
    Map<Room, List<RoomTimeslot>> customUnavailable = groupSlots(getRoomUnavailability());
    for (Room room : getRooms()) {
        List<RoomTimeslot> timeslots = customAvailable.get(room);
        if (timeslots != null) {
            res.addAll(timeslots);
            continue;
        }
        for (Timeslot timeslot : getTimeslots()) {
            res.add(new RoomTimeslot(room, timeslot));
        }
        timeslots = customUnavailable.get(room);
        if (timeslots != null) {
            res.removeAll(timeslots);
        }
    }
    return new ArrayList<>(res);
}
 
开发者ID:vlsi,项目名称:confplanner,代码行数:24,代码来源:ConferenceData.java

示例2: getPlannerAnnotations

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
public static Map<String, AnnotationDefinition> getPlannerAnnotations() {
    HashMap<String, AnnotationDefinition> annotations = new HashMap<String, AnnotationDefinition>();

    annotations.put(PlanningEntity.class.getName(),
                    DriverUtils.buildAnnotationDefinition(PlanningEntity.class));
    annotations.put(PlanningSolution.class.getName(),
                    DriverUtils.buildAnnotationDefinition(PlanningSolution.class));
    annotations.put(PlanningVariable.class.getName(),
                    DriverUtils.buildAnnotationDefinition(PlanningVariable.class));
    annotations.put(ValueRangeProvider.class.getName(),
                    DriverUtils.buildAnnotationDefinition(ValueRangeProvider.class));

    return annotations;
}
 
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:15,代码来源:PlannerTestUtil.java

示例3: planningSolutionSettings

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@Test
public void planningSolutionSettings() {

    PlannerDataObjectFieldEditor fieldEditor = createFieldEditor();

    //first configure the DataObject as a PlanningSolution
    DataObject dataObject = context.getDataObject();
    dataObject.addAnnotation(new AnnotationImpl(context.getAnnotationDefinition(PlanningSolution.class.getName())));
    dataObject.addProperty("score",
                           HardSoftScore.class.getName());

    ObjectProperty field1 = dataObject.getProperty("field1");
    //emulates the selection of field1
    context.setObjectProperty(field1);

    //The domain editors typically reacts upon DataModelerContext changes.
    //when the context changes the editor will typically be reloaded.
    fieldEditor.onContextChange(context);

    when(view.getValueRangeProviderValue()).thenReturn(true);
    when(view.getValueRangeProviderIdValue()).thenReturn("valueRangeProviderIdValue");

    //emulate the user input
    fieldEditor.onValueRangeProviderChange();
    fieldEditor.onValueRangeProviderIdChange();

    assertNotNull(field1.getAnnotation(ValueRangeProvider.class.getName()));
    assertEquals("valueRangeProviderIdValue",
                 AnnotationValueHandler.getStringValue(field1,
                                                       ValueRangeProvider.class.getName(),
                                                       "id"));
}
 
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:33,代码来源:PlannerDataObjectFieldEditorTest.java

示例4: getEmployeeList

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@ValueRangeProvider(id = "employeeRange")
public List<Employee> getEmployeeList() {
    return employeeList;
}
 
开发者ID:bibryam,项目名称:rotabuilder,代码行数:5,代码来源:EmployeeRoster.java

示例5: getHostList

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@ValueRangeProvider(id = "hostRange")
@ProblemFactCollectionProperty
public List<Host> getHostList() {
    return hostList;
}
 
开发者ID:WiserUFBA,项目名称:tutorial-optaplanner,代码行数:6,代码来源:Controller.java

示例6: getRooms

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@ValueRangeProvider(id = "roomsProvider")
@ProblemFactCollectionProperty
public List<Room> getRooms() {
    return rooms;
}
 
开发者ID:vlsi,项目名称:confplanner,代码行数:6,代码来源:ConferenceData.java

示例7: getTimeslots

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@ValueRangeProvider(id = "timeslotsProvider")
@ProblemFactCollectionProperty
public List<Timeslot> getTimeslots() {
    return timeslots;
}
 
开发者ID:vlsi,项目名称:confplanner,代码行数:6,代码来源:ConferenceData.java

示例8: getComputerList

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@ValueRangeProvider(id = "computerRange")
public List<CloudComputer> getComputerList() {
    return computerList;
}
 
开发者ID:xmlking,项目名称:ml-experiments,代码行数:5,代码来源:CloudBalance.java

示例9: getTransportList

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@PlanningEntityCollectionProperty
@ValueRangeProvider(id = "transportRange")
public List<Transport> getTransportList() {
    return transportList;
}
 
开发者ID:CSSE497,项目名称:pathfinder-routing,代码行数:6,代码来源:RoutingSolution.java

示例10: getCommodityActionList

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@PlanningEntityCollectionProperty
@ValueRangeProvider(id = "commodityActionRange")
public List<CommodityAction> getCommodityActionList() {
    return commodityActionList;
}
 
开发者ID:CSSE497,项目名称:pathfinder-routing,代码行数:6,代码来源:RoutingSolution.java

示例11: getHorario

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@ValueRangeProvider(id = "Horario")
public List<Horario> getHorario() {
    return horarios;
}
 
开发者ID:Sakamotto,项目名称:Projeto-Flash,代码行数:5,代码来源:AlocacaoHorario.java

示例12: getTasks

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@ValueRangeProvider(id = "tasks")
public Set<Task> getTasks() {
	return tasks;
}
 
开发者ID:bibryam,项目名称:employee-task-assignment,代码行数:5,代码来源:ProblemDefinition.java

示例13: getReindeerList

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@PlanningEntityCollectionProperty
@ValueRangeProvider(id = "reindeerRange")
public List<Reindeer> getReindeerList() {
    return reindeerList;
}
 
开发者ID:ge0ffrey,项目名称:santas-stolen-sleigh,代码行数:6,代码来源:ReindeerRoutingSolution.java

示例14: getGiftAssignmentList

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@PlanningEntityCollectionProperty
@ValueRangeProvider(id = "giftAssignmentRange")
public List<GiftAssignment> getGiftAssignmentList() {
    return giftAssignmentList;
}
 
开发者ID:ge0ffrey,项目名称:santas-stolen-sleigh,代码行数:6,代码来源:ReindeerRoutingSolution.java

示例15: getColorList

import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; //导入依赖的package包/类
@ValueRangeProvider(id = "colorRange")
public List<Color> getColorList() {
    return colorList;
}
 
开发者ID:ge0ffrey,项目名称:coursera-discrete-optimization,代码行数:5,代码来源:ColoringSolution.java


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