|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.moml.unit.Solution
public class Solution
An instance of this class contains a "solution" of Unit constraints. In essence, the solution represents the constraints between a set of Unit variables, and a set of Units. The table below illustrates this.
V1 | V2 | ... | Vl | ||
---|---|---|---|---|---|
C1 | P11 | P12 | ... | P1l | U1 |
C2 | P21 | P22 | ... | P2l | U2 |
: | : | : | ... | : | : |
Ck | Pk1 | Pk2 | ... | Pkl | Uk |
Generally, this class is used by creating an instance that is derived from the Units specifications of a model. Then, a method is invoked that results in other instances being created that are transformations of the original instance. These transformed instances are equivalent, in a sense, to the original instance. The difference is that they provide a different perspective than that of the original instance. In particular, some of the transformed instances can be used to highlight inconsistencies not apparent in the original instance.
Red (rowland) |
Red (rowland) |
Nested Class Summary | |
---|---|
private static class |
Solution.Index
Class that represents an index in the P array. |
Field Summary | |
---|---|
(package private) double[][] |
_arrayP
|
(package private) Solution.Index |
_branchPoint
|
(package private) java.util.Vector |
_branchPoints
|
private static int |
_CONSISTENT
|
(package private) java.lang.String[] |
_constraintExplanations
|
(package private) java.util.Vector |
_constraints
|
(package private) int[] |
_constraintState
|
(package private) boolean |
_debug
|
(package private) boolean[] |
_done
|
private static int |
_INCONSISTENT
|
(package private) TypedCompositeActor |
_model
|
private static int |
_NONUNIQUE
|
(package private) int |
_numConstraints
|
(package private) int |
_numVariables
|
private static java.text.DecimalFormat |
_pFormat
|
private int |
_solveState
|
(package private) NamedObj[] |
_source
|
(package private) java.lang.String |
_stateDescription
|
private static int |
_UNKNOWN
|
(package private) Solution |
_upper
|
(package private) java.lang.String[] |
_varBindings
|
(package private) java.lang.String[] |
_variables
|
(package private) int[] |
_varState
|
(package private) Unit[] |
_vectorA
|
private static java.text.DecimalFormat |
_vNumFormat
|
Constructor Summary | |
---|---|
private |
Solution()
Construct an empty solution. |
|
Solution(TypedCompositeActor model,
java.lang.String[] vLabels,
java.util.Vector constraints)
Construct a Solution from a set of variables, and a set of constraints. |
Method Summary | |
---|---|
private void |
_analyzeState()
|
private int[] |
_branchesFrom(Solution.Index g)
|
private void |
_checkForInConsistency()
|
private void |
_debug(java.lang.String msg)
|
private void |
_eliminate(Solution.Index g)
|
private java.util.Vector |
_findAllG()
Finds all Index(i, l) such that P[i][l] ! |
private java.util.Vector |
_findAllGInRows(int[] rows)
|
private Solution.Index |
_findG()
Finds an Index(i, l) such that P[i][l] ! |
private Solution.Index |
_findGInRow(int k)
|
private java.lang.String |
_momlAnnotate(NamedObj entity,
java.lang.String color,
java.lang.String expression)
|
private java.util.Vector |
_partialSolveRecursively(int level,
Solution.Index g)
|
void |
annotateGraph()
Annotates the model so that when it is displayed it will be color coded and have tooltips that will convey various aspects of the solution. |
Solution |
completeSolution()
Search for a complete solution. |
Solution |
copy()
Make a copy of this solution. |
java.lang.String |
getShortStateDesc()
Get the state of the solution. |
java.lang.String |
getStateDesc()
Get the state of the solution. |
java.lang.StringBuffer |
headerInfo()
Create a human readable presentation of the parts of the solution that won't change as a result of the operations necessary to carry out the Gaussian elimination. |
java.util.Vector |
minimalSpanSolutions()
Produce all of the minimal span solutions that can be generated from this instance. |
java.lang.StringBuffer |
stateInfo()
The current state of the solver. |
void |
trace()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int _UNKNOWN
private static final int _CONSISTENT
private static final int _INCONSISTENT
private static final int _NONUNIQUE
double[][] _arrayP
Solution.Index _branchPoint
java.util.Vector _branchPoints
java.util.Vector _constraints
java.lang.String[] _constraintExplanations
int[] _constraintState
boolean _debug
boolean[] _done
TypedCompositeActor _model
int _numConstraints
int _numVariables
private static final java.text.DecimalFormat _pFormat
private int _solveState
NamedObj[] _source
java.lang.String _stateDescription
Solution _upper
java.lang.String[] _varBindings
java.lang.String[] _variables
int[] _varState
Unit[] _vectorA
private static final java.text.DecimalFormat _vNumFormat
Constructor Detail |
---|
private Solution()
public Solution(TypedCompositeActor model, java.lang.String[] vLabels, java.util.Vector constraints) throws IllegalActionException
model
- The model that is the source of the variables and
constraints.vLabels
- The variables.constraints
- The constraints.
IllegalActionException
- If there are problems with transforming
a constraint to canonical form.Method Detail |
---|
public void annotateGraph()
public Solution completeSolution()
public Solution copy()
public java.lang.String getShortStateDesc()
public java.lang.String getStateDesc()
public java.lang.StringBuffer headerInfo()
public java.util.Vector minimalSpanSolutions()
public java.lang.StringBuffer stateInfo()
public void trace()
private void _analyzeState()
private int[] _branchesFrom(Solution.Index g)
private void _checkForInConsistency()
private void _debug(java.lang.String msg)
private void _eliminate(Solution.Index g)
g
- private java.util.Vector _findAllG()
private java.util.Vector _findAllGInRows(int[] rows)
rows
-
private Solution.Index _findG()
private Solution.Index _findGInRow(int k)
private java.lang.String _momlAnnotate(NamedObj entity, java.lang.String color, java.lang.String expression)
private java.util.Vector _partialSolveRecursively(int level, Solution.Index g)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |