Class LocationBasedOptimalTPC
- java.lang.Object
-
- com.facebook.openwifi.rrm.optimizers.tpc.TPC
-
- com.facebook.openwifi.rrm.optimizers.tpc.LocationBasedOptimalTPC
-
public class LocationBasedOptimalTPC extends TPC
Location-based optimal TPC algorithm.Assign tx power based on an exhaustive search algorithm given the AP location.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ALGORITHM_ID
The RRM algorithm ID.-
Fields inherited from class com.facebook.openwifi.rrm.optimizers.tpc.TPC
DEFAULT_TX_POWER_CHOICES, deviceConfigs, MAX_TX_POWER, MIN_TX_POWER, model, zone
-
-
Constructor Summary
Constructors Constructor Description LocationBasedOptimalTPC(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Map<String,Integer>>
computeTxPowerMap()
Compute tx power assignments.protected static List<List<Integer>>
getPermutationsWithRepetitions(List<Integer> choices, int n)
Iterative way to generate permutations with repetitions.static LocationBasedOptimalTPC
makeWithArgs(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager, Map<String,String> args)
Factory method to parse generic args map into the proper constructorstatic List<Integer>
runLocationBasedOptimalTPC(int sampleSpace, int numOfAPs, List<Double> apLocX, List<Double> apLocY, List<Integer> txPowerChoices)
Get the optimal tx power for all the participant APs.-
Methods inherited from class com.facebook.openwifi.rrm.optimizers.tpc.TPC
getApsPerChannel, updateDeviceApConfig, updateTxPowerChoices
-
-
-
-
Field Detail
-
ALGORITHM_ID
public static final String ALGORITHM_ID
The RRM algorithm ID.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LocationBasedOptimalTPC
public LocationBasedOptimalTPC(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager)
Constructor.
-
-
Method Detail
-
makeWithArgs
public static LocationBasedOptimalTPC makeWithArgs(Modeler.DataModel model, String zone, DeviceDataManager deviceDataManager, Map<String,String> args)
Factory method to parse generic args map into the proper constructor
-
getPermutationsWithRepetitions
protected static List<List<Integer>> getPermutationsWithRepetitions(List<Integer> choices, int n)
Iterative way to generate permutations with repetitions.- Parameters:
choices
- all the choices to be consideredn
- the number of items in a permutation- Returns:
- the list of all the combinations
-
runLocationBasedOptimalTPC
public static List<Integer> runLocationBasedOptimalTPC(int sampleSpace, int numOfAPs, List<Double> apLocX, List<Double> apLocY, List<Integer> txPowerChoices)
Get the optimal tx power for all the participant APs.- Parameters:
sampleSpace
- the boundary of the spacenumOfAPs
- the number of APsapLocX
- the location x of the APsapLocY
- the location y of the APstxPowerChoices
- the tx power options in consideration- Returns:
- the tx power of each device
-
-