本文整理汇总了Java中vnreal.algorithms.GenericMappingAlgorithm类的典型用法代码示例。如果您正苦于以下问题:Java GenericMappingAlgorithm类的具体用法?Java GenericMappingAlgorithm怎么用?Java GenericMappingAlgorithm使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GenericMappingAlgorithm类属于vnreal.algorithms包,在下文中一共展示了GenericMappingAlgorithm类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: map
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public NetworkStack map(AlgorithmParameter data, SubstrateNetwork substrate, List<VirtualNetwork> virtuals) {
NetworkStack stack = new NetworkStack(substrate, virtuals);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
AlgorithmParameter param = new AlgorithmParameter();
param.put("kShortestPath", "50");
param.put("distance", "35");
param.put("PathSplitting", "false");
param.put("eppstein", "false");
GenericMappingAlgorithm algo = new AvailableResources(param);
algo.setStack(stack);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return stack;
}
示例2: map
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public NetworkStack map(AlgorithmParameter data, SubstrateNetwork substrate, List<VirtualNetwork> virtuals) {
NetworkStack stack = new NetworkStack(substrate, virtuals);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
AlgorithmParameter param = new AlgorithmParameter();
param.put("weightCpu", "0");
param.put("weightBw", "0");
param.put("randomize", "false");
param.put("overload", "false");
param.put("distance", "35");
param.put("PathSplitting", "true");
GenericMappingAlgorithm algo = new CoordinatedMapping(param);
algo.setStack(stack); if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return stack;
}
示例3: map
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public NetworkStack map(AlgorithmParameter data, SubstrateNetwork substrate, List<VirtualNetwork> virtuals) {
NetworkStack stack = new NetworkStack(substrate, virtuals);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
AlgorithmParameter param = new AlgorithmParameter();
param.put("weightCpu", "0");
param.put("weightBw", "0");
param.put("distance", "35");
param.put("PathSplitting", "true");
GenericMappingAlgorithm algo = new AvailableResources(param);
algo.setStack(stack);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return stack;
}
示例4: map
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public NetworkStack map(AlgorithmParameter data, SubstrateNetwork substrate, List<VirtualNetwork> virtuals) {
NetworkStack stack = new NetworkStack(substrate, virtuals);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
AlgorithmParameter param = new AlgorithmParameter();
param.put("weightCpu", "0");
param.put("weightBw", "0");
param.put("kShortestPath", "50");
param.put("randomize", "false");
param.put("overload", "false");
param.put("distance", "35");
param.put("PathSplitting", "false");
param.put("eppstein", "false");
GenericMappingAlgorithm algo = new CoordinatedMapping(param);
algo.setStack(stack);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return stack;
}
示例5: map
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public NetworkStack map(AlgorithmParameter data, SubstrateNetwork substrate, List<VirtualNetwork> virtuals) {
NetworkStack stack = new NetworkStack(substrate, virtuals);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
AlgorithmParameter param = new AlgorithmParameter();
param.put("weightCpu", "0");
param.put("weightBw", "0");
param.put("distance", "35");
param.put("PathSplitting", "true");
GenericMappingAlgorithm algo = new AvailableResources(param);
algo.setStack(stack);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return stack;
}
示例6: map
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public NetworkStack map(AlgorithmParameter data, SubstrateNetwork substrate, List<VirtualNetwork> virtuals) {
NetworkStack stack = new NetworkStack(substrate, virtuals);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
AlgorithmParameter param = new AlgorithmParameter();
param.put("kShortestPath", "50");
param.put("distance", "35");
param.put("PathSplitting", "false");
param.put("eppstein", "false");
GenericMappingAlgorithm algo = new AvailableResources(param);
algo.setStack(stack);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return stack;
}
示例7: mapNetwork
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
vns.add(vNetwork);
NetworkStack stack = new NetworkStack(network, vns);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
AlgorithmParameter param = new AlgorithmParameter();
param.put("weightCpu", "0");
param.put("weightBw", "0");
param.put("distance", "35");
param.put("PathSplitting", "true");
GenericMappingAlgorithm algo = new AvailableResources(param);
algo.setStack(stack);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return VnrUtils.isMapped(vNetwork);
}
示例8: mapNetwork
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
vns.add(vNetwork);
NetworkStack stack = new NetworkStack(network, vns);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
AlgorithmParameter param = new AlgorithmParameter();
param.put("kShortestPath", "50");
param.put("distance", "35");
param.put("PathSplitting", "false");
param.put("eppstein", "false");
GenericMappingAlgorithm algo = new AvailableResources(param);
algo.setStack(stack);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return VnrUtils.isMapped(vNetwork);
}
示例9: mapNetwork
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
vns.add(vNetwork);
NetworkStack stack = new NetworkStack(network, vns);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
AlgorithmParameter param = new AlgorithmParameter();
param.put("weightCpu", "0");
param.put("weightBw", "0");
param.put("randomize", "false");
param.put("overload", "false");
param.put("distance", "35");
param.put("PathSplitting", "true");
GenericMappingAlgorithm algo = new CoordinatedMapping(param);
algo.setStack(stack);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return VnrUtils.isMapped(vNetwork);
}
示例10: mapNetwork
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
vns.add(vNetwork);
NetworkStack stack = new NetworkStack(network, vns);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
AlgorithmParameter param = new AlgorithmParameter();
param.put("kShortestPath", "50");
param.put("distance", "35");
param.put("overload", "false");
GenericMappingAlgorithm algo = new BFSCoordinated(param);
algo.setStack(stack);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return VnrUtils.isMapped(vNetwork);
}
示例11: mapNetwork
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
vns.add(vNetwork);
NetworkStack stack = new NetworkStack(network, vns);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
AlgorithmParameter param = new AlgorithmParameter();
param.put("weightCpu", "0");
param.put("weightBw", "0");
param.put("distance", "35");
param.put("PathSplitting", "true");
GenericMappingAlgorithm algo = new AvailableResources(param);
algo.setStack(stack);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return VnrUtils.isMapped(vNetwork);
}
示例12: runAlgorithm
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public void runAlgorithm(NetworkStack stack, ScenarioData data) {
/*
* Coordinated node and link mapping with K-shortestPaths Important
* Parameters Rounding Type: Randomized rounding Maximum number of
* shortest path to calculate: 20 Hidden Hops Considered: False Distance
* Value : 40
*/
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
IAlgorithm algo = new CoordinatedMappingkShortestPath(stack, 40, 1, 1, 1, 20, false);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
}
示例13: mapNetwork
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
vns.add(vNetwork);
NetworkStack stack = new NetworkStack(network, vns);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
IAlgorithm algo = new CoordinatedMappingkShortestPath(stack, dist,
wCpu, wBw, type, k, false);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return VnrUtils.isMapped(vNetwork);
}
示例14: mapNetwork
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
vns.add(vNetwork);
NetworkStack stack = new NetworkStack(network, vns);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
IAlgorithm algo = new CoordinatedMappingPathSplitting(stack, dist,
wCpu, wBw, type, false);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return VnrUtils.isMapped(vNetwork);
}
示例15: mapNetwork
import vnreal.algorithms.GenericMappingAlgorithm; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
vns.add(vNetwork);
NetworkStack stack = new NetworkStack(network, vns);
LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
double hiddenHopsFactor = 0;
hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
IAlgorithm algo = new BFSCoordinatedVneAlgorithm(stack, k, dist, false, false);
if (algo instanceof GenericMappingAlgorithm)
((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
algo.performEvaluation();
return VnrUtils.isMapped(vNetwork);
}