Пример #1
0
        public void Calculate()
        {
            A         = 1;
            B         = 1;
            C         = 1;
            UsedSteps = 0;

            var pendulum = CommandMaker.PackMethod(this.SumSides, A, B, C)
                           .ToPendulum()
                           .Define(x => x
                                   .SetSteps(10000000)
                                   .AddConstrain(() => x.Me.Result == ExpectedSum)
                                   .AddConstrain(() => this.Pytha(x.Me.P1, x.Me.P2, x.Me.P3))
                                   .AddConstrain(() => x.Me.P2 > x.Me.P1 && x.Me.P3 > x.Me.P2)
                                   .AddDimension(NumAxisTools.CreateAxis(() => x.Me.P1, 0, 600))
                                   .AddDimension(NumAxisTools.CreateAxis(() => x.Me.P2, 0, 600))
                                   .AddDimension(NumAxisTools.CreateAxis(() => x.Me.P3, 0, 600))
                                   .WhenDone(() =>
            {
                A         = x.Me.P1;
                B         = x.Me.P2;
                C         = x.Me.P3;
                UsedSteps = x.Ranking.Steps;
            }));

            pendulum.Execute();
        }
 public void ExecutePack2()
 {
     this.PackedAction = CommandMaker.PackMethod(this.TestMethod2, this.Input, string.Empty);
 }
 public void ExecutePack3()
 {
     var packed = CommandMaker.PackMethod(this.TestMethod3, this.Input, string.Empty);
 }
 public void ExecutePack()
 {
     this.PackedAction = CommandMaker.PackMethod(this.TestMethod, this.Input);
 }