示例#1
0
        public void TestNonLinearOptimizeLppl()
        {
            var lppl = new Lppl();

              var options = new GeneratorOptions
              {
            Function = lppl.Evaluate,
            TimeRangeMax = 0.9,
            ErrorRange = 0.1
              };
              var generator = new Generator(options);
              var generated = generator.Generate();

              lppl.M += 0.0;
              lppl.Omega -= 0.5;
              lppl.Tc += 0.0;

              var optimizer = new LcFunctionNonLinearOptimizer(lppl);
              optimizer.Optimize(generated);
              Console.WriteLine(lppl);
              Console.WriteLine(lppl.ToShow(generated));
        }
示例#2
0
        public void TestNonLinearOptimizePl()
        {
            var pl = new Pl();
              Console.WriteLine(pl);

              var options = new GeneratorOptions
              {
            Function = pl.Evaluate,
            ErrorRange = 0,//.1,
            TimeRangeMax = 0.8
              };
              var generator = new Generator(options);
              var generated = generator.Generate();

              pl.Tc += 0.5;// 5;
              pl.M += 0.3;

              var optimizer = new LcFunctionNonLinearOptimizer(pl);
              optimizer.Optimize(generated);
              Console.WriteLine(pl);
              Console.WriteLine(pl.ToShow(generated));
        }