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


Java PlanningVariable类代码示例

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


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

示例1: getPlannerAnnotations

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的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

示例2: fieldPlanningEntitySettings

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

    PlannerDataObjectFieldEditor fieldEditor = createFieldEditor();

    //first configure the DataObject as a PlanningEntity
    DataObject dataObject = context.getDataObject();
    dataObject.addAnnotation(new AnnotationImpl(context.getAnnotationDefinition(PlanningEntity.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);

    //emulate the user input
    when(view.getPlanningVariableValue()).thenReturn(true);
    when(view.getValueRangeProviderRefsValue()).thenReturn("valueRangeProviderRefsValue");

    fieldEditor.onPlanningVariableChange();
    fieldEditor.onValueRangeProviderRefsChange();

    List<String> valueRangeProviderRefs = new ArrayList<String>();
    valueRangeProviderRefs.add("valueRangeProviderRefsValue");
    assertNotNull(field1.getAnnotation(PlanningVariable.class.getName()));
    assertEquals(valueRangeProviderRefs,
                 field1.getAnnotation(PlanningVariable.class.getName()).getValue("valueRangeProviderRefs"));
}
 
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:31,代码来源:PlannerDataObjectFieldEditorTest.java

示例3: getPreviousVisit

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@Nullable
@PlanningVariable(strengthComparatorClass = VisitStrengthComparator.class,
                  valueRangeProviderRefs = {
                    PDPSolution.PARCEL_RANGE,
                    PDPSolution.VEHICLE_RANGE
                  },
                  graphType = PlanningVariableGraphType.CHAINED)
public Visit getPreviousVisit() {
  return previousVisit;
}
 
开发者ID:rinde,项目名称:RinLog,代码行数:11,代码来源:ParcelVisit.java

示例4: getEmployee

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@PlanningVariable(valueRangeProviderRefs = {"employeeRange"}, strengthComparatorClass = EmployeeStrengthComparator.class)
public Employee getEmployee() {
    return employee;
}
 
开发者ID:bibryam,项目名称:rotabuilder,代码行数:5,代码来源:ShiftAssignment.java

示例5: getHostAssociated

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@PlanningVariable(valueRangeProviderRefs = {"hostRange"},
        strengthComparatorClass = HostStrengthComparator.class)
public Host getHostAssociated() {
    return hostAssociated;
}
 
开发者ID:WiserUFBA,项目名称:tutorial-optaplanner,代码行数:6,代码来源:Bundle.java

示例6: getRoom

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@PlanningVariable(valueRangeProviderRefs = "roomsProvider", strengthComparatorClass = Room.RoomByCapacity.class)
public Room getRoom() {
    return room;
}
 
开发者ID:vlsi,项目名称:confplanner,代码行数:5,代码来源:TalkPlacement.java

示例7: getSlot

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@PlanningVariable(valueRangeProviderRefs = "timeslotsProvider")
public Timeslot getSlot() {
    return slot;
}
 
开发者ID:vlsi,项目名称:confplanner,代码行数:5,代码来源:TalkPlacement.java

示例8: getComputer

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@PlanningVariable(valueRangeProviderRefs = {"computerRange"},
        strengthComparatorClass = CloudComputerStrengthComparator.class)
public CloudComputer getComputer() {
    return computer;
}
 
开发者ID:xmlking,项目名称:ml-experiments,代码行数:6,代码来源:CloudProcess.java

示例9: getPreviousRouteAction

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@PlanningVariable(valueRangeProviderRefs = {"transportRange", "commodityActionRange"},
    graphType = PlanningVariableGraphType.CHAINED)
public RouteAction getPreviousRouteAction() {
    return previousRouteAction;
}
 
开发者ID:CSSE497,项目名称:pathfinder-routing,代码行数:6,代码来源:CommodityAction.java

示例10: getHorario

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@PlanningVariable(valueRangeProviderRefs = {"Horario"},
        strengthComparatorClass = HorarioStrengthComparator.class)
public Horario getHorario() {
    return horario;
}
 
开发者ID:Sakamotto,项目名称:Projeto-Flash,代码行数:6,代码来源:Alocacao.java

示例11: getTask

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@PlanningVariable(valueRangeProviderRefs = { "tasks" }, nullable = true )
public Task getTask() {
	return task;
}
 
开发者ID:bibryam,项目名称:employee-task-assignment,代码行数:5,代码来源:Employee.java

示例12: getPreviousStandstill

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@PlanningVariable(valueRangeProviderRefs = {"reindeerRange", "giftAssignmentRange"},
        graphType = PlanningVariableGraphType.CHAINED)
public Standstill getPreviousStandstill() {
    return previousStandstill;
}
 
开发者ID:ge0ffrey,项目名称:santas-stolen-sleigh,代码行数:6,代码来源:GiftAssignment.java

示例13: getColor

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@PlanningVariable(valueRangeProviderRefs = {"colorRange"})
public Color getColor() {
    return color;
}
 
开发者ID:ge0ffrey,项目名称:coursera-discrete-optimization,代码行数:5,代码来源:Node.java

示例14: getInside

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@PlanningVariable(valueRangeProviderRefs = {"insideRange"})
public Boolean getInside() {
    return inside;
}
 
开发者ID:ge0ffrey,项目名称:coursera-discrete-optimization,代码行数:5,代码来源:Item.java

示例15: getFaculty

import org.optaplanner.core.api.domain.variable.PlanningVariable; //导入依赖的package包/类
@PlanningVariable(valueRangeProviderRefs = {"facultyRange"})
public Faculty getFaculty() {
    return faculty;
}
 
开发者ID:ge0ffrey,项目名称:coursera-discrete-optimization,代码行数:5,代码来源:Customer.java


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