Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
HYH.APSJ
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
佟礼
HYH.APSJ
Commits
bd586664
Commit
bd586664
authored
Apr 20, 2026
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料需求
parent
587dadb1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
3 deletions
+30
-3
GeneticDecoder.java
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
+13
-0
RoutingDataService.java
...in/java/com/aps/service/Algorithm/RoutingDataService.java
+9
-1
VariableNeighborhoodSearch.java
...com/aps/service/Algorithm/VariableNeighborhoodSearch.java
+8
-2
No files found.
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
View file @
bd586664
...
@@ -589,6 +589,19 @@ public class GeneticDecoder {
...
@@ -589,6 +589,19 @@ public class GeneticDecoder {
public
void
parallelDecodeByMachine
(
Chromosome
chromosome
)
{
public
void
parallelDecodeByMachine
(
Chromosome
chromosome
)
{
if
(
rebuildStructureForCurrentDecode
)
{
//创建半成品订单
materialRequirementService
.
buildMultiLevelRequirementNetwork
(
chromosome
,
sceneId
,
baseTime
,
_globalParam
);
}
if
(
rebuildStructureForCurrentDecode
&&
_globalParam
.
isIsCheckSf
())
{
int
isnew
=
generateGlobalOpList
(
chromosome
);
if
(
isnew
==
1
)
{
CreateNewOpSequence
(
chromosome
);
}
}
// 1. 获取工序处理顺序
// 1. 获取工序处理顺序
List
<
Integer
>
operationSequencing
=
chromosome
.
getOperationSequencing
();
List
<
Integer
>
operationSequencing
=
chromosome
.
getOperationSequencing
();
...
...
src/main/java/com/aps/service/Algorithm/RoutingDataService.java
View file @
bd586664
...
@@ -242,7 +242,15 @@ public class RoutingDataService {
...
@@ -242,7 +242,15 @@ public class RoutingDataService {
List
<
MachineOption
>
mos
=
new
ArrayList
<>();
List
<
MachineOption
>
mos
=
new
ArrayList
<>();
for
(
ProdEquipment
e
:
Equipments
)
{
for
(
ProdEquipment
e
:
Equipments
)
{
Double
totalprocessTime
=
e
.
getSpeed
()/
e
.
getSingleOut
().
doubleValue
()*
entry
.
getQuantity
();
Double
totalprocessTime
=
0
d
;
if
(
op
.
getConstTime
()==
1
)
//常数时间
{
totalprocessTime
=
e
.
getSpeed
();
}
else
{
totalprocessTime
=
e
.
getSpeed
()/
e
.
getSingleOut
().
doubleValue
()*
entry
.
getQuantity
();
}
if
(
machineIds
.
containsKey
(
e
.
getEquipId
()))
if
(
machineIds
.
containsKey
(
e
.
getEquipId
()))
{
{
if
(
machineIds
.
get
(
e
.
getEquipId
())<
totalprocessTime
)
if
(
machineIds
.
get
(
e
.
getEquipId
())<
totalprocessTime
)
...
...
src/main/java/com/aps/service/Algorithm/VariableNeighborhoodSearch.java
View file @
bd586664
...
@@ -646,9 +646,15 @@ public class VariableNeighborhoodSearch {
...
@@ -646,9 +646,15 @@ public class VariableNeighborhoodSearch {
Entry
entry1
=
entrybyids
.
get
(
op1
.
getOperationId
());
Entry
entry1
=
entrybyids
.
get
(
op1
.
getOperationId
());
Entry
entry2
=
entrybyids
.
get
(
op2
.
getOperationId
());
Entry
entry2
=
entrybyids
.
get
(
op2
.
getOperationId
());
if
(
entry1
==
null
||
entry2
==
null
)
{
if
(
entry1
==
null
&&
entry2
==
null
)
{
return
0
;
return
0
;
}
}
if
(
entry1
==
null
)
{
return
1
;
}
if
(
entry2
==
null
)
{
return
-
1
;
}
int
size1
=
priorityToGroupIds
.
getOrDefault
(
entry1
.
getPriority
(),
new
HashSet
<>()).
size
();
int
size1
=
priorityToGroupIds
.
getOrDefault
(
entry1
.
getPriority
(),
new
HashSet
<>()).
size
();
int
size2
=
priorityToGroupIds
.
getOrDefault
(
entry2
.
getPriority
(),
new
HashSet
<>()).
size
();
int
size2
=
priorityToGroupIds
.
getOrDefault
(
entry2
.
getPriority
(),
new
HashSet
<>()).
size
();
...
@@ -1840,7 +1846,7 @@ public class VariableNeighborhoodSearch {
...
@@ -1840,7 +1846,7 @@ public class VariableNeighborhoodSearch {
for
(
int
i
=
1
;
i
<=
op
.
getMachineOptions
().
size
();
i
++)
{
for
(
int
i
=
1
;
i
<=
op
.
getMachineOptions
().
size
();
i
++)
{
if
(
i
!=
currentMachineSeq
)
{
if
(
i
!=
currentMachineSeq
)
{
availableMachines
.
add
(
i
);
availableMachines
.
add
(
i
);
machineOptions
.
add
(
op
.
getMachineOptions
().
get
(
i
));
machineOptions
.
add
(
op
.
getMachineOptions
().
get
(
i
-
1
));
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment