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
d632519e
Commit
d632519e
authored
Apr 16, 2026
by
DESKTOP-VKRD9QF\Administration
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
核数计算
parent
40085732
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
ScheduleParams.java
src/main/java/com/aps/entity/Algorithm/ScheduleParams.java
+5
-2
No files found.
src/main/java/com/aps/entity/Algorithm/ScheduleParams.java
View file @
d632519e
...
@@ -173,8 +173,11 @@ public class ScheduleParams {
...
@@ -173,8 +173,11 @@ public class ScheduleParams {
populationSize
=
(
int
)
Math
.
max
(
MIN_POPULATION_SIZE
,
populationSize
=
(
int
)
Math
.
max
(
MIN_POPULATION_SIZE
,
Math
.
min
(
MAX_POPULATION_SIZE
,
MIN_POPULATION_SIZE
+
totalOps
*
populationSizeCoeff
));
Math
.
min
(
MAX_POPULATION_SIZE
,
MIN_POPULATION_SIZE
+
totalOps
*
populationSizeCoeff
));
int
maxthead
=
Runtime
.
getRuntime
().
availableProcessors
()
-
1
;
int
maxthead
=
Math
.
max
(
1
,
Runtime
.
getRuntime
().
availableProcessors
()
-
1
);
populationSize
=
populationSize
/
maxthead
*
maxthead
;
if
(
populationSize
>=
maxthead
)
{
populationSize
=
populationSize
/
maxthead
*
maxthead
;
}
populationSize
=
Math
.
max
(
MIN_POPULATION_SIZE
,
populationSize
);
// 确保偶数(方便交叉)
// 确保偶数(方便交叉)
// if (populationSize % 2 != 0) {
// if (populationSize % 2 != 0) {
...
...
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