kris701 / MARMA

MIT License
1 stars 0 forks source link

Invalid replacement on satellite #164

Closed jmdha closed 11 months ago

jmdha commented 12 months ago

I don't know what's causing the bug, but VAL says that using this specific macro replacement causes an invalid plan.

Macro:

(:action $macro_8
:parameters (?O0 - instrument ?0 - satellite ?O1 - direction ?1 - direction ?2 - direction ?3 - mode)
:precondition 
(and
(on_board ?O0 ?0)
(power_avail ?0)
(pointing ?0 ?1)
(not (pointing ?0 ?O1))
(calibration_target ?O0 ?O1)
(not (pointing ?0 ?2))
(supports ?O0 ?3)
)
:effect 
(and
(not (pointing ?0 ?1))
(pointing ?0 ?2)
(have_image ?2 ?3)
)
)

Replacement:

(switch_on ?O0 ?0)
(turn_to ?0 ?O1 ?1)
(calibrate ?0 ?O0 ?O1)
(turn_to ?0 ?2 ?O1)
(take_image ?0 ?2 ?O0 ?3)
(switch_off ?O0 ?0)
(switch_on ?O0 ?0)
(switch_off ?O0 ?0)
; cost = 8 (unit cost)

Meta plan:

($meta_8 sat3 dir3 dir1 mod1)
($meta_8 sat1 dir1 dir2 mod1)
; cost = 2 (unit cost)

satellite.zip

kris701 commented 12 months ago

Do you have to problem and domain this doesnt work with? Because im quite confused, the replacement looks correct in my eyes, and the macro seems to be correct too

jmdha commented 12 months ago

Yea, it might be correct, as it could the replacement program that messes up here.

It is just satellite problem 0.