Skip to content

Value function for Nelder Mead needs refactoring

Code part:

https://gitlab.lrz.de/vadere/vadere/blob/master/VadereSimulator/src/org/vadere/simulator/models/osm/optimization/PotentialEvaluationFunction.java#L128

  • Comment by @BZoennchen : "dirty hack, fix it" Not sure what is meant there, but this should be solved, given that this is an important part of Nelder Mead.
    • I guess for the seeSmallWall case, getting all obstacles in each value evaluation is costly.
  • There are three Math.pow(..., 2) calls which may be very costly compared to simple multiplication, i.e. (x * x vs. pow(x, 2)). It may be possible that the Java compiler replaces this, but it is safer to not rely on it https://bytewrangler.blogspot.com/2011/10/mathpowx2-vs-x-x.html
  • There are magic numbers, at least a comment, why they are needed, why they are chosen like it, etc. pp. - this is: result=100000 and an additional + 0.00001
Edited by Ghost User
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information