|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.constraintsolver.ProblemParser
ProblemParser object to model the attributes and behavior of a parser which inputs the constraint problem representation and sets up the parent ConstraintProblem object.
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
UnitTest#testConstraintProblem
Field Summary | |
protected ArgumentTypeConstrainer |
argumentTypeConstrainer
Reference to the constraint problem's ArgumentTypeConstrainer object. |
protected ConstraintProblem |
constraintProblem
Reference to the parent ConstraintProblem object. |
protected java.util.ArrayList |
constraintRules
Reference to the parent list of constraint rules. |
protected java.util.ArrayList |
domainPopulationRules
Reference to the parent list of domain populating constraint rules. |
protected java.util.ArrayList |
simplifiedRules
Reference to the parent list of simplified constraint rules. |
protected int |
verbosity
Sets verbosity of the constraint solver output. |
Constructor Summary | |
ProblemParser(ConstraintProblem constraintProblem)
Constructs a new ProblemParser object for the parent ConstraintProblem. |
Method Summary | |
protected void |
extractRulesAndDomains()
Simplifies the input problem into its constituent Rule objects, then divides the input rules into those which populate the variable domains, and those which subsequently constrain the search for one or more solutions. |
void |
gatherVariables()
Gathers the unique variables used in this constraint problem. |
protected void |
initializeDomains()
Initializes the value domains for each variable. |
void |
setVerbosity(int verbosity)
Sets verbosity of the constraint solver output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ConstraintProblem constraintProblem
protected java.util.ArrayList simplifiedRules
protected java.util.ArrayList domainPopulationRules
protected java.util.ArrayList constraintRules
protected ArgumentTypeConstrainer argumentTypeConstrainer
protected int verbosity
Constructor Detail |
public ProblemParser(ConstraintProblem constraintProblem)
constraintProblem
- the parent constraint problemMethod Detail |
public void setVerbosity(int verbosity)
verbosity
- 0 --> quiet ... 9 -> maximum diagnostic inputprotected void extractRulesAndDomains() throws java.io.IOException, CycApiException
protected void initializeDomains() throws java.io.IOException, CycApiException
public void gatherVariables()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |