コード例 #1
0
        //public void StartCycle()
        //{
        //	numUploadstoDC = 0;
        //	for (int i = 0; i < Groups.Length; i++)
        //	{
        //		Groups[i].StartCycle();
        //	}
        //} // StartCycle

        //public void EndCycle()
        //{
        //	for (int i = 0; i < Groups.Length; i++)
        //	{
        //		Groups[i].EndCycle();
        //	}
        //} // EndCycle

        public override void RequestTransmissionSlot(int destinationSpace)
        {
            numTransmissionRequests++;

            if (GV.FindRegionNumberfromSpace(destinationSpace) != NodeNum)
            {
                numUploadstoDC++;
            }
        }          // AddTransmissionRequest
コード例 #2
0
        // When a car finishes it's job, it will call this function to release the backup
        // vehicles
        public static void DeleteBackup(int Backup1, int Backup2)
        {
            int Region = 0;

            if (Backup1 != -1)
            {
                Region = GV.FindRegionNumberfromSpace(Backup1);
                Regions[Region].DeleteBackup(Backup1);
            }
            if (Backup2 != -1)
            {
                Region = GV.FindRegionNumberfromSpace(Backup2);
                Regions[Region].DeleteBackup(Backup2);
            }
        }
コード例 #3
0
        // Sends a message to the backup machine to notify it that it will be
        // receiving the VM corresponding to its job.
        public static Boolean NotifyPartnerofTransfer(int SpaceNumber, double DataSize, GV.TransmissionType transType, Job job)
        {
            int Region = GV.FindRegionNumberfromSpace(SpaceNumber);

            return(Regions[Region].NotifyPartnerofTransfer(SpaceNumber, DataSize, transType, job));
        }
コード例 #4
0
        }         // FindMigrationPartner

        // This function will assign an existing job to a new vehicle.
        // At this point in time it is used only for when a vehicle is backing
        // up a new job to other cars.
        public static void AssignJobtoVehicle(Job job, int DestinationSpace, int WorkingVehicle, int dataSize)
        {
            int Region = GV.FindRegionNumberfromSpace(DestinationSpace);

            Regions[Region].AssignJobtoVehicle(job, DestinationSpace, WorkingVehicle, dataSize);
        }