Die Suche ergab 3 Treffer

von qojote
Dienstag 28. April 2015, 16:13
Forum: Allgemeine Fragen
Thema: Finden der besten Kombination (pulp, scipy.optimize?)
Antworten: 5
Zugriffe: 1318

Re: Finden der besten Kombination (pulp, scipy.optimize?)

Vielen Dank, das klappt! Super.
Es funktioniert auch gut, wenn man gleich beim ersten Aufruf die Bounds mit angibt.

Ergebnis:

Optimization terminated successfully. (Exit mode 0)
Current function value: 1.79926309743e-06
Iterations: 16
Function evaluations: 124
Gradient evaluations: 16
(array ...
von qojote
Dienstag 28. April 2015, 13:52
Forum: Allgemeine Fragen
Thema: Finden der besten Kombination (pulp, scipy.optimize?)
Antworten: 5
Zugriffe: 1318

Re: Finden der besten Kombination (pulp, scipy.optimize?)

Hallo,

Also wenn ich das Skript ausführe erhalte ich als Ergebnis ohne Grenzen:
status: 0
success: True
njev: 25
nfev: 188
fun: 2.1458641917382337e-05
x: array([ 1.44445079, -1.9259337 , 0.5926002 , -0.11111729])
message: 'Optimization terminated successfully.'
jac: array([ -9., -3., -6 ...
von qojote
Montag 27. April 2015, 21:19
Forum: Allgemeine Fragen
Thema: Finden der besten Kombination (pulp, scipy.optimize?)
Antworten: 5
Zugriffe: 1318

Finden der besten Kombination (pulp, scipy.optimize?)

Hallo,

Ich möchte eine Anzahl von (numpy-) Arrays gewichtet miteinander addieren und dadurch möglichst "nahe" an gegebene Zielwerte kommen.
Also mal als kleines Beispiel:

A1 * [0, 1, 1, 1] + A2 * [0, 0, 0, 4] + A3 * [0, 0, 2, 5] === [0, 1, 4, 4]

Die Faktoren A1, A2 und A3 dürfen nur Werte ...