Package ptolemy.data.ontologies.lattice
Class DeltaConstraintSolver
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.moml.MoMLModelAttribute
-
- ptolemy.data.ontologies.OntologySolverBase
-
- ptolemy.data.ontologies.OntologySolver
-
- ptolemy.data.ontologies.lattice.LatticeOntologySolver
-
- ptolemy.data.ontologies.lattice.DeltaConstraintSolver
-
- All Implemented Interfaces:
java.lang.Cloneable
,Testable
,Changeable
,Configurable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class DeltaConstraintSolver extends LatticeOntologySolver
An implementation of PropertyConstraintSolver that tries to minimize error cases. It does this by searching for a set of constraints that produce an error but for whom removing any constraint remove the error.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Ben Lickly, Dai Bui
- Pt.AcceptedRating:
- Red (blickly)
- Pt.ProposedRating:
- Red (blickly)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.data.ontologies.lattice.LatticeOntologySolver
LatticeOntologySolver.ConstraintType
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
-
Fields inherited from class ptolemy.data.ontologies.lattice.LatticeOntologySolver
_initialConstraintList, _resolvedConstraintList, _resolvedUnacceptableList, ADD_FUNCTION_NAME, AND_FUNCTION_NAME, DIVIDE_FUNCTION_NAME, MULTIPLY_FUNCTION_NAME, NEGATE_FUNCTION_NAME, NOT_FUNCTION_NAME, OR_FUNCTION_NAME, RECIPROCAL_FUNCTION_NAME, solverStrategy, solvingFixedPoint, SUBTRACT_FUNCTION_NAME
-
Fields inherited from class ptolemy.data.ontologies.OntologySolver
_eol, _momlHandler
-
Fields inherited from class ptolemy.data.ontologies.OntologySolverBase
_adapterStore, _nonSettables, _ontologySolverUtilities, _resolvedProperties, ontologySolverUtilitiesWrapper
-
Fields inherited from class ptolemy.moml.MoMLModelAttribute
_model, modelURL
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
-
Constructor Summary
Constructors Constructor Description DeltaConstraintSolver(NamedObj container, java.lang.String name)
Constructs a DeltaConstraintSolver with the given name contained by the specified entity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
_resolvePropertiesHasErrors(NamedObj toplevel, java.util.List<Inequality> constraintList)
Resolve the properties of the given top-level container, subject to the given constraint list, and then check if the resulting solution has errors.void
resolveConflicts()
Resolve the concept values for the toplevel entity that contains this solver, given the model analyzer that invokes this.-
Methods inherited from class ptolemy.data.ontologies.lattice.LatticeOntologySolver
_clearLists, _getAdapter, _getConceptTermManager, _getConstraintType, _resolveConcepts, clone, getAdapter, getAdapter, getAdapter, getAffectedTerms, getConceptTerm, getConceptTermManager, getConstraintManager, getInitialSolverInformation, getResolvedSolverInformation, getUnacceptableTerms, getUnacceptableTermsAsString, hasUnacceptableTerms, initialize, isAnnotatedTerm, isLeastFixedPoint, reset, resolveConcepts, test, train
-
Methods inherited from class ptolemy.data.ontologies.OntologySolver
checkErrors, checkResolutionErrors, configure, displayConcepts, getMoMLHandler, invokeSolver, invokeSolver, isSettable
-
Methods inherited from class ptolemy.data.ontologies.OntologySolverBase
_getAdapter, _getPackageName, _toplevel, cleanConstants, clearResolvedConcept, getAllAdapters, getAllConceptableNamedObjs, getAllContainedOntologies, getAllPropertyables, getAllSolvers, getAttribute, getConcept, getOntology, getOntologySolverUtilities, getParser, getParseTree, markAsNonSettable, resetAll, setConcept, setOntologySolverUtilities
-
Methods inherited from class ptolemy.moml.MoMLModelAttribute
_exportMoMLContents, attributeChanged, getConfigureSource, getConfigureText, getContainedModel
-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
-
-
-
-
Constructor Detail
-
DeltaConstraintSolver
public DeltaConstraintSolver(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Constructs a DeltaConstraintSolver with the given name contained by the specified entity.- Parameters:
container
- The container.name
- The name of this DeltaConstraintSolver- Throws:
IllegalActionException
- If the superclass throws it.NameDuplicationException
- If the superclass throws it.
-
-
Method Detail
-
resolveConflicts
public void resolveConflicts() throws KernelException
Resolve the concept values for the toplevel entity that contains this solver, given the model analyzer that invokes this. Then, if some concepts resolved to unacceptable values, calculate the set of inequality terms that cause the unacceptable values. Note: This has different behavior from resolveConcepts() in the superclass. Call the superclass resolveConcepts() to calculate concepts for all applicable elements in the model.- Throws:
KernelException
- If the _resolveProperties method throws it.
-
_resolvePropertiesHasErrors
protected boolean _resolvePropertiesHasErrors(NamedObj toplevel, java.util.List<Inequality> constraintList) throws IllegalActionException
Resolve the properties of the given top-level container, subject to the given constraint list, and then check if the resulting solution has errors.- Parameters:
toplevel
- The top-level containerconstraintList
- The constraint list that we are solving- Returns:
- True If the found solution has errors.
- Throws:
IllegalActionException
- If the superclass method getAllPropertyables() throws itOntologyResolutionException
- If the superclass method _resolveProperties() throws it
-
-