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
273eaaae
Commit
273eaaae
authored
Nov 21, 2025
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加实体类
parent
cd22f5cc
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
271 additions
and
0 deletions
+271
-0
Chromosome.java
src/main/java/com/aps/entity/basic/Chromosome.java
+64
-0
Entry.java
src/main/java/com/aps/entity/basic/Entry.java
+64
-0
MaterialRequirement.java
src/main/java/com/aps/entity/basic/MaterialRequirement.java
+41
-0
MaterialSupply.java
src/main/java/com/aps/entity/basic/MaterialSupply.java
+40
-0
MaterialType.java
src/main/java/com/aps/entity/basic/MaterialType.java
+21
-0
ScheduleResult.java
src/main/java/com/aps/entity/basic/ScheduleResult.java
+24
-0
ScheduleResultDetail.java
src/main/java/com/aps/entity/basic/ScheduleResultDetail.java
+14
-0
PlanResultService.java
src/main/java/com/aps/service/plan/PlanResultService.java
+3
-0
No files found.
src/main/java/com/aps/entity/basic/Chromosome.java
0 → 100644
View file @
273eaaae
package
com
.
aps
.
entity
.
basic
;
import
lombok.Data
;
import
java.util.List
;
/**
* 作者:佟礼
* 时间:2025-11-21
*/
@Data
public
class
Chromosome
{
/// <summary>
/// 机器选择部分(可选机器集中的顺序号)
/// </summary>
public
List
<
Integer
>
machineSelection
;
/// <summary>
/// 工序排序部分(工件/订单ID)
/// </summary>
public
List
<
Integer
>
operationSequencing
;
/// <summary>
/// 适应度值
/// </summary>
public
double
fitness
;
/// <summary>
/// 机器
/// </summary>
public
List
<
Machine
>
machines
;
/// <summary>
/// 解码后的调度结果
/// </summary>
public
List
<
ScheduleResult
>
result
;
/// <summary>
/// 最早完工时间
/// </summary>
public
double
makespan
;
/// <summary>
/// 总流程时间
/// </summary>
public
double
totalFlowTime
;
/// <summary>
/// 总换型时间
/// </summary>
public
double
totalChangeoverTime
;
/// <summary>
/// 机器负载标准差(越小越均衡)
/// </summary>
public
double
machineLoadStd
;
/// <summary>
/// 交付期延迟时间
/// </summary>
public
double
delayTime
;
}
src/main/java/com/aps/entity/basic/Entry.java
0 → 100644
View file @
273eaaae
package
com
.
aps
.
entity
.
basic
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 作者:佟礼
* 时间:2025-11-21
*/
@Data
public
class
Entry
{
public
Entry
()
{
PrevEntryIds
=
new
ArrayList
<
Integer
>();
}
/**
* 基因编号
*/
public
int
Id
;
/**
* 所属组ID 需要按照前后顺序生产的工单给一组
*/
public
int
GroupId
;
/**
* 基因编号
*/
public
int
OperationID
;
/**
* 离散参数
*/
public
String
DiscreteParameter
;
/**
* 基因编号
*/
public
int
Priority
;
/**
* 基因编号
*/
public
int
Quantity
;
/**
* 工序顺序
*/
public
int
Sequence
;
/**
* 可选设备列表
*/
public
List
<
MachineOption
>
MachineOptions
;
/**
* 前工单ID
*/
public
List
<
Integer
>
PrevEntryIds
;
//前工序
/**
* 是否可中断,间缝插针
*/
public
Boolean
IsInterrupt
=
true
;
/**
* 所需物料
*/
public
List
<
MaterialRequirement
>
MaterialRequirements
;
// 所需物料
}
src/main/java/com/aps/entity/basic/MaterialRequirement.java
0 → 100644
View file @
273eaaae
package
com
.
aps
.
entity
.
basic
;
/**
* 作者:佟礼
* 时间:2025-11-21
*/
import
lombok.Data
;
import
java.math.BigDecimal
;
/**
* 物料需求实体类
*/
@Data
public
class
MaterialRequirement
{
/**
* 物料ID
*/
public
int
materialId
;
/**
* 物料类型
*/
public
MaterialType
materialType
;
/**
* 该工序需要的物料数量
*/
public
BigDecimal
requiredQuantity
;
@Override
public
String
toString
()
{
return
"MaterialRequirement{"
+
"materialId="
+
materialId
+
", materialType="
+
materialType
+
", requiredQuantity="
+
requiredQuantity
+
'}'
;
}
}
src/main/java/com/aps/entity/basic/MaterialSupply.java
0 → 100644
View file @
273eaaae
package
com
.
aps
.
entity
.
basic
;
/**
* 作者:佟礼
* 时间:2025-11-21
*/
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* 在途物料(采购/生产中)
*/
@Data
public
class
MaterialSupply
{
/**
* 物料ID
*/
public
int
materialId
;
/**
* 数量
*/
public
double
quantity
;
/**
* 预计到货时间
*/
public
LocalDateTime
arrivalTime
;
@Override
public
String
toString
()
{
return
"MaterialSupply{"
+
"materialId="
+
materialId
+
", quantity="
+
quantity
+
", arrivalTime="
+
arrivalTime
+
'}'
;
}
}
src/main/java/com/aps/entity/basic/MaterialType.java
0 → 100644
View file @
273eaaae
package
com
.
aps
.
entity
.
basic
;
/**
* 物料类型枚举
*/
public
enum
MaterialType
{
/**
* 原材料
*/
RawMaterial
,
/**
* 中间品
*/
SemiFinished
,
/**
* 成品
*/
FinishedProduct
}
\ No newline at end of file
src/main/java/com/aps/entity/basic/ScheduleResult.java
0 → 100644
View file @
273eaaae
package
com
.
aps
.
entity
.
basic
;
import
lombok.Data
;
import
java.util.List
;
/**
* 作者:佟礼
* 时间:2025-11-21
*/
@Data
public
class
ScheduleResult
{
public
int
groupId
;
public
int
productId
;
public
int
operationId
;
public
int
machineId
;
public
int
startTime
;
// 相对开始时间(分钟)
public
int
endTime
;
// 相对结束时间(分钟)
public
int
quantity
;
// 批次大小(订单可拆分)
public
List
<
ScheduleResultDetail
>
geneDetails
;
// 时间详情
public
int
oneTime
;
// 单件工时
public
int
processingTime
;
// 绝对处理时间(分钟)
public
int
changeoverTime
;
}
src/main/java/com/aps/entity/basic/ScheduleResultDetail.java
0 → 100644
View file @
273eaaae
package
com
.
aps
.
entity
.
basic
;
import
lombok.Data
;
/**
* 作者:佟礼
* 时间:2025-11-21
*/
@Data
public
class
ScheduleResultDetail
{
public
String
key
;
public
int
startTime
;
// 相对开始时间(分钟)
public
int
endTime
;
// 相对结束时间(分钟)
}
src/main/java/com/aps/service/plan/PlanResultService.java
View file @
273eaaae
...
@@ -92,6 +92,9 @@ public class PlanResultService {
...
@@ -92,6 +92,9 @@ public class PlanResultService {
public
List
<
ScheduleChromosome
>
execute1
()
{
public
List
<
ScheduleChromosome
>
execute1
()
{
try
{
try
{
Entry
entry
=
new
Entry
();
// 1. 读取数据
// 1. 读取数据
List
<
Machine
>
machines
=
loadData
(
"machines.json"
,
Machine
.
class
);
List
<
Machine
>
machines
=
loadData
(
"machines.json"
,
Machine
.
class
);
List
<
Product
>
products
=
loadData
(
"products.json"
,
Product
.
class
);
List
<
Product
>
products
=
loadData
(
"products.json"
,
Product
.
class
);
...
...
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