public double Initialize(double dt)
        {
            if (model.GetOutputOrder != initialStates.Rows)
            {
                throw new Exception("Initialization error. Initial states have different length than model order");
            }

            inputs = Vector.Zeros(model.GetInputOrder);
            states = initialStates.Clone();
            double initialOutput = model.OutputEquation(states, inputs);

            transportDelay = new TransportDelay(delay, initialOutput, dt);
            return(initialOutput);
        }
Beispiel #2
0
        public double Initialize(double dt)
        {
            if (initialState.Rows != model.GetOrder)
            {
                throw new Exception("Initialization error. Initial state has different length than model's order");
            }

            solver.Initialize(dt);
            state = initialState.Clone();
            double initialOutput = model.OutputEquation(state, 0d);

            transportDelay = new TransportDelay(delay, initialOutput, dt);
            return(initialOutput);
        }