Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MCA_service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IMPACT
MCA_service
Commits
f4105621
Commit
f4105621
authored
2 years ago
by
Riccardo Boero
Browse files
Options
Downloads
Patches
Plain Diff
Code cleaning
parent
8a2e8ea4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
web_service/src/main/java/no/nilu/riskgone/mca/objects/Request.java
+1
-18
1 addition, 18 deletions
...e/src/main/java/no/nilu/riskgone/mca/objects/Request.java
with
1 addition
and
18 deletions
web_service/src/main/java/no/nilu/riskgone/mca/objects/Request.java
+
1
−
18
View file @
f4105621
...
...
@@ -10,7 +10,6 @@ public class Request {
public
void
runPreliminaryChecks
()
{
this
.
sortScores
();
this
.
checkAndFixWeights
();
this
.
checkAndFixMissingScores
();
}
private
void
sortScores
()
{
// make sure that criteria are in the same order across all options
...
...
@@ -31,23 +30,7 @@ public class Request {
}
}
}
private
void
checkAndFixMissingScores
()
{
// find the minimum value of score in each criterion
double
[]
minimumScores
=
new
double
[
criteria_weights
.
length
];
for
(
int
i
=
0
;
i
<
minimumScores
.
length
;
i
++)
{
for
(
int
j
=
0
;
j
<
options
.
length
;
j
++)
{
System
.
out
.
println
(
options
[
j
].
getScores
()[
i
].
getScore
());
if
(
options
[
j
].
getScores
()[
i
].
getScore
()
<
minimumScores
[
i
])
minimumScores
[
i
]
=
options
[
j
].
getScores
()[
i
].
getScore
();
}
}
// replace null values with minimum values
/*for (int i = 0; i < minimumScores.length; i++) {
for (int j = 0; j < options.length; j++) {
if (options[j].getScores()[i].getScore() == null) minimumScores[i] = options[j].getScores()[i].getScore();
}
}*/
}
public
UUID
getUuid
()
{
public
UUID
getUuid
()
{
return
uuid
;
}
public
Weight
[]
getCriteria_weights
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment