Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing object type 'object' in domains #7

Open
Roedhip opened this issue Aug 15, 2022 · 2 comments
Open

Printing object type 'object' in domains #7

Roedhip opened this issue Aug 15, 2022 · 2 comments

Comments

@Roedhip
Copy link

Roedhip commented Aug 15, 2022

The atomic_formula class' print_pddl() function specifically doesn't print the object's type if the type is just 'object', but when a predicate or function is being defined in the domain to apply to any object I am pretty sure I need to be print '?obj - object' instead of just '?obj'.

@m312z
Copy link
Member

m312z commented Aug 16, 2022

You don't need to include "- object" for an untyped parameter.

Types are preceded in the typed list by the hyphen "-" and each entity in the list is declared to be of the first type that follows it. If no type follows it in the list, then it is "object". You can mix typed and untyped (object) entities in the list as long as all untyped entities come after the types ones. For example, these should all be OK:

(a - type1 b - type1) ;; both a and b are type 1
(a b - type1) ;; both a and b are type 1
(a b c) ;; all a, b, and c are "object"
(a b - type1 c) ;; both a and b are type 1 and c is "object"
(a b - type1 c - object) ;; both a and b are type 1 and c is "object"

@Roedhip Roedhip closed this as completed Aug 18, 2022
@Roedhip Roedhip reopened this Aug 18, 2022
@Roedhip
Copy link
Author

Roedhip commented Aug 18, 2022

I am receiving errors from optic-cplex caused specifically by not having ' - object' printed in a function definition. Making the change back to having ' - object' allows optic-cplex to run with this domain.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants