public void Prepare(BaseSimulation simulation)
        {
            if (simulation == null)
            {
                throw new ArgumentNullException(nameof(simulation));
            }

            simulation.BeforeSetup += (obj, args) =>
            {
                foreach (var action in BeforeSetup)
                {
                    action(simulation);
                }
            };

            simulation.AfterSetup += (obj, args) =>
            {
                foreach (var action in AfterSetup)
                {
                    action(simulation);
                }
            };

            SimulationUpdates.Apply(simulation);
            EntityUpdates.Apply(simulation);
        }
        public void SetNodeSetVoltage(string nodeId, string expression)
        {
            if (nodeId == null)
            {
                throw new ArgumentNullException(nameof(nodeId));
            }

            if (expression == null)
            {
                throw new ArgumentNullException(nameof(expression));
            }

            SimulationUpdates.AddBeforeTemperature((simulation, contexts) =>
            {
                var context = contexts.GetContext(simulation);
                var value   = context.Evaluate(expression);

                simulation.Configurations.Get <BaseConfiguration>().Nodesets[nodeId] = value;
            });
        }