public static double INTEG(Nivel nivel, Tasa tasa) { //Aqui se pueden usar los diferentes métodos de integración //Euler . Por defecto //Rugger-Kutta 2 //Rugger-Kutta 4 return(nivel.j + tasa.k * Reloj.DT); }
public static double SMOOTH(Nivel nivel, Tasa tasa, double demora) { //nivel : Lado izquierdo //expected demand=SMOOTH(demand, time to form expectations) //This equation is exactly the same as: //expected demand = INTEG((demand - expected demand) / time to form expectations,demand) //nivel.k = 1; return(0); }
public Smooth(string Nombre, double Delay, int Orden, Auxiliar Aux) { _Nombre = Nombre; _Delay = Delay; Tipo = "Smooth"; Unidades = "Sin Dimensión"; _orden = Orden; //Nivel _TheInput = new Nivel("TheInput-"+_Nombre,0); _valorInicial = 0;// ValorInicial; _aux = Aux; _DL = _Delay / Orden; if (_orden == 3) { //Crear Stocks Auxiliares //Nivel _level = new Nivel("_level_" + _Nombre, _valorInicial); _level.UpdateFn = () => (_level.j + Reloj.DT * _flow3.j); _flow3 = new Tasa("_flow3" + _Nombre); _flow3.UpdateFn = () => (_level2.k - _level.k) / _DL; //Nivel 1 _level1 = new Nivel("_level1_" + _Nombre, 0); _level1.UpdateFn = () => (_level1.j + Reloj.DT * _flow.j); _flow = new Tasa("_flow" + _Nombre); _flow.UpdateFn = () => (Aux.k - _level1.k) / _DL; //Nivel 2 _level2 = new Nivel("_level2_" + _Nombre, _level.k); _level2.UpdateFn = () => (_level2.j + Reloj.DT * _flow2.j); _flow2 = new Tasa("_flow2" + _Nombre); _flow2.UpdateFn = () => (_level1.k - _level2.k) / _DL; } _Numero = Modelo.Agregar(this); }
public int Agregar(Nivel e) { return(base.Agregar(e)); }
internal static int Agregar(Nivel e) { _diccionario.Add(e.Nombre, e); return(_niveles.Agregar(e)); }