1

I have error Error "The name 'Optimization' does not exist in the current context". But i installed ILNumerics from NuGet and it does not contains Optimization. Why?* *

using ILNumerics;
using Microsoft.SolverFoundation.Services;
using Microsoft.SolverFoundation.Solvers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication5
{
class Program
{
    static void Main(string[] args)
    {

        // define the bounds and start 
        ILArray<double> bounds = new double[] { 2, 3 };
        ILArray<double> start = new double[] { 1 };
        // find minimum inside bounds, start at 0
        ILArray<double> m = Optimization.fmin(myFunc, start,lowerBound: bounds[0], upperBound: bounds[1]);
    }
    ILRetArray<double> myFunc(ILInArray<double> x)
    {
        using (ILScope.Enter(x))
        {
            return (x - 1) * (x - 1);
        }
    }
}
}
A191919
  • 3,422
  • 7
  • 49
  • 93
  • 2
    According to the [online documentation](http://ilnumerics.net/apidoc/html/M_ILNumerics_Toolboxes_Optimization_fmin.htm), `Optimization.fmin` resides in `ILNumerics.Toolboxes`, not directly in `ILNumerics`. – 500 - Internal Server Error Aug 24 '15 at 13:38
  • You must install the latest official version from here: http://ilnumerics.net/download.html – Haymo Kutschbach Aug 25 '15 at 14:01
  • it's a pity. That library is not free. I solved my problem with constrained nonlinear optimization with Accord.net library. Haymo Kutschbach. Write answer and i will accept it. – A191919 Aug 25 '15 at 14:53

0 Answers0