Example #1
0
 public IADijkstra(NXTVehicule vehicule, bool p_simulation = false)
     : base(vehicule, p_simulation)
 {
     nodes           = new List <NXTNode>();
     accessibleCases = new List <Point>();
     sptSet          = new Dictionary <Point, bool>();
 }
Example #2
0
 // --------------------------------------------------------------------------
 // CONSTRUCTOR
 // --------------------------------------------------------------------------
 public Simulation(NXTVehicule iaVehicule, NXTVehicule remoteVehicule, SimulationWindow window)
     : base()
 {
     this.iaVehicule     = iaVehicule;
     this.remoteVehicule = remoteVehicule;
     this.window         = window;
     oldKeyState         = new KeyboardState();
 }
Example #3
0
        // --------------------------------------------------------------------------
        // CONSTRUCTOR
        // --------------------------------------------------------------------------
        public RemoteWindow(NXTVehicule vehicule)
        {
            InitializeComponent();
            this.vehicule = vehicule;

            pStraight = new NXTAction(NXTMovement.STRAIGHT);
            pLeft     = new NXTAction(NXTMovement.INTER_LEFT);
            pRight    = new NXTAction(NXTMovement.INTER_RIGHT);
            pUturn    = new NXTAction(NXTMovement.UTURN);
        }
Example #4
0
 public IA(NXTVehicule p_vehicule, bool p_simulation = false)
 {
     this.vehicule = p_vehicule;
     this.circuit  = vehicule.Circuit;
     this.buffer   = p_vehicule.Buffer;
     pStraight     = new NXTAction(NXTMovement.STRAIGHT);
     pLeft         = new NXTAction(NXTMovement.INTER_LEFT);
     pRight        = new NXTAction(NXTMovement.INTER_RIGHT);
     pUturn        = new NXTAction(NXTMovement.UTURN);
 }
Example #5
0
        public PositionDialog(NXTVehicule auto, NXTVehicule tel)
        {
            InitializeComponent();

            numericUpDown1.Value    = tel.Position.X;
            numericUpDown2.Value    = tel.Position.Y;
            numericUpDown3.Value    = auto.Position.X;
            numericUpDown4.Value    = auto.Position.Y;
            comboBox1.SelectedIndex = (int)tel.ToOrientation;
            comboBox2.SelectedIndex = (int)auto.ToOrientation;
        }
        public SimulationWindow(NXTVehicule iaVehicule, NXTVehicule remoteVehicule)
        {
            InitializeComponent();

            this.iaVehicule     = iaVehicule;
            this.remoteVehicule = remoteVehicule;

            this.simulation1          = new Simulation(iaVehicule, remoteVehicule, this);
            this.simulation1.Location = new System.Drawing.Point(12, 27);
            this.simulation1.Name     = "drawEditor1";
            this.simulation1.Size     = new System.Drawing.Size(731, 411);
            this.simulation1.TabIndex = 0;
            this.simulation1.Text     = "drawEditor1";
            this.Controls.Add(this.simulation1);

            iaCoop = new IACoop(remoteVehicule, iaVehicule);
        }
Example #7
0
        // --------------------------------------------------------------------------
        // CONSTRUCTORS
        // --------------------------------------------------------------------------
        public IACoop(NXTVehicule p_robotTelec, NXTVehicule robotAuto) :
            base(robotAuto)
        {
            this.robotTelec      = p_robotTelec;
            this.simulRobotTelec = new IADijkstra(p_robotTelec, true);
            //this.patients = new List<Point>();
            //this.patients.AddRange(robotTelec.Circuit.Patients);
            this.patients        = circuit.Patients;
            this.patientsDropped = 0;
            this.targetTelec     = NXTVehicule.ERROR;
            this.pathRobotIA     = new List <Point>();

            Point ttargetTl     = DetermineExcptdTelecTarget();
            Point positionTelec = robotTelec.Position;

            //Console.WriteLine("Cible telec : " + ttargetTl);
            this.pathRobotTelecommande = this.simulRobotTelec.ComputeDijkstra(positionTelec, ttargetTl);;
        }
Example #8
0
        // --------------------------------------------------------------------------
        // METHODS
        // --------------------------------------------------------------------------


        // --------------------------------------------------------------------------
        // EVENTS / ASYNC CALLS
        // --------------------------------------------------------------------------

        // Chargement de la fenĂȘtre
        private void MainWindow_Load(object sender, EventArgs e)
        {
            this.remoteVehicule = new NXTVehicule(new Point(1, 2), NXTVehicule.RIGHT);
            this.autoVehicule   = new NXTVehicule(new Point(0, 3), NXTVehicule.BOTTOM);
        }