downhill simplex
This commit is contained in:
parent
64a06eab94
commit
5ca401f0da
@ -3,4 +3,5 @@ numpy == 2.4.3
|
|||||||
black == 26.3.1
|
black == 26.3.1
|
||||||
ipykernel == 7.2.0
|
ipykernel == 7.2.0
|
||||||
sympy == 1.14.0
|
sympy == 1.14.0
|
||||||
pandas == 3.0.2
|
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