cureos / csnumerics

Portable numerical algorithms in C#
GNU Lesser General Public License v3.0
32 stars 11 forks source link

How to use Lincoa #15

Open mcmillab opened 5 months ago

mcmillab commented 5 months ago

I'm new to this library, let me know if this isn't the right place to ask this question.

I have called Minimize with no constraints (ie matrix A and vector B are both of size zero), and I get the output shown below. It seems to say the least value of F is zero, despite finding some negative F values previously, and then terminates.

What could I be doing wrong? thanks

Function number 1 F = NaN The corresponding X is: 0.000000E+000 0.000000E+000 0.000000E+000 Function number 2 F = -1.1845510303E+001 The corresponding X is: 1.000000E+000 0.000000E+000 0.000000E+000 Function number 3 F = -4.7807335395E+000 The corresponding X is: 0.000000E+000 1.000000E+000 0.000000E+000 Function number 4 F = -8.1966579100E+000 The corresponding X is: 0.000000E+000 0.000000E+000 1.000000E+000 Function number 5 F = 1.1845510303E+001 The corresponding X is: -1.000000E+000 0.000000E+000 0.000000E+000 Function number 6 F = 4.7807335395E+000 The corresponding X is: 0.000000E+000 -1.000000E+000 0.000000E+000 Function number 7 F = 8.1966579100E+000 The corresponding X is: 0.000000E+000 0.000000E+000 -1.000000E+000

New RHO = 1.0000E-001 Number of function values = 7 Least value of F = NaN The corresponding X is: 0.000000E+000 0.000000E+000 0.000000E+000 Function number 8 F = -1.1845510303E+001 The corresponding X is: 1.000000E-001 0.000000E+000 0.000000E+000 Function number 9 F = -4.7807335395E+000 The corresponding X is: 0.000000E+000 1.000000E-001 0.000000E+000 Function number 10 F = -8.1966579100E+000 The corresponding X is: 0.000000E+000 0.000000E+000 1.000000E-001 Function number 11 F = 1.1845510303E+001 The corresponding X is: -1.000000E-001 0.000000E+000 0.000000E+000

New RHO = 1.0000E-002 Number of function values = 11 Least value of F = NaN The corresponding X is: 0.000000E+000 0.000000E+000 0.000000E+000 Function number 12 F = 4.7807335395E+000 The corresponding X is: 0.000000E+000 -1.000000E-002 0.000000E+000 Function number 13 F = 8.1966579100E+000 The corresponding X is: 0.000000E+000 0.000000E+000 -1.000000E-002 Function number 14 F = -1.1845510303E+001 The corresponding X is: 1.000000E-002 0.000000E+000 0.000000E+000 Function number 15 F = -4.7807335395E+000 The corresponding X is: 0.000000E+000 1.000000E-002 0.000000E+000 At the return from LINCOA Number of function values = 15 Least value of F = 0.000000000000000E+000 The corresponding X is: 0.000000E+000 1.000000E-002 0.000000E+000

``

mcmillab commented 5 months ago

I believe the problem was that some of my returns from the objective function were NaN. Works without that.