Example #1
0
 public void reemplazar_camion(Camion original)
 {
     camiones.Remove(original);
     //CAMBIAR!!
     string reemplazo = Input.reemplazo[original.tipo_camion];
     Camion camion_nuevo = new Camion(this.c, this, reemplazo,new double[]{100000,5000,0});
 }
Example #2
0
 public Componente(Controlador c, Camion camion, string tipo_componente, double[] tasas_falla, bool usado = false)
 {
     this.c               = c;
     this.camion          = camion;
     this.tipo_componente = tipo_componente;
     this.tasas_falla     = tasas_falla;
     //Si el camion esta usado, se debe obtener cuando es el punto en que falla
     //Console.WriteLine ("Se ha generado el siguiente tiempo de falla para el componente {0} en {1}",tipo_componente,30);
     if (usado == false)
     {
         double sgte_tiempo = generar_tiempo_de_falla((int)camion.edad);
         //Si el siguiente tiempo de falla es mayor a la hora en que muere el camión, no agregarlo a eventos
         if (this.c.T_simulacion + sgte_tiempo < this.camion.tiempo_muerte)
         {
             generar_siguiente_tiempo(sgte_tiempo);
         }
     }
     else
     {
         //Paradoja de inspección
         double horas_funcionamiento = this.camion.tiempo_inicializacion;
         double tasa_trabajo         = this.camion.tasa_trabajo;
         double a_func      = horas_funcionamiento / tasa_trabajo;
         int    edad_camion = 0;
         double t           = 0;
         double r;
         while (true)
         {
             t += generar_tiempo_de_falla(edad_camion);
             r  = t / (365 * 24);
             if (r <= a_func)
             {
                 edad_camion += (int)r;
             }
             else
             {
                 double sgte_tiempo = t - a_func * (365 * 24);
                 if (this.c.T_simulacion + sgte_tiempo < this.camion.tiempo_muerte)
                 {
                     generar_siguiente_tiempo(sgte_tiempo);
                 }
                 break;
             }
         }
     }
 }
Example #3
0
 public Componente(Controlador c, Camion camion, string tipo_componente, double[] tasas_falla, bool usado=false)
 {
     this.c = c;
     this.camion = camion;
     this.tipo_componente = tipo_componente;
     this.tasas_falla = tasas_falla;
     //Si el camion esta usado, se debe obtener cuando es el punto en que falla
     //Console.WriteLine ("Se ha generado el siguiente tiempo de falla para el componente {0} en {1}",tipo_componente,30);
     if(usado == false)
     {
         double sgte_tiempo = generar_tiempo_de_falla((int)camion.edad);
         //Si el siguiente tiempo de falla es mayor a la hora en que muere el camión, no agregarlo a eventos
         if(this.c.T_simulacion+sgte_tiempo < this.camion.tiempo_muerte)
             generar_siguiente_tiempo(sgte_tiempo);
     }
     else
     {
         //Paradoja de inspección
         double horas_funcionamiento = this.camion.tiempo_inicializacion;
         double tasa_trabajo = this.camion.tasa_trabajo;
         double a_func = horas_funcionamiento/tasa_trabajo;
         int edad_camion = 0;
         double t=0;
         double r;
         while(true)
         {
             t += generar_tiempo_de_falla(edad_camion);
             r = t/(365*24);
             if(r <= a_func)
             {
                 edad_camion+=(int)r;
             }
             else
             {
                 double sgte_tiempo = t-a_func*(365*24);
                 if(this.c.T_simulacion+sgte_tiempo < this.camion.tiempo_muerte)
                     generar_siguiente_tiempo(sgte_tiempo);
                 break;
             }
         }
     }
 }
Example #4
0
        public Faena(Controlador c, string Nombre)
        {
            this.c = c;
            this.camiones = new List<Camion>();
            this.batch = new List<Componente>();
            this.Nombre = Nombre;
            this.ponderador = Input.ponderadores[this.Nombre][0];

            //Se agregan los camiones por faena...
            try
            {
                foreach (var dato in Input.tiempo_vida_camion[this.Nombre])
                {
                    Camion cam = new Camion(this.c, this, dato.arr_string[0], new double[]{dato.arr_double[1], dato.arr_double[0], dato.arr_double[2]});
                }
            }
            catch
            {
            }
        }
Example #5
0
        public Faena(Controlador c, string Nombre)
        {
            this.c          = c;
            this.camiones   = new List <Camion>();
            this.batch      = new List <Componente>();
            this.Nombre     = Nombre;
            this.ponderador = Input.ponderadores[this.Nombre][0];

            //Se agregan los camiones por faena...
            try
            {
                foreach (var dato in Input.tiempo_vida_camion[this.Nombre])
                {
                    Camion cam = new Camion(this.c, this, dato.arr_string[0], new double[] { dato.arr_double[1], dato.arr_double[0], dato.arr_double[2] });
                }
            }
            catch
            {
            }
        }
Example #6
0
 public void agregar_camion(Camion camion)
 {
     camiones.Add(camion);
 }
Example #7
0
 public void agregar_camion(Camion camion)
 {
     camiones.Add(camion);
 }