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
06ae8e1c
Commit
06ae8e1c
authored
Jan 21, 2026
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单件工时不在外面计算,和订单数量一起算
parent
a6b17e54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
7 deletions
+20
-7
OpMachine.java
src/main/java/com/aps/entity/Algorithm/OpMachine.java
+10
-1
GeneticDecoder.java
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
+10
-6
No files found.
src/main/java/com/aps/entity/Algorithm/OpMachine.java
View file @
06ae8e1c
...
...
@@ -27,5 +27,14 @@ public class OpMachine {
/**
* 单件工时
*/
private
double
processingTime
;
// 加工时间
private
double
processingTime
;
/**
* 单件工时
*/
private
BigDecimal
runtime
;
//持续时间
/**
* 产出
*/
private
BigDecimal
singleOut
;
//产出
}
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
View file @
06ae8e1c
...
...
@@ -268,6 +268,9 @@ if(finishedOrder==null||finishedOrder.size()==0)
opMachine
.
setSequence
(
sequence
);
opMachine
.
setMachineId
(
selectedMachine
.
getMachineId
());
opMachine
.
setProcessingTime
(
selectedMachine
.
getProcessingTime
());
opMachine
.
setRuntime
(
selectedMachine
.
getRuntime
());
opMachine
.
setSingleOut
(
selectedMachine
.
getSingleOut
());
opMachineMap
.
add
(
opMachine
);
}
...
...
@@ -350,7 +353,7 @@ if(finishedOrder==null||finishedOrder.size()==0)
// int changeoverTime =0; //(lastDiscreteParameter.isEmpty() ||
// lastDiscreteParameter.equals(currentOp.getDiscreteParameter())) ? 0 : 0;
int
actualEndTime
=
processWithSingleMachine
(
currentOp
,
machine
,
processTime
,
prevtime
,
chromosome
);
int
actualEndTime
=
processWithSingleMachine
(
currentOp
,
machine
,
processTime
,
prevtime
,
machineOption
,
chromosome
);
orderProcessCounter
.
put
(
groupId
,
orderProcessCounter
.
get
(
groupId
)
+
1
);
orderLastEndTime
.
put
(
groupId
,
actualEndTime
);
...
...
@@ -365,14 +368,15 @@ if(finishedOrder==null||finishedOrder.size()==0)
private
int
processWithSingleMachine
(
Entry
operation
,
Machine
machine
,
double
processingTime
,
int
prevOperationEndTime
,
Chromosome
chromosome
)
{
int
prevOperationEndTime
,
OpMachine
machineOption
,
Chromosome
chromosome
)
{
int
processingTimeTotal
=
0
;
int
earliestStartTime
=
prevOperationEndTime
;
if
(
operation
.
getConstTime
()==
1
)
//常数时间
{
processingTimeTotal
=(
int
)
Math
.
ceil
(
processingTime
);
}
else
{
processingTimeTotal
=(
int
)
Math
.
ceil
(
processingTime
*
operation
.
getQuantity
());
BigDecimal
t
=
machineOption
.
getSingleOut
().
divide
(
machineOption
.
getRuntime
()).
multiply
(
BigDecimal
.
valueOf
(
operation
.
getQuantity
()));
processingTimeTotal
=(
int
)
Math
.
ceil
(
t
.
doubleValue
());
}
if
(
machine
==
null
||
operation
.
getMachineOptions
()==
null
)
...
...
@@ -380,9 +384,9 @@ if(finishedOrder==null||finishedOrder.size()==0)
return
0
;
}
MachineOption
machineOption
=
operation
.
getMachineOptions
().
stream
()
.
filter
(
t
->
t
.
getMachineId
()==
machine
.
getId
())
.
findFirst
().
orElse
(
null
);
//
MachineOption machineOption= operation.getMachineOptions().stream()
//
.filter(t->t.getMachineId()==machine.getId())
//
.findFirst().orElse(null);
operation
.
setSelectMachineID
(
machine
.
getId
());
operation
.
setEquipCode
(
machine
.
getCode
());
...
...
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