On Tue, Feb 24, 2015 at 10:31 PM, Sebastian Tleye <[email protected]> wrote: > Hi,
Dear Sebastian, > I've installed the NumericalMethods package and I am trying to use the class > DhbMultiVariableGeneralOptimizer to optimize a function. > If I run the code of the test it works perfectly > > | fBlock finder result | > fBlock := [ :x | |r| r := x * x. r = 0 ifTrue: [ 1] ifFalse: [ r sqrt sin / > r] ]. > finder := DhbMultiVariableGeneralOptimizer maximizingFunction: fBlock. > finder desiredPrecision: 0.01. > finder origin: #(0.2 0.2 0.2) asVector; range: #(1 1 1) asVector. > result := finder evaluate. > > however, if I want to set my own function, (for example the sum of the > elements of the parameter. fBlock := [ :x | x sum ]) it is throwing an error > of ScriptOutOfBounds > > I am not sure If I am doing something wrong or there is a bug in the > implementation. > > I haven't found too much documentation about how to use this package. > > Is there someone using this particular class? You can some information about the classes in Didier Besset book available here: https://github.com/SquareBracketAssociates/NumericalMethods/releases/tag/snapshot-2015-01-26 This package is part of the SciSmalltalk distribution: https://github.com/SergeStinckwich/SciSmalltalk Please feel free to join the mailing-list here: https://groups.google.com/forum/#!forum/scismalltalk I don't have time to look at your problem at the moment. If you find an explanation or a bug fix, please tell us about this. Regards, -- Serge Stinckwich UCBN & UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/
