Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
vadere
vadere
Commits
73604bc0
Commit
73604bc0
authored
May 23, 2019
by
Benedikt Zoennchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce our own Nelder-Mead implementation into the master branch.
parent
3c3420a1
Pipeline
#116179
passed with stages
in 193 minutes and 56 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
10 deletions
+6
-10
VadereModelTests/TestNelderMead/scenarios/labyrinth.scenario
VadereModelTests/TestNelderMead/scenarios/labyrinth.scenario
+1
-1
VadereModelTests/TestNelderMead/scenarios/rimea_11_exit_selection_nelder_mead.scenario
...ad/scenarios/rimea_11_exit_selection_nelder_mead.scenario
+1
-1
VadereUtils/src/org/vadere/util/math/optimization/neldermead/NelderMead1D.java
...adere/util/math/optimization/neldermead/NelderMead1D.java
+3
-8
VadereUtils/src/org/vadere/util/math/optimization/neldermead/NelderMead2D.java
...adere/util/math/optimization/neldermead/NelderMead2D.java
+1
-0
No files found.
VadereModelTests/TestNelderMead/scenarios/labyrinth.scenario
View file @
73604bc0
...
...
@@ -33,7 +33,7 @@
"org.vadere.state.attributes.models.AttributesOSM" : {
"stepCircleResolution" : 4,
"numberOfCircles" : 1,
"optimizationType" : "NELDER_MEAD
_CIRCLE
",
"optimizationType" : "NELDER_MEAD",
"varyStepDirection" : false,
"movementType" : "ARBITRARY",
"stepLengthIntercept" : 0.4625,
...
...
VadereModelTests/TestNelderMead/scenarios/rimea_11_exit_selection_nelder_mead.scenario
View file @
73604bc0
...
...
@@ -46,7 +46,7 @@
"createMethod" : "HIGH_ACCURACY_FAST_MARCHING",
"potentialFieldResolution" : 0.1,
"obstacleGridPenalty" : 0.1,
"targetAttractionStrength" :
1
.0,
"targetAttractionStrength" :
2
.0,
"timeCostAttributes" : {
"standardDeviation" : 0.7,
"type" : "UNIT",
...
...
VadereUtils/src/org/vadere/util/math/optimization/neldermead/NelderMead1D.java
View file @
73604bc0
...
...
@@ -15,6 +15,7 @@ import java.util.stream.Stream;
/**
* Implementation of the 1-dimensional Nelder-Mead. The algorithm walks on the circle.
* Multiple simplexes can be solved in parallel (default).
*
* @author Benedikt Zoennchen
*/
...
...
@@ -30,11 +31,6 @@ public class NelderMead1D {
*/
private
final
VCircle
evalArea
;
/**
* the evaluation function which is optimized.
*/
private
final
Function
<
IPoint
,
Double
>
eval
;
/**
* a simplex instance converges if the area of the triangle is smaller than <tt>threshold</tt> and
*/
...
...
@@ -79,7 +75,6 @@ public class NelderMead1D {
@NotNull
final
Collection
<
Pair
<
Double
,
Double
>>
simplexes
){
this
.
evalArea
=
evalArea
;
this
.
eval
=
eval
;
this
.
threshold
=
threshold
;
this
.
simplices
=
simplexes
.
stream
().
map
(
s
->
new
Simplex1D
(
eval
,
s
.
getLeft
(),
s
.
getRight
(),
evalArea
,
minimize
,
NelderMead2D
.
MAX_VAL
)).
collect
(
Collectors
.
toList
());
this
.
iterationCount
=
0
;
...
...
@@ -101,7 +96,7 @@ public class NelderMead1D {
}
// second run
simplices
.
stream
().
forEach
(
s
->
s
.
restart
(
evalArea
.
getRadius
()
/
10.0
));
/*
simplices.stream().forEach(s -> s.restart(evalArea.getRadius() / 10.0));
iterationCount = 0;
while (!hasConverged() && iterationCount < NMAX) {
...
...
@@ -113,7 +108,7 @@ public class NelderMead1D {
logger.warn("max iteration reached!");
}
logger
.
debug
(
"iterations: "
+
overallIterations
);
logger.debug("iterations: " + overallIterations);
*/
}
...
...
VadereUtils/src/org/vadere/util/math/optimization/neldermead/NelderMead2D.java
View file @
73604bc0
...
...
@@ -15,6 +15,7 @@ import java.util.stream.Stream;
/**
* Implementation of the 2-dimensional Nelder-Mead.
* Multiple simplexes can be solved in parallel (default).
*
* @author Benedikt Zoennchen
*/
...
...
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