Commit 613e2efb authored by Matevz, Sraml (sraml)'s avatar Matevz, Sraml (sraml)
Browse files

added convergance criterium.

parent d59ba775
Pipeline #13715 failed with stage
in 5 minutes and 37 seconds
......@@ -156,6 +156,16 @@ class DescentMinimizer(Loggable, object):
f_k_minus_1 = energy.value
# check if new energy value is bigger than old energy value
if (new_energy.value - energy.value) > 0:"Line search algorithm was unsuccessful. "
new_energy = position=energy.position +
np.random.rand()/10*(new_energy.position-energy.position) )
energy = new_energy
energy = new_energy
# check convergence
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment