ptolemy.graph.analysis
Class MaximumProfitToCostRatioAnalysis

java.lang.Object
  extended by ptolemy.graph.analysis.Analysis
      extended by ptolemy.graph.analysis.MaximumProfitToCostRatioAnalysis

public class MaximumProfitToCostRatioAnalysis
extends Analysis

Maximum profit to cost ratio analysis.

Please refer to:

Ali Dasdan , Sandy S. Irani , Rajesh K. Gupta, Efficient algorithms for optimum cycle mean and optimum cost to time ratio problems, Proceedings of the 36th ACM/IEEE conference on Design automation conference, p.37-42, June 21-25, 1999, New Orleans, Louisiana, United States

for a detailed mathematical description of the problem.

Since:
Ptolemy II 4.0
Version:
$Id: MaximumProfitToCostRatioAnalysis.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Shahrooz Shahparnia
See Also:
CycleMeanAnalysis
Accepted Rating:
Red (ssb)
Proposed Rating:
Red (shahrooz)

Constructor Summary
MaximumProfitToCostRatioAnalysis(Graph graph, ToDoubleMapping edgeProfits, ToIntMapping edgeCosts)
          Construct an instance of this class using a default analyzer.
MaximumProfitToCostRatioAnalysis(MaximumProfitToCostRatioAnalyzer analyzer)
          Construct an instance of this class using a given analyzer.
 
Method Summary
 java.util.List cycle()
          Return the nodes on the cycle that corresponds to the maximum profit to cost ratio.
 double maximumRatio()
          Return the maximum profit to cost ratio of the given graph.
 java.lang.String toString()
          Return a description of the analysis and the associated analyzer.
 boolean validAnalyzerInterface(Analyzer analyzer)
          Check if a given analyzer is compatible with this analysis.
 
Methods inherited from class ptolemy.graph.analysis.Analysis
analyzer, changeAnalyzer, graph, valid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MaximumProfitToCostRatioAnalysis

public MaximumProfitToCostRatioAnalysis(Graph graph,
                                        ToDoubleMapping edgeProfits,
                                        ToIntMapping edgeCosts)
Construct an instance of this class using a default analyzer. Please note the limitation on edge costs which is being imposed by the default analyzer.

Parameters:
graph - The given graph.
edgeProfits - The profits associated with the edges of the graph.
edgeCosts - The costs associated with the edges of the graph.

MaximumProfitToCostRatioAnalysis

public MaximumProfitToCostRatioAnalysis(MaximumProfitToCostRatioAnalyzer analyzer)
Construct an instance of this class using a given analyzer.

Parameters:
analyzer - The given analyzer.
Method Detail

cycle

public java.util.List cycle()
Return the nodes on the cycle that corresponds to the maximum profit to cost ratio.

Returns:
The nodes on the cycle as an ordered list.

maximumRatio

public double maximumRatio()
Return the maximum profit to cost ratio of the given graph.

Returns:
Return the maximum profit to cost ratio of the associated graph.

toString

public java.lang.String toString()
Return a description of the analysis and the associated analyzer.

Overrides:
toString in class Analysis
Returns:
A description of the analysis and the associated analyzer.

validAnalyzerInterface

public boolean validAnalyzerInterface(Analyzer analyzer)
Check if a given analyzer is compatible with this analysis. In other words if it is possible to use it to compute the computation associated with this analysis.

Overrides:
validAnalyzerInterface in class Analysis
Parameters:
analyzer - The given analyzer.
Returns:
True if the given analyzer is valid for this analysis.