Beispiel #1
0
        /**
         * Called at the start of a new run.
         */
        public void GenerateBluePolicePositions()
        {
            Platform2DLaydown bluePoliceLaydown = new Platform2DLaydown();

            bluePoliceLaydown.fromAnchorStdDev_km = 2;
            bluePoliceLaydown.fromAnchorMax_km    = 5;
            bluePoliceLaydown.anchors             = trialGenerator.GetBlueBaseLocations();  //blue bases
            bluePoliceLaydown.allowedCells        = trialGenerator.GetLandCells();          //land cells

            BluePolicePositions = GenerateGroundPositions(NumberBluePoliceDefault, bluePoliceLaydown);
        }
Beispiel #2
0
        /**
         * Called at the start of a new run.
         */
        public void GenerateNeutralPositions()
        {
            Platform2DLaydown neutralVehicleLaydown = new Platform2DLaydown();

            neutralVehicleLaydown.fromAnchorStdDev_km = 2;
            neutralVehicleLaydown.fromAnchorMax_km    = 5;
            neutralVehicleLaydown.anchors             = trialGenerator.GetNeutralSiteLocations(); //neutral sites
            neutralVehicleLaydown.allowedCells        = trialGenerator.GetLandCells();            //land cells

            NeutralDismountPositions = GenerateGroundPositions(NumberNeutralDismountDefault, neutralVehicleLaydown);
            NeutralTruckPositions    = GenerateGroundPositions(NumberNeutralDismountDefault, neutralVehicleLaydown);
        }
Beispiel #3
0
        /**
         * Called at the start of a new run of a comms experiment and a blue size experiment
         * Called at the start of a new trial of a red size experiment
         */
        public void GenerateRedPositions()
        {
            Platform2DLaydown redVehicleLaydown = new Platform2DLaydown();

            redVehicleLaydown.fromAnchorStdDev_km = 1;
            redVehicleLaydown.fromAnchorMax_km    = 2;
            redVehicleLaydown.anchors             = trialGenerator.GetRedBaseLocations();   //red bases
            redVehicleLaydown.allowedCells        = trialGenerator.GetLandCells();          //land cells

            // Experimental red dismounts and trucks and the total
            fractionRedDismount = 0.50f;
            NumberRed           = GetNumberRed();
            NumberRedDismount   = GetNumberRedDismount(NumberRed, fractionRedDismount);
            NumberRedTrucks     = GetNumberRedTruck(NumberRed, NumberRedDismount);

            RedDismountPositions = GenerateGroundPositions(NumberRedDismount, redVehicleLaydown);    //redVehicleLaydown
            RedTruckPositions    = GenerateGroundPositions(NumberRedTrucks, redVehicleLaydown);      //redVehicleLaydown
        }
        public void InitializeLocalLaydown()
        {
            // Red dismounts
            redDismountLaydown                     = new Platform2DLaydown();
            redDismountLaydown.numMean             = 3;
            redDismountLaydown.numStdDev           = 2;
            redDismountLaydown.numMin              = 1;
            redDismountLaydown.numMax              = 10;
            redDismountLaydown.fromAnchorStdDev_km = 1;
            redDismountLaydown.fromAnchorMax_km    = 2;
            redDismountLaydown.anchors             = extractSiteLocations(redBases);
            redDismountLaydown.allowedCells        = landCells;

            // Red trucks
            redTruckLaydown                     = new Platform2DLaydown();
            redTruckLaydown.numMean             = 3;
            redTruckLaydown.numStdDev           = 2;
            redTruckLaydown.numMin              = 1;
            redTruckLaydown.numMax              = 10;
            redTruckLaydown.fromAnchorStdDev_km = 1;
            redTruckLaydown.fromAnchorMax_km    = 2;
            redTruckLaydown.anchors             = extractSiteLocations(redBases);
            redTruckLaydown.allowedCells        = landCells;

            // Merge list of NGO and villages
            List <SiteConfig> neutralSites = new List <SiteConfig>();

            neutralSites.AddRange(ngoSites);
            neutralSites.AddRange(villages);

            // Neutral dismounts
            neutralDismountLaydown                     = new Platform2DLaydown();
            neutralDismountLaydown.numMean             = 2;
            neutralDismountLaydown.numStdDev           = 2;
            neutralDismountLaydown.numMin              = 0;
            neutralDismountLaydown.numMax              = 4;
            neutralDismountLaydown.fromAnchorStdDev_km = 2;
            neutralDismountLaydown.fromAnchorMax_km    = 5;
            neutralDismountLaydown.anchors             = extractSiteLocations(neutralSites);
            neutralDismountLaydown.allowedCells        = landCells;

            // Neutral trucks
            neutralTruckLaydown                     = new Platform2DLaydown();
            neutralTruckLaydown.numMean             = 2;
            neutralTruckLaydown.numStdDev           = 2;
            neutralTruckLaydown.numMin              = 0;
            neutralTruckLaydown.numMax              = 4;
            neutralTruckLaydown.fromAnchorStdDev_km = 2;
            neutralTruckLaydown.fromAnchorMax_km    = 5;
            neutralTruckLaydown.anchors             = extractSiteLocations(neutralSites);
            neutralTruckLaydown.allowedCells        = landCells;

            // Blue police
            bluePoliceLaydown                     = new Platform2DLaydown();
            bluePoliceLaydown.numMean             = 1;
            bluePoliceLaydown.numStdDev           = 0f;
            bluePoliceLaydown.numMin              = 1;
            bluePoliceLaydown.numMax              = 1;
            bluePoliceLaydown.fromAnchorStdDev_km = 2;
            bluePoliceLaydown.fromAnchorMax_km    = 5;
            bluePoliceLaydown.anchors             = extractSiteLocations(blueBases);
            bluePoliceLaydown.allowedCells        = landCells;
        }
Beispiel #5
0
        public List <PrimitiveTriple <float, float, float> > GenerateGroundPositions(int numPositions, Platform2DLaydown laydown)
        {
            laydown.numMean   = numPositions;
            laydown.numStdDev = 0;
            laydown.numMin    = 0;
            laydown.numMax    = numPositions;

            return(laydown.Generate(trialGenerator.GetGridMath(), trialGenerator.GetRand()));
        }