예제 #1
0
        public void Initialize(ILogger logger)
        {
            _logger = logger;

            StateValues   = new double[DifferentialVariables.Count];
            SystemToSolve = new AlgebraicSystem(Name);


            foreach (var vari in AlgebraicVariables)
            {
                SystemToSolve.AddVariables(vari);
            }
            foreach (var vari in DifferentialVariables)
            {
                SystemToSolve.AddVariable(vari);
            }
            foreach (var eq in Equations)
            {
                SystemToSolve.AddEquation(eq);
            }

            SystemToSolve.CreateIndex();
            SystemToSolve.GenerateJacobian();
        }