Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5f79e72a
authored
Jul 18, 2023
by
张晓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整运行时间
1 parent
d135bab3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
project-dispatch/src/main/java/com/dituhui/pea/dispatch/controller/PrepareController.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/scheduler/BatchScheduler.java
project-dispatch/src/test/java/com/dituhui/pea/dispatch/SolveServiceTest.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/controller/PrepareController.java
View file @
5f79e72
...
@@ -53,7 +53,7 @@ public class PrepareController {
...
@@ -53,7 +53,7 @@ public class PrepareController {
SolverConfig
solverConfig
=
new
SolverConfig
().
withSolutionClass
(
DispatchSolution
.
class
);
SolverConfig
solverConfig
=
new
SolverConfig
().
withSolutionClass
(
DispatchSolution
.
class
);
solverConfig
.
withEntityClassList
(
Arrays
.
asList
(
Technician
.
class
,
Customer
.
class
));
// 这里不能漏掉,否则约束不生效
solverConfig
.
withEntityClassList
(
Arrays
.
asList
(
Technician
.
class
,
Customer
.
class
));
// 这里不能漏掉,否则约束不生效
solverConfig
.
withConstraintProviderClass
(
DispatchConstraintProvider
.
class
);
solverConfig
.
withConstraintProviderClass
(
DispatchConstraintProvider
.
class
);
solverConfig
.
withTerminationSpentLimit
(
Duration
.
ofSeconds
(
10
));
solverConfig
.
withTerminationSpentLimit
(
Duration
.
ofSeconds
(
60
*
5
));
SolverFactory
<
DispatchSolution
>
solverFactory
=
SolverFactory
.
create
(
solverConfig
);
SolverFactory
<
DispatchSolution
>
solverFactory
=
SolverFactory
.
create
(
solverConfig
);
solver
=
solverFactory
.
buildSolver
();
solver
=
solverFactory
.
buildSolver
();
...
...
project-dispatch/src/main/java/com/dituhui/pea/dispatch/scheduler/BatchScheduler.java
View file @
5f79e72
...
@@ -55,7 +55,7 @@ public class BatchScheduler {
...
@@ -55,7 +55,7 @@ public class BatchScheduler {
SolverConfig
solverConfig
=
new
SolverConfig
().
withSolutionClass
(
DispatchSolution
.
class
);
SolverConfig
solverConfig
=
new
SolverConfig
().
withSolutionClass
(
DispatchSolution
.
class
);
solverConfig
.
withEntityClassList
(
Arrays
.
asList
(
Technician
.
class
,
Customer
.
class
));
// 这里不能漏掉,否则约束不生效
solverConfig
.
withEntityClassList
(
Arrays
.
asList
(
Technician
.
class
,
Customer
.
class
));
// 这里不能漏掉,否则约束不生效
solverConfig
.
withConstraintProviderClass
(
DispatchConstraintProvider
.
class
);
solverConfig
.
withConstraintProviderClass
(
DispatchConstraintProvider
.
class
);
solverConfig
.
withTerminationSpentLimit
(
Duration
.
ofSeconds
(
20
));
solverConfig
.
withTerminationSpentLimit
(
Duration
.
ofSeconds
(
60
*
5
));
SolverFactory
<
DispatchSolution
>
solverFactory
=
SolverFactory
.
create
(
solverConfig
);
SolverFactory
<
DispatchSolution
>
solverFactory
=
SolverFactory
.
create
(
solverConfig
);
solver
=
solverFactory
.
buildSolver
();
solver
=
solverFactory
.
buildSolver
();
...
...
project-dispatch/src/test/java/com/dituhui/pea/dispatch/SolveServiceTest.java
View file @
5f79e72
...
@@ -40,7 +40,7 @@ class SolveServiceTest {
...
@@ -40,7 +40,7 @@ class SolveServiceTest {
ExtractService
extractService
;
ExtractService
extractService
;
String
groupId
=
"gsuzhou"
;
String
groupId
=
"gsuzhou"
;
String
day
=
"2023-0
7-11
"
;
String
day
=
"2023-0
3-20
"
;
private
SolverManager
<
DispatchSolution
,
UUID
>
solverManager
;
private
SolverManager
<
DispatchSolution
,
UUID
>
solverManager
;
private
Solver
<
DispatchSolution
>
solver
;
private
Solver
<
DispatchSolution
>
solver
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment