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
85bd4bcb
Commit
85bd4bcb
authored
May 13, 2020
by
Alexis Lebis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add doc + fix rand overflow
parent
88146714
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
problem.cpp
src/model/problem.cpp
+1
-1
problem.h
src/model/problem.h
+4
-1
No files found.
src/model/problem.cpp
View file @
85bd4bcb
...
@@ -248,7 +248,7 @@ int CSDVP::CSDVP_COUNTER = 0;
...
@@ -248,7 +248,7 @@ int CSDVP::CSDVP_COUNTER = 0;
std
::
vector
<
Course
>
tmpCourses
;
std
::
vector
<
Course
>
tmpCourses
;
for
(
int
i
=
0
;
i
<
pb
.
_quantityAvailableCourses
;
i
++
)
for
(
int
i
=
0
;
i
<
pb
.
_quantityAvailableCourses
;
i
++
)
{
{
tmpCourses
.
push_back
(
Course
::
build
(
CSDVP
::
_randomizeIn
(
pb
.
cfg_ectsMin
(),
pb
.
cfg_ectsMax
()
+
1
)));
tmpCourses
.
push_back
(
Course
::
build
(
CSDVP
::
_randomizeIn
(
pb
.
cfg_ectsMin
(),
pb
.
cfg_ectsMax
())));
}
}
/* We obtain how many courses n by semester s
/* We obtain how many courses n by semester s
...
...
src/model/problem.h
View file @
85bd4bcb
...
@@ -78,6 +78,7 @@ class CSDVP
...
@@ -78,6 +78,7 @@ class CSDVP
static
double
_randomizeIn
(
const
double
min
,
const
double
max
);
static
double
_randomizeIn
(
const
double
min
,
const
double
max
);
// --------- END GENERATION RELATED FUNCTION ---------
// --------- END GENERATION RELATED FUNCTION ---------
/// It sources _coursesSortedByTF, which is another view of _availableCourses, sorted by TF
void
_makeCoursesSortedByTF
();
void
_makeCoursesSortedByTF
();
public
:
public
:
...
@@ -95,7 +96,9 @@ class CSDVP
...
@@ -95,7 +96,9 @@ class CSDVP
// === CONSTRUCTOR
// === CONSTRUCTOR
CSDVP
();
CSDVP
();
/// Generate an instance of the CSDVP iff isConfig is true. Thus, seed != -1;
/**Generate an instance of the CSDVP iff isConfig is true. Thus, seed != -1;
* @developper each kind of generation must sources correctly the main arrays (_availableCours/comp) TF and _sortedCoursesByTF
*/
static
void
generateProblem
(
CSDVP
&
csdvp
,
CSDVP
::
GenerationType
type
,
int
seed
=
-
1
);
static
void
generateProblem
(
CSDVP
&
csdvp
,
CSDVP
::
GenerationType
type
,
int
seed
=
-
1
);
// === GETTER
// === GETTER
...
...
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