|
open System
open Cureos.Numerics
let hs05 (n : int) (x : float[]) : float =
Math.Sin(x.[0] + x.[1]) + Math.Pow(x.[0] - x.[1], 2.0) - 1.5 * x.[0] + 2.5 * x.[1] + 1.0
let x = [| 0.0; 0.0 |]
let status = Bobyqa.FindMinimum(new Func<int, float[], float>(hs05), 2, x, [| -1.5; -3.0 |], [| 4.0; 3.0 |])
printfn "Optimization status: %O" status
printfn "x* = %A" x
printfn "\nPress <ENTER> to exit..."
Console.ReadLine() |> ignore
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am the owner of Cureos AB, a software development and consulting company located in Uppsala, Sweden. The company's main focus is in developing software for dose-response analysis and optimization of large patient treatment materials, primarily using the .NET framework. In my Ph.D. thesis I outlined a general optimization framework for radiation therapy, and I have developed numerous tools for radiotherapy optimization and dose-response modeling that have been integrated into different treatment planning systems.