Ejemplo n.º 1
0
        public static double DELAY_FIXED(Elemento e, double Duracion)
        {
            //Funcion igual a DELAY de Stella y a DELAY FIXED de Vensim
            //Returns the value of the input delayed by the delay time.
            //The initial value is the value of the variable on the left - hand side of the equation at the start of the simulation.
            //The delay time can be an expression, but only its initial value is used.

            //DELAY(<input>,<delay duration>[,<initial>])
            //if (Inicial > 0) input = Inicial;
            //return (Input / Duracion);

            // Obtener si existe lo ingresado hace Duracion tiempo
            //
            if (Reloj.TiempoActual > Duracion)
            //return e.Valor(int.Parse((Reloj.TickActual - Duracion).ToString()));
            {
                _pasoDelay++;
                return(e.Valor(_pasoDelay));
            }
            else
            {
                return(0);
            }
        }
Ejemplo n.º 2
0
 public int Agregar(Elemento e)
 {
     _elementos.Add(e);
     _cantActual++;
     return(_cantActual);
 }
Ejemplo n.º 3
0
 public int Agregar(Elemento e)
 {
     _dependencias.Add(e);
     _cantActual++;
     return(_cantActual);
 }
Ejemplo n.º 4
0
 internal static void Agregar(Elemento e)
 {
     _elementos.Agregar(e);
 }