Quipu 1.0.0
dotnet add package Quipu --version 1.0.0
NuGet\Install-Package Quipu -Version 1.0.0
<PackageReference Include="Quipu" Version="1.0.0" />
<PackageVersion Include="Quipu" Version="1.0.0" />
<PackageReference Include="Quipu" />
paket add Quipu --version 1.0.0
#r "nuget: Quipu, 1.0.0"
#:package Quipu@1.0.0
#addin nuget:?package=Quipu&version=1.0.0
#tool nuget:?package=Quipu&version=1.0.0
Quipu
Quipu is a dotnet implementation of the Nelder–Mead method. It is a numerical solver used to find the minimum or maximum of a function. It is particularly useful for nonlinear optimization problems for which derivatives may not be known.
Example usage
The solver can be used from F# and C#, with similar APIs.
Let's use Quipu to find the minimum of f(x,y) = (x-1)^2 + (y-2)^2 + 42
.
This function has a unique global minimum, for x=1,y=2
.
Basic usage, F# pipeline
#r "nuget: Quipu, 1.0.0"
open Quipu
let f (x, y) = pown (x - 1.0) 2 + pown (y - 2.0) 2 + 42.0
let solverResult =
NelderMead.objective f
|> NelderMead.minimize
if solverResult.HasSolution
then
let solution = solverResult.Solution
printfn $"Solution: {solution.Status}"
let candidate = solution.Candidate
let args = candidate.Arguments
let value = candidate.Value
printfn $"f(%.3f{args[0]}, %.3f{args[1]}) = %.3f{value}"
Solution: Optimal
f(1.000, 2.000) = 42.000
Basic usage, C# fluent interface
#r "nuget: Quipu, 1.0.0"
using Quipu.CSharp;
using System;
Func<Double,Double,Double> f =
(x, y) => Math.Pow(x - 1.0, 2) + Math.Pow(y - 2.0, 2) + 42.0;
var solverResult =
NelderMead
.Objective(f)
.Minimize();
if (solverResult.HasSolution)
{
var solution = solverResult.Solution;
Console.WriteLine($"Solution: {solution.Status}");
var candidate = solution.Candidate;
var args = candidate.Arguments;
var value = candidate.Value;
Console.WriteLine($"f({args[0]:N3}, {args[1]:N3}) = {value:N3}");
}
Solution: Optimal
f(1.000, 2.000) = 42.000
Advanced usage
The solver provides more fine grained control if needed, see the test suite for more examples:
open Quipu
let f (x, y) = pown (x - 1.0) 2 + pown (y - 2.0) 2 + 42.0
let tolerance = 0.000_0001
let solverResult =
NelderMead.objective f
|> NelderMead.withTolerance 0.000_0001
|> NelderMead.startFrom (Start.around [ 100.0; 100.0])
|> NelderMead.minimize
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- FSharp.Core (>= 5.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0 | 151 | 7/16/2025 |
0.7.0 | 150 | 7/10/2025 |
0.6.0 | 83 | 7/4/2025 |
0.5.2 | 169 | 12/26/2024 |
0.5.1 | 128 | 12/23/2024 |
0.5.0 | 147 | 12/22/2024 |
0.4.0 | 128 | 12/14/2024 |
0.3.1 | 128 | 12/9/2024 |
0.3.0 | 172 | 12/8/2024 |
0.2.3 | 147 | 5/1/2024 |
0.2.2 | 185 | 4/19/2024 |
0.2.1 | 263 | 12/5/2023 |
0.2.0 | 189 | 11/8/2023 |
0.1.1 | 143 | 12/1/2023 |
0.1.0 | 236 | 4/16/2023 |