当前位置: 首页>>代码示例>>Java>>正文


Java AbstractAlgorithm.setStack方法代码示例

本文整理汇总了Java中vnreal.algorithms.AbstractAlgorithm.setStack方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractAlgorithm.setStack方法的具体用法?Java AbstractAlgorithm.setStack怎么用?Java AbstractAlgorithm.setStack使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vnreal.algorithms.AbstractAlgorithm的用法示例。


在下文中一共展示了AbstractAlgorithm.setStack方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入方法依赖的package包/类
@Override
protected void doAction() {

	if (!yesIsDistanceButton.isSelected()
			&& !noIsDistanceButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Distance'</b> parameter must be specified</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "True");
	String distance = noIsDistanceButton.isSelected() ? "-1" : maxDistSpinner.getValue().toString();
	param.put("distance", distance);
	param.put("weightCpu", cpuWSpinner.getValue().toString());
	param.put("weightBw", bwWSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	
	// finally generate the algorithm
	AbstractAlgorithm algo = new NodeRanking(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:37,代码来源:NRPSWizard.java

示例2: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入方法依赖的package包/类
@Override
protected void doAction() {

	if (!yesIsDistanceButton.isSelected()
			&& !noIsDistanceButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Distance'</b> parameter must be specified</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "False");
	String distance = noIsDistanceButton.isSelected() ? "-1" : maxDistSpinner.getValue().toString();
	param.put("distance", distance);
	param.put("kShortestPaths", kSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	

	// finally generate the algorithm
	AbstractAlgorithm algo = new BFSCoordinated(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:37,代码来源:BFSNRWizard.java

示例3: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入方法依赖的package包/类
@Override
protected void doAction() {

	if (!deterministicButton.isSelected() && !randomizedButton.isSelected()) {
		JOptionPane
				.showMessageDialog(
						GUI.getInstance(),
						"<html><p><b>'Type'</b> parameter must be Deterministic or Randomized</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "True");
	param.put("rounding", "False");
	param.put("distance", maxDistSpinner.getValue().toString());
	param.put("weightCpu", cpuWSpinner.getValue().toString());
	param.put("weightBw", bwWSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	String randomize = randomizedButton.isSelected() ? "True" : "False";
	param.put("randomize", randomize);
	
	// finally generate the algorithm
	AbstractAlgorithm algo = new CoordinatedMapping(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:39,代码来源:CoordinatedMappingPathSplittingWizard.java

示例4: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入方法依赖的package包/类
@Override
protected void doAction() {

	if (!yesIsDistanceButton.isSelected()
			&& !noIsDistanceButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Distance'</b> parameter must be specified</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "False");
	String distance = noIsDistanceButton.isSelected() ? "-1" : maxDistSpinner.getValue().toString();
	param.put("distance", distance);
	param.put("kShortestPaths", kSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);

	// finally generate the algorithm
	AbstractAlgorithm algo = new AvailableResources(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:36,代码来源:AvailableResourcesWizard.java

示例5: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入方法依赖的package包/类
@Override
protected void doAction() {

	if (!yesIsDistanceButton.isSelected()
			&& !noIsDistanceButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Distance'</b> parameter must be specified</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "False");
	String distance = noIsDistanceButton.isSelected() ? "-1" : maxDistSpinner.getValue().toString();
	param.put("distance", distance);
	param.put("kShortestPaths", kSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	
	// finally generate the algorithm
	AbstractAlgorithm algo = new NodeRanking(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:36,代码来源:NRkSPWizard.java

示例6: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入方法依赖的package包/类
@Override
protected void doAction() {

	if (!deterministicButton.isSelected() && !randomizedButton.isSelected()) {
		JOptionPane
				.showMessageDialog(
						GUI.getInstance(),
						"<html><p><b>'Type'</b> parameter must be Deterministic or Randomized</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "False");
	param.put("distance", maxDistSpinner.getValue().toString());
	param.put("weightCpu", cpuWSpinner.getValue().toString());
	param.put("weightBw", bwWSpinner.getValue().toString());
	param.put("kShortestPaths", kSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	String randomize = randomizedButton.isSelected() ? "True" : "False";
	param.put("randomize", randomize);
	
	// finally generate the algorithm
	AbstractAlgorithm algo = new CoordinatedMapping(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:39,代码来源:CoordinatedMappingkShortestPathWizard.java

示例7: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入方法依赖的package包/类
@Override
protected void doAction() {

	// This should actually never happen
	if (!yesIsDistanceButton.isSelected()
			&& !noIsDistanceButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Distance'</b> parameter must be specified</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "True");
	String distance = noIsDistanceButton.isSelected() ? "-1" : maxDistSpinner.getValue().toString();
	param.put("distance", distance);
	param.put("weightCpu", cpuWSpinner.getValue().toString());
	param.put("weightBw", bwWSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	
	// finally generate the algorithm
	AbstractAlgorithm algo = new AvailableResources(param);
	algo.setStack(ns);

	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:38,代码来源:AvailableResourcesPathSplittingWizard.java

示例8: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入方法依赖的package包/类
@Override
protected void doAction() {

	if (!yesIsDistanceButton.isSelected()
			&& !noIsDistanceButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Distance'</b> parameter must be specified</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "True");
	String distance = noIsDistanceButton.isSelected() ? "-1" : maxDistSpinner.getValue().toString();
	param.put("distance", distance);
	param.put("weightCpu", cpuWSpinner.getValue().toString());
	param.put("weightBw", bwWSpinner.getValue().toString());
	param.put("kShortestPaths", kSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	
			
	// finally generate the algorithm
	AbstractAlgorithm algo = new BFSCoordinated(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:39,代码来源:BFSNRPSWizard.java

示例9: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入方法依赖的package包/类
@Override
protected void doAction() {

	if (!deterministicButton.isSelected() && !randomizedButton.isSelected()) {
		JOptionPane
				.showMessageDialog(
						GUI.getInstance(),
						"<html><p><b>'Type'</b> parameter must be Deterministic or Randomized</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "True");
	param.put("rounding", "True");
	param.put("distance", maxDistSpinner.getValue().toString());
	param.put("weightCpu", cpuWSpinner.getValue().toString());
	param.put("weightBw", bwWSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	String randomize = randomizedButton.isSelected() ? "True" : "False";
	param.put("randomize", randomize);
	
	// finally generate the algorithm
	AbstractAlgorithm algo = new CoordinatedMapping(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:39,代码来源:CoordinatedMappingRoundingPathStrippingWizard.java


注:本文中的vnreal.algorithms.AbstractAlgorithm.setStack方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。