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
213387bd
Commit
213387bd
authored
Nov 26, 2025
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
遗传算法
parent
06f5b03d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
1 deletion
+62
-1
Material.java
src/main/java/com/aps/entity/basic/Material.java
+54
-0
PlanResultService.java
src/main/java/com/aps/service/plan/PlanResultService.java
+8
-1
No files found.
src/main/java/com/aps/entity/basic/Material.java
0 → 100644
View file @
213387bd
package
com
.
aps
.
entity
.
basic
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 物料实体类
*/
@Data
public
class
Material
{
/**
* 物料ID
*/
private
int
Id
;
/**
* 物料名称
*/
private
String
name
;
/**
* 当前库存
*/
private
double
CurrentStock
;
/**
* 在途物料(预计到货)
*/
private
List
<
MaterialSupply
>
InTransit
=
new
ArrayList
<>();
/**
* 采购周期
*/
private
int
PurchaseLeadTime
;
/**
* 物料类型
*/
private
MaterialType
MaterialType
;
@Override
public
String
toString
()
{
return
"Material{"
+
"id="
+
Id
+
", name='"
+
name
+
'\''
+
", currentStock="
+
CurrentStock
+
", inTransit="
+
InTransit
+
", purchaseLeadTime="
+
PurchaseLeadTime
+
", type="
+
MaterialType
+
'}'
;
}
}
src/main/java/com/aps/service/plan/PlanResultService.java
View file @
213387bd
...
...
@@ -7,11 +7,13 @@ import com.aps.entity.Algorithm.Chromosome;
import
com.aps.entity.Algorithm.GAScheduleResult
;
import
com.aps.entity.Algorithm.ScheduleParams
;
import
com.aps.entity.Algorithm.ScheduleResultDetail
;
import
com.aps.entity.MesHoliday
;
import
com.aps.entity.basic.ScheduleChromosome
;
import
com.aps.entity.Schedule.GenVO
;
import
com.aps.entity.Schedule.MachineVO
;
import
com.aps.entity.basic.*
;
import
com.aps.service.Algorithm.GeneticAlgorithm
;
import
com.aps.service.MesHolidayService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -26,7 +28,11 @@ public class PlanResultService {
// 注入FileUploadController
@Autowired
private
FileUploadController
fileUploadController
;
@Autowired
private
MesHolidayService
_MesHolidayService
;
private
final
LocalDateTime
baseTime
=
LocalDateTime
.
of
(
2025
,
10
,
1
,
0
,
0
,
0
);
public
List
<
ScheduleChromosome
>
execute
()
{
...
...
@@ -129,6 +135,7 @@ public class PlanResultService {
param
.
setPopulationSize
(
50
);
param
.
setMaxIterations
(
100
);
// List<MesHoliday> holidays= _MesHolidayService.list();
// 创建节假日
List
<
Holiday
>
holidays
=
Arrays
.
asList
(
...
...
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