Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
FIC_DK_P GA Solving
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
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
M3TAL
FIC_DK_P GA Solving
Commits
bde8b48c
Commit
bde8b48c
authored
4 years ago
by
Alexis Lebis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
threshold for prereq min or max HL
parent
fe7a49cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
problem.cpp
src/model/problem.cpp
+9
-1
No files found.
src/model/problem.cpp
View file @
bde8b48c
...
...
@@ -440,11 +440,19 @@ int CSDVP::CSDVP_COUNTER = 0;
for
(
unsigned
int
i
=
0
;
i
<
randomVec
.
size
();
i
++
)
queue
.
push
(
randomVec
.
at
(
i
));
int
firstTF
=
0
;
int
randVal
=
0
;
int
threshold
=
30
;
for
(
unsigned
int
i
=
0
;
i
<
pb
.
coursesCatalogue
().
size
();
i
++
)
{
x
=
_randomizeIn
(
pb
.
cfg_prerequisiteByCourseMin
(),
pb
.
cfg_prerequisiteByCourseMax
());
lastTF
=
pb
.
coursesCatalogue
().
at
(
i
).
lastTimeFrame
();
maxLevel
=
lastTF
*
hLevelR
/
nbTF
;
firstTF
=
pb
.
coursesCatalogue
().
at
(
i
).
timeFrame
().
at
(
0
);
randVal
=
rand
()
%
(
100
);
if
(
x
<
threshold
)
maxLevel
=
lastTF
*
hLevelR
/
nbTF
;
else
maxLevel
=
firstTF
*
hLevelR
/
nbTF
;
//maxLevel = lastTF * hLevelR / nbTF;
maxLevel
--
;
// Logically, prerequisite can only be according to comp of lower HL
if
(
maxLevel
>=
0
)
// then this means we are dealing with at least a HL 1, so only HL below can serve as prereq
{
...
...
This diff is collapsed.
Click to expand it.
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