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

Exception UPNoRequestedEngineAvailableException issue #549

Open
ndenicoo opened this issue Dec 14, 2023 · 1 comment
Open

Exception UPNoRequestedEngineAvailableException issue #549

ndenicoo opened this issue Dec 14, 2023 · 1 comment

Comments

@ndenicoo
Copy link

User Story

Im trying the library in Jupyter Notebook. I tried to solve the following simple problem.

from unified_planning.shortcuts import *

x = Fluent("x")

a = InstantaneousAction("a")
a.add_precondition(Not(x))
a.add_effect(x, True)

problem = Problem("basic")
problem.add_fluent(x)
problem.add_action(a)
problem.set_initial_value(x, False)
problem.add_goal(x)

with OneshotPlanner(name='pyperplan') as planner:
    result = planner.solve(problem)
    if result.status == up.engines.PlanGenerationResultStatus.SOLVED_SATISFICING:
        print("Pyperplan returned: %s" % result.plan)
    else:
        print("No plan found.")

However, I get the following error

File ~\anaconda3\Lib\site-packages\unified_planning\engines\factory.py:504, in Factory._get_engine_class(self, operation_mode, name, problem_kind, optimality_guarantee, compilation_kind, plan_kind, anytime_guarantee)
    502         return self._engines[name]
    503     else:
--> 504         raise up.exceptions.UPNoRequestedEngineAvailableException
    505 problem_features = list(problem_kind.features)
    506 planners_features = []

UPNoRequestedEngineAvailableException: 

Previously I installed

pip install unified_planning[pyperplan]

and the following text appeared:
Requirement already satisfied: unified_planning[pyperplan] in c:\users\nicor\anaconda3\lib\site-packages (1.0.0) Requirement already satisfied: pyparsing in c:\users\nicor\anaconda3\lib\site-packages (from unified_planning[pyperplan]) (3.0.9) Requirement already satisfied: networkx in c:\users\nicor\anaconda3\lib\site-packages (from unified_planning[pyperplan]) (3.1) Requirement already satisfied: up-pyperplan==1.0.0 in c:\users\nicor\anaconda3\lib\site-packages (from unified_planning[pyperplan]) (1.0.0) Requirement already satisfied: pyperplan==2.1 in c:\users\nicor\anaconda3\lib\site-packages (from up-pyperplan==1.0.0->unified_planning[pyperplan]) (2.1) Requirement already satisfied: wheel in c:\users\nicor\anaconda3\lib\site-packages (from pyperplan==2.1->up-pyperplan==1.0.0->unified_planning[pyperplan]) (0.38.4)

@alvalentini
Copy link
Member

Hi @ndenicoo! Are you sure you installed unified_planning[pyperplan] in the same python environment where you are running the notebook?

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

No branches or pull requests

2 participants