downhill simplex
This commit is contained in:
parent
64a06eab94
commit
5ca401f0da
@ -4,3 +4,4 @@ black == 26.3.1
|
||||
ipykernel == 7.2.0
|
||||
sympy == 1.14.0
|
||||
pandas == 3.0.2
|
||||
scipy == 1.17.1
|
||||
8
src/downhill_simplex/2d_optimierungsproblem_1.py
Normal file
8
src/downhill_simplex/2d_optimierungsproblem_1.py
Normal file
@ -0,0 +1,8 @@
|
||||
from scipy import optimize
|
||||
|
||||
def f(x0):
|
||||
x1, x2 = x0
|
||||
return (x1 ** 2 + x2 - 11) ** 2 + (x1 + x2 ** 2 - 7) ** 2
|
||||
|
||||
minimum = optimize.fmin(f, [-100,-100])
|
||||
print(minimum)
|
||||
Loading…
x
Reference in New Issue
Block a user