我正在使用optaplanner spring boot starter来解决员工排班问题。我有两个类,员工和计划实体轮班。目前,我正在使用如下所示的约束提供程序根据员工的技能水平为他们分配班次。 public class ConstraintProvider implements
org.optaplanner.core.api.score.stream.ConstraintProvider {
@Override
public Constraint[] defineConstraints(ConstraintFactory constraint
我有一个小的OptaPlanner应用程序,在没有Spring Boot的情况下工作得很好。我基本上改变了云平衡opta应用的用途。我还包含了所有Spring Boot依赖项。POM父对象是spring-boot-starter-parent。我将optaplanner-spring-boot-starter作为依赖项。 通过这个设置,我仍然可以毫无问题地运行opta应用程序。然后我在项目中添加了一个Spring Boot应用程序。应用程序如下所示: package org.optaplanner.examples;
@SpringBootApplication
public class A
我在Java程序中有一个Drools文件(在本例中是Optaplanner的变体),我正在Netbeans 8上构建它。当我运行该程序时,会收到一条错误消息:
Exception in thread "main" java.lang.IllegalArgumentException: The scoreDrl (taskassignment/solver/taskAssignmentScoreRules.drl) does not exist as a classpath resource.
at org.optaplanner.core.config.score.direct
我的第一个OptaPlanner项目,将任务分配给工人。启动应用程序时出现以下错误:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.optaplanner.core.api.solver.SolverManager]: Factory method 'solverManager' threw exception; nested exception is java.lang.IllegalStateException: There are er
我刚开始使用Spring,遇到了一个我似乎无法解决的问题。我正在尝试使用一个名为的包。在这种情况下,我或多或少地跟随着一个简单的课程调度器,视频是,而我正在处理的部分发生在51:00。
我的问题是,流程的一个步骤需要依赖项注入,当我构建/运行Spring应用程序时,会得到以下错误:
Description:
Field solverManager in com.java.optaplex.resource.MainResource required a bean of type 'org.optaplanner.core.api.solver.SolverManager' t
我添加了optaplanner-spring-boot-starter依赖于Spring 应用程序,但是在Intellij上没有找到注入的SolverManager和ScoreManager bean。
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of method myBusinessBeanAPI in
mypackage.MyRestResource required a bean
of type '
我是OptaPlanner新手,在配置解决方案时遇到了一些困难。我已经正确地分析了所有的类,但是当求解器运行时,我得到了下面的错误。
A planning entity is an instance of a entitySubclass (class
org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector) that is not
configured as a planning entity.
If that class (DroolsScoreDirector) (or superclass thereo
我有一个optaplanner项目,该项目在8.17.0 fine上运行良好,但试图升级到8.18.0.Final或8.19.9。fine会导致以下错误:
Exception in thread "main" java.lang.IllegalStateException: Constraint Streams requested via constraintProviderClass (class v2.constraints.AuctionConstraintProvider) but the supporting classes were not found on the
我在同一个文件中有两个文件,folder.RuleFile.drl是规则库,Sample.drl是函数库。当我试图执行规则时,我会在下面提到错误。
我不知道我遗漏了什么,以及如何解决这个错误。任何帮助都是非常感谢的。
文件: RuleFile.drl
package com.sample
rule "A stand alone rule"
when
//conditions
then
myFunction(5);
end
文件: Sample.drl
package com.sample
function int myFuncti
我正在将Optaplanner从v7.x迁移到v8.14,这个项目使用了spring(作为web )。
我已经将optaplanner-spring-boot-starter依赖项添加到项目中,但是在启动应用程序时,我得到了以下错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'solverManager' defined in class path resource [org/optaplanner/spring/boot/autoconfigu
我在一个Spring/Optaplanner应用程序上获得了一个新的错误消息,该应用程序一直在运行,没有发生我不明白的事件:
编辑: Optaplanner版本为8.19.0.Optaplanner引导: 2.2.7.RELEASE
您正在尝试使用真理维护系统而不导入它。请将org.drools:drools模块添加到类路径中。]
Caused by: java.lang.IllegalStateException: There is an error in a scoreDrl or scoreDrlFile.
2022-10-24T20:49:11.164109+00:00 app[we
在尝试使用基准配置测试解决方案的解决方案时,我遇到了以下异常:
2021-12-22 15:24:37.328 WARN 22684 --- [ Test worker] c.o.b.i.D.singleBenchmarkRunnerException : The warm up singleBenchmarkRunner (Problem_0_Currently used_0) with random seed (null) failed.
java.lang.OutOfMemoryError: Java heap space
2021-12-22 15:24:37.329 W
我正在使用java和Drools 6.2.0开发一个Maven项目,我试图通过KieBase文件将一个特定的DRL文件“绑定”到一个kmodule.xml,但是我一直在获取错误
WARN org.drools.compiler.kie.builder.impl.AbstractKieModule - No files found for KieBase
在运行项目时。
我认为我已经以正确的方式配置了一切,如 (第4.2.2章-概述-构建、部署、利用和运行构建)所示,但我看不出我的错误在哪里。
在这个项目中,我认为我不能通过编码来声明/配置Drools,因为项目体系结构,这就是我使用kmodul