示例#1
0
        public Flowpipe AdvancePolynomial(TaylorModelVec ODE, double time, int order, double step, double miniStep, double[] estimation)
        {
            IntPtr hfOde   = CreateODE(ODE.ptr);
            IntPtr current = this.ptr;
            IntPtr result  = IntPtr.Zero;
            double curStep = step;

            for (double t = 0.0; t < time; t += step)
            {
                if (t + step > time)
                {
                    curStep = time - t;
                }
                while (!AdvanceLowDegreeFlowpipe(ref result, current, ODE.ptr, hfOde, curStep, order, Flowstar.QR_Precondition, numVars, estimation))
                {
                    for (int i = 0; i < estimation.Length; ++i)
                    {
                        estimation[i] *= 2;
                    }
                    if (estimation[0] > 100000)
                    {
                        throw new FlowpipeException("Cannot find good estimation for the flowpipe");
                    }
                }

                current = result;
            }
            Flowpipe res = Flowpipe.FromPtr(result, numVars);

            return(res);
        }
示例#2
0
 public void SetODE(TaylorModelVec ODE)
 {
     SetODEContinuousSystem(ptr, ODE.ptr);
 }