Esempio n. 1
0
        public void startDLL(object sender, RoutedEventArgs e)
        {
            if (!readInteface())
            {
                return;
            }
            _three.Clear();
            MethodLandAndDoig method = new MethodLandAndDoig(_func, _limits);

            method.BranchMethod += branchHandler;
            method.StartMethod  += startHandler;
            method.EndMethod    += endHandler;
            method.solve();
        }
Esempio n. 2
0
 static void Main(string[] args)
 {
     if (args.Length == 0)
     {
         Console.WriteLine("Параметров не передано!");
     }
     else
     {
         string        str        = Utils.Base64Decode(args[0]);
         var           utf8Reader = new Utf8JsonReader(Encoding.ASCII.GetBytes(str));
         JSONEquations json       = JsonSerializer.Deserialize <JSONEquations>(ref utf8Reader);
         Equation      func       = new Equation(json.FuncX1, json.FuncX2, null, 0);
         Equation[]    limits     = new Equation[2];
         limits[0] = new Equation(json.Limit1X1, json.Limit1X2, "<=", json.Limit1C);
         limits[1] = new Equation(json.Limit2X1, json.Limit2X2, "<=", json.Limit2C);
         MethodLandAndDoig method = new MethodLandAndDoig(func, limits);
         method.BranchMethod += HandlerBranch;
         method.EndMethod    += endHandler;
         method.StartMethod  += startHandler;
         method.solve();
         Console.ReadKey();
     }
 }