} // RegionHub public bool InitializeSpace(int space, bool SimStart) { //int Group = space % (GV.numSpacesperAP * GV.numAPsperGroup * GV.numGroupsperRegion); //Group = Group / (GV.numSpacesperAP * GV.numAPsperGroup); int Group = GV.FindGroupNumberfromSpace(space); return(Groups[Group].InitializeSpace(space, SimStart)); }
public override void RequestTransmissionSlot(int destinationSpace) { numTransmissionRequests++; if (GV.FindGroupNumberfromSpace(destinationSpace) != NodeNum) { numUploadstoRegion++; } }
// Sends a message to the backup machine to notify it that it will be // receiving the VM corresponding to its job. public Boolean NotifyPartnerofTransfer(int SpaceNumber, double DataSize, GV.TransmissionType transType, Job job) { int Group = GV.FindGroupNumberfromSpace(SpaceNumber); return(Groups[Group].NotifyPartnerofTransfer(SpaceNumber, DataSize, transType, job)); }
// When a car finishes it's job, it will call this function to release the backup // vehicles public void DeleteBackup(int SpaceNumber) { int Group = GV.FindGroupNumberfromSpace(SpaceNumber); Groups[Group].DeleteBackup(SpaceNumber); }
} // Receive // 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 void AssignJobtoVehicle(Job job, int DestinationSpace, int WorkingVehicle, int dataSize) { int Group = GV.FindGroupNumberfromSpace(DestinationSpace); Groups[Group].AssignJobtoVehicle(job, DestinationSpace, WorkingVehicle, dataSize); }