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

Problem solving ode #62

Open
Alelafar opened this issue Jan 25, 2024 · 3 comments
Open

Problem solving ode #62

Alelafar opened this issue Jan 25, 2024 · 3 comments

Comments

@Alelafar
Copy link

I tried to use VAL in a very simple case of a durative action with continuous change.

We have a robot and one action with fixed duration. We have also a numeric function, 'battery_level', that decrease during the action continuously according the ode

     d(battery_level)/dt = - 0.01* battery_level 

whose solution is a simple exponential. Here the code:

(:durative-action move
  :parameters ( ?l_from - location ?l_to - location)
  :duration (= ?duration 5)
  :condition (and 
               (at start (connected ?l_from ?l_to))
               (at start (robot_at ?l_from))
               (over all (<= 0 battery_level))
             )
  :effect (and
              (at start (not (robot_at ?l_from)))
              (at end (robot_at ?l_to))
              (decrease (battery_level) (* #t (* 0.01 battery_level) ))
          )
 )

As you see I put as condition the invariant

(over all (>=  battery_level  0) ) 

and the validation is fine.
Unfortunately, if I just change the previous condition with the equivalent

(over all (<=  0  battery_level)) 

VAL fails. Here the error message:

Plan failed because of unsatisfied precondition in:
Invariant for (move l0 l1)

Plan failed to execute

Plan Repair Advice:

Invariant for (move l0 l1) has its condition unsatisfied between time 0 to 5, the condition is satisfied on [ 0 , 5 ]. 
(Invariant -100e^{ - 0.01t} >= 0 for t in (0,5) is only satisfied on [ 0 , 5 ])

The problem is in the first minus sign in the solution of the ode that should not be there and that fails the invariant condition. Why does it happen?

I leave the domain, problem and plan files.

ODE_problem.txt
ODE_domain.txt
ODE_plan.txt

@DerekLong101
Copy link
Contributor

DerekLong101 commented Jan 25, 2024 via email

@DerekLong101
Copy link
Contributor

DerekLong101 commented Jan 25, 2024 via email

@Alelafar
Copy link
Author

Yes, I tried but nothing changes. There is always the same error message.

Thanks,
Alessandro

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