Class PreInstantiatedProblem
- All Implemented Interfaces:
AtomicFormulaSimplifier<Integer>
,Problem
,Serializable
- Direct Known Subclasses:
InstantiatedProblem
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class fr.uga.pddl4j.problem.AbstractProblem
AbstractProblem.Data
-
Constructor Summary
ConstructorDescriptionPreInstantiatedProblem(DefaultParsedProblem problem)
Creates a new problem from a specific domain and problem. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
This method creates the predicate tables used to simplify atomic expression.protected void
This method proceeds over the actions of the domain and checks for all atom which kind of inertia it is.protected void
Extract the numeric inertia from the list of actions.Returns the list of inertia contained in the problem.Returns the list of numeric inertia contained in the problem.protected void
Infer type from unary inertia contained in the initial state.protected void
printPredicatesTables(List<List<IntMatrix>> tables)
Print the predicates tables.boolean
simplify(Expression<Integer> exp)
This method simplifies an atomic specified expression.protected void
AtomicFormulaSimplifier the actions with the inferred types.protected String
toString(AbstractProblem.Data data)
Returns a string representation of the internal data structure used during instantiation process.Methods inherited from class fr.uga.pddl4j.problem.AbstractProblem
finalization, getCompoundTaskSymbols, getConstantSymbols, getDomains, getFunctions, getFunctionSignatures, getIntActions, getIntGoal, getIntInitFunctionCost, getIntInitFunctions, getIntInitialState, getIntInitialTaskNetwork, getIntMethods, getIntTimedFluents, getParsedProblem, getPredicateSignatures, getPredicateSymbols, getPrimitiveTaskSymbols, getRequirements, getTaskSignatures, getTaskSymbols, getTypes, initActions, initCompoundTaskSymbols, initConstants, initEitherTypes, initExpression, initFunctions, initGoal, initialization, initInitialState, initInitialTaskNetwork, initMethods, initPredicates, initPrimitiveTaskSymbols, initRequirements, initTaskNetwork, initTasks, initTypes, instantiate, instantiation, postinstantiation, preinstantiation, setIntInitialTaskNetwork, toShortString, toString, toString, toString, toString, toString, toString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface fr.uga.pddl4j.problem.Problem
getAcceptedRequirements, getActions, getDurativeActions, getDurativeMethods, getFluents, getGoal, getInitialState, getInitialTaskNetwork, getMethods, getTaskResolvers, getTasks, isSolvable, isTotallyOrdered, toShortString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString
-
Constructor Details
-
PreInstantiatedProblem
Creates a new problem from a specific domain and problem.- Parameters:
problem
- the problem.
-
-
Method Details
-
getInertia
Returns the list of inertia contained in the problem.- Returns:
- the list of inertia contained in the problem.
-
getNumericInertia
Returns the list of numeric inertia contained in the problem.- Returns:
- the list of numeric inertia contained in the problem.
-
extractInertia
protected void extractInertia()This method proceeds over the actions of the domain and checks for all atom which kind of inertia it is. For each atom it checks if it satisfies one of the following definitions:Definition: A relation is a positive inertia iff it does not occur positively in an unconditional effect or the consequent of a conditional effect of an action.
Definition: A relation is a negative inertia iff it does not occur negatively in an unconditional effect or the consequent of a conditional effect of an action.
Relations, which are positive as well as negative inertia, are simply called inertia. Relations, which are neither positive nor negative inertia, are called fluents. The detection of inertia and fluents is easy because in ADL, effects are restricted to conjunctions of literals. Furthermore, this information can be obtained with a single pass over the domain description, which takes almost no time at all.
Note: before calling this method the domain must be encode into integer and the negation must be move inward the expression.
-
extractNumericInertia
protected void extractNumericInertia()Extract the numeric inertia from the list of actions. A numeric fluent is a inertia iff it never appears in the effect of an action. -
inferTypesFromInertia
protected void inferTypesFromInertia()Infer type from unary inertia contained in the initial state. -
simplifyActionsWithInferredTypes
protected void simplifyActionsWithInferredTypes()AtomicFormulaSimplifier the actions with the inferred types. -
createPredicatesTables
protected void createPredicatesTables()This method creates the predicate tables used to simplify atomic expression. -
printPredicatesTables
Print the predicates tables.- Parameters:
tables
- predicates tables.
-
simplify
This method simplifies an atomic specified expression. Two cased must be considered:- 1. If the expression is a positive inertia and the number of unifying ground instances of the specified expression that are contained in the initial state is equal to 0 then the expression is simplified to FALSE.
- 2. If the expression is a negative inertia and then the number of all possible type-consistent ground instances of the specified expression then the expression is simplified to TRUE.
- Parameters:
exp
- the atomic expression to simplify.- Returns:
- if the atomic expression was simply or not.
-
toString
Returns a string representation of the internal data structure used during instantiation process.- Overrides:
toString
in classAbstractProblem
- Parameters:
data
- the internal data structure.- Returns:
- a string representation of the internal data structure used during instantiation process.
-