infosapient.system
Class FzyAttribClause

java.lang.Object
  |
  +--infosapient.system.ObservableImpl
        |
        +--infosapient.system.FzySystemComponent
              |
              +--infosapient.system.FzyClauseComponent
                    |
                    +--infosapient.system.FzyAttribClause

public class FzyAttribClause
extends FzyClauseComponent
implements Observer, java.io.Serializable, XMLOutput

Class AttribClause implements the concept of a rule clause. Rule clauses are used both within the premise and the consequent/alternate consequent of a rule

A rule clause will contain the following:

attribOI -- the attribute Of Interest, the attribute that we are attempting to determine the degree of membership.

goalSet -- the fuzzy set contained within the attribOI that we are attempting to determine if this set displays any degree of membership.

If the goal set doesn't then this particular attribute clause will be evaluated to zero degree of membership (aka 'false').
Example: Amount_Of_Requested_PO is low.
We are interested in this only to the extent that the current domain value of Amount_Of_Requested_PO is within the domain of Amount_Of_Requested_PO.low. If it is not, then this particular clause is evaluated to be FALSE.
 
goalAttribute -- this is present only if the goal set is NOT present. The goalAttribute indicates that we don't know which set of the goal attribute is to be evaluated for membership.
 
Example: Amount_Of_Requested_PO is very above PO_Approval_AMT
In this case the attribute of interest is Amount_Of_Requested_PO. (The value of which we are attempting to determine if it is over PO_Approval_AMT).
The goal attribute is PO_Approval_AMT and we will need to determine the value of it before we can determine if Amount_Of_Requested_PO is very above PO_Approval_AMT.
 

Version:
$Revision: 1.1.1.1 $
See Also:
Serialized Form

Field Summary
(package private)  FzyAttribute attribOI
          The attributeOfInterest within this clause
 java.lang.String conjName
           
(package private)  FzyAttribute goalAttribute
          Goal Attribute (if present) of the attributeOfInterest.
(package private)  FzySet goalSet
          Goal set (if present) of the atttributeOfInterest
(package private)  java.util.Vector hedges
          A collection of hedges to modify the set.
(package private)  java.lang.Double n
          Numeric literal (if present) -- found during parsing this clause.
(package private)  java.lang.String name
          The name of this attribute clause -- same as the attribOI name.
(package private)  FzyHedge rh
          A restriction hedge, such as increased or decreased
(package private) static long serialVersionUID
           
(package private)  FzySolutionSet solution
          The solution set of this Attribute clause
 
Fields inherited from class infosapient.system.FzyClauseComponent
owner, text
 
Fields inherited from class infosapient.system.FzySystemComponent
DEBUG_, myID, name, pcs, serialVersionUID, trace, vcs
 
Fields inherited from class infosapient.system.ObservableImpl
arr, changed, obs, serialVersionUID
 
Constructor Summary
FzyAttribClause()
          Insert the method's description here.
 
Method Summary
 FzySet applyHedges()
          Clone this set.
 FzyAttribute getAttribute()
          Return the attribute Of Interest for this attribute clause.
 java.lang.String getConjName()
          Return the conjunctive for this attribute clause.
 FzySet getGoal()
          Returns the goal fuzzy set of this clause with the hedges applied.
 FzyAttribute getGoalAttribute()
          Return the goal attribute for this attribute clause.
 java.util.Vector getHedges()
          Insert the method's description here.
 java.lang.Double getN()
          Return the fuzzy attribute numeric goal that the attribOI solution is to be compared to.
 java.lang.String getName()
           
 double getSolution()
          Convienence method to return the current solution set's solution (domain value).
 double getSolutionDOM()
          Convienence method to return the current solution set's solution DOM (membership value).
 FzySolutionSet getSolutionSet()
          Return the solution set for the attribOI.
 boolean hasSolution()
          If a solution for this attributes solution fuzzy set has been computed, return true.
 void reset()
           
 void setAttribute(FzyAttribute newAttribute)
          Set the attribOI for this attribClause.
 void setConjName(java.lang.String newConjName)
          Insert the method's description here.
 void setGoal(FzySet fs)
          Sets the goal fuzzy set of this attribute (the set that we are trying to determine.
 void setGoalAttribute(FzyAttribute newGoalAttribute)
          Insert the method's description here.
 void setHedges(java.util.Vector newHedges)
          Insert the method's description here.
 void setN(java.lang.Double newN)
          Insert the method's description here.
 void setName(java.lang.String n)
           
 void setSolutionSet(FzySolutionSet fos)
          Sets the SolutionSet for the attribOI.
 java.lang.String toString()
           
 java.lang.StringBuffer toXML(int nTabs)
          Represent this attribute clause as text.
 void update(Observable juo, java.lang.Object obj)
           
 
Methods inherited from class infosapient.system.FzyClauseComponent
append, append, getOwner, getText, setOwnerClause, setText, toText
 
Methods inherited from class infosapient.system.FzySystemComponent
addPropertyChangeListener, addVetoableChangeListener, equals, getID, getPropertyChangeSupport, getVetoableChangeSupport, hashCode, printOn, removePropertyChangeListener, removeVetoableChangeListener, setID
 
Methods inherited from class infosapient.system.ObservableImpl
addObserver, clearChanged, containsObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID

attribOI

FzyAttribute attribOI
The attributeOfInterest within this clause

goalSet

FzySet goalSet
Goal set (if present) of the atttributeOfInterest

hedges

java.util.Vector hedges
A collection of hedges to modify the set.

goalAttribute

FzyAttribute goalAttribute
Goal Attribute (if present) of the attributeOfInterest.

rh

FzyHedge rh
A restriction hedge, such as increased or decreased

solution

FzySolutionSet solution
The solution set of this Attribute clause

name

java.lang.String name
The name of this attribute clause -- same as the attribOI name.

n

java.lang.Double n
Numeric literal (if present) -- found during parsing this clause. Will be converted to a FzySingleton.

conjName

public java.lang.String conjName
Constructor Detail

FzyAttribClause

public FzyAttribClause()
Insert the method's description here. Creation date: (1/2/00 7:03:55 PM)
Method Detail

applyHedges

public FzySet applyHedges()
                   throws java.lang.CloneNotSupportedException
Clone this set. Apply all the hedges (if there are any) in LIFO order. Return the modified set. (The input set is NOT modified.)
Returns:
FzySet -- the fzySet as modified by the hedges.

getAttribute

public FzyAttribute getAttribute()
Return the attribute Of Interest for this attribute clause.
Returns:
FzyAttribute - the attribute of Interest

getConjName

public java.lang.String getConjName()
Return the conjunctive for this attribute clause. Creation date: (1/31/00 11:25:35 AM)
Returns:
java.lang.String

getGoal

public FzySet getGoal()
               throws java.lang.CloneNotSupportedException,
                      FzySystemException
Returns the goal fuzzy set of this clause with the hedges applied.
Returns:
FzySet --goalSet the goal set of this attribute clause.

getGoalAttribute

public FzyAttribute getGoalAttribute()
Return the goal attribute for this attribute clause. Creation date: (1/3/00 4:58:27 PM)
Returns:
infosapient.system.FzyAttribute

getHedges

public java.util.Vector getHedges()
Insert the method's description here. Creation date: (1/4/00 11:19:43 AM)
Returns:
java.util.Vector

getN

public java.lang.Double getN()
Return the fuzzy attribute numeric goal that the attribOI solution is to be compared to. Creation date: (1/4/00 11:19:10 AM)
Returns:
java.lang.Double

getName

public java.lang.String getName()
Overrides:
getName in class FzySystemComponent

getSolution

public double getSolution()
Convienence method to return the current solution set's solution (domain value).
Returns:
double currentSolution for the solutionSet.

getSolutionDOM

public double getSolutionDOM()
Convienence method to return the current solution set's solution DOM (membership value).
Overrides:
getSolutionDOM in class FzyClauseComponent
Returns:
double currentSolutionDOM for the solutionSet.

getSolutionSet

public FzySolutionSet getSolutionSet()
Return the solution set for the attribOI. If the solutionSet has not been created, instantiate it and return the new set.
Returns:
solutionSet -- the solution set for the attribOI.

hasSolution

public boolean hasSolution()
If a solution for this attributes solution fuzzy set has been computed, return true.
Overrides:
hasSolution in class FzyClauseComponent
Returns:
boolean solutionState -- if a solution for this attributes solution fuzzy set has been computed.

reset

public void reset()
Overrides:
reset in class FzyClauseComponent

setAttribute

public void setAttribute(FzyAttribute newAttribute)
Set the attribOI for this attribClause. Creation date: (1/3/00 4:58:27 PM)
Parameters:
newAttribute - infosapient.system.FzyAttribute

setConjName

public void setConjName(java.lang.String newConjName)
Insert the method's description here. Creation date: (1/31/00 11:25:35 AM)
Parameters:
newConjName - java.lang.String

setGoal

public void setGoal(FzySet fs)
Sets the goal fuzzy set of this attribute (the set that we are trying to determine.
Parameters:
FzySet - the goal set of this attribute.

setGoalAttribute

public void setGoalAttribute(FzyAttribute newGoalAttribute)
Insert the method's description here. Creation date: (1/3/00 4:58:27 PM)
Parameters:
newGoalAttribute - infosapient.system.FzyAttribute

setHedges

public void setHedges(java.util.Vector newHedges)
Insert the method's description here. Creation date: (1/4/00 11:19:43 AM)
Parameters:
newHedges - java.util.Vector

setN

public void setN(java.lang.Double newN)
Insert the method's description here. Creation date: (1/4/00 11:19:10 AM)
Parameters:
newN - java.lang.Double

setName

public void setName(java.lang.String n)
Overrides:
setName in class FzySystemComponent

setSolutionSet

public void setSolutionSet(FzySolutionSet fos)
Sets the SolutionSet for the attribOI.
Parameters:
FzySolutionSet - sol -- the solutionSet for the attribOI.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toXML

public java.lang.StringBuffer toXML(int nTabs)
Represent this attribute clause as text. (Used for displaying rules.) Creation date: (2/1/00 5:50:30 PM)
Specified by:
toXML in interface XMLOutput
Returns:
java.lang.StringBuffer

update

public void update(Observable juo,
                   java.lang.Object obj)
Specified by:
update in interface Observer

License to use this program is provided under the TERMS OF THE COMMON PUBLIC LICENSE 0.5. ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

Copyright (c) 2001, Workplace Performance Tools, All Rights Reserved