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
1fc2f9dd
Commit
1fc2f9dd
authored
May 14, 2020
by
Alexis Lebis
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Solved m3tal/csdvp-evolutionary-optimization#8
Each comp has its own value for each coruses
parent
e5265b0e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
main.cpp
application/main.cpp
+1
-1
problem.cpp
src/model/problem.cpp
+9
-3
No files found.
application/main.cpp
View file @
1fc2f9dd
...
...
@@ -83,7 +83,7 @@ int main(int argc, char* argv[]){
pb
.
set_cfg_pickedCoursesByTimeFrame
(
2
);
CSDVP
::
generateProblem
(
pb
,
CSDVP
::
GenerationType
::
RANDOM
,
11
);
CSDVP
::
generateProblem
(
pb
,
CSDVP
::
GenerationType
::
RANDOM
,
7777
);
assert
(
pb
.
checkConfig
());
job
.
setRequiredECTS
(
4
*
6
);
...
...
src/model/problem.cpp
View file @
1fc2f9dd
...
...
@@ -362,7 +362,9 @@ int CSDVP::CSDVP_COUNTER = 0;
{
tmpComp
=
queue
.
front
();
queue
.
pop
();
queue
.
push
(
tmpComp
);
teachedComp
=
std
::
pair
<
Competency
,
double
>
(
tmpComp
,
1.0
);
magVal
=
pb
.
cfg_magnitudeMin
().
value
()
+
(
(
double
)
rand
()
/
RAND_MAX
)
*
(
pb
.
cfg_magnitudeMax
().
value
()
-
pb
.
cfg_magnitudeMin
().
value
())
;
Competency
cpt
=
Competency
::
build
(
magVal
,
tmpComp
.
c_name
());
teachedComp
=
std
::
pair
<
Competency
,
double
>
(
cpt
,
1.0
);
pb
.
unlocked_coursesCatalogue
().
at
(
i
).
addTeachedComp
(
teachedComp
);
}
}
...
...
@@ -381,8 +383,12 @@ int CSDVP::CSDVP_COUNTER = 0;
for
(
int
j
=
0
;
j
<
x
;
j
++
)
{
tmpComp
=
queue
.
front
();
queue
.
pop
();
queue
.
push
(
tmpComp
);
pb
.
unlocked_coursesCatalogue
().
at
(
i
).
addPrerequisite
(
tmpComp
);
queue
.
pop
();
//we change mag value for prereq
magVal
=
pb
.
cfg_magnitudeMin
().
value
()
+
(
(
double
)
rand
()
/
RAND_MAX
)
*
(
pb
.
cfg_magnitudeMax
().
value
()
-
pb
.
cfg_magnitudeMin
().
value
())
;
Competency
cpt
=
Competency
::
build
(
magVal
,
tmpComp
.
c_name
());
pb
.
unlocked_coursesCatalogue
().
at
(
i
).
addPrerequisite
(
cpt
);
queue
.
push
(
tmpComp
);
}
}
...
...
Alexis Lebis
@alexis.lebis
mentioned in issue
#8 (closed)
·
May 15, 2020
mentioned in issue
#8 (closed)
mentioned in issue #8
Toggle commit list
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