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

tulip.transys.machines.interactive_run() is not working as intended #250

Open
khassibi opened this issue Jul 21, 2023 · 2 comments
Open
Assignees

Comments

@khassibi
Copy link

khassibi commented Jul 21, 2023

Hello,

I have been trying to use the interactive_run function found in tulip-control/tulip/transys/machines.py.
I have tried using the code found in gr1.py of the eeci2020 branch. The code is able to run machines.random_run(strategy, from_state='Sinit', N=10) successfully. However, when I change this line to machines.interactive_run(strategy, from_state='Sinit'), I get stuck in a loop. First, I see the following text printed:

`Found more than 1 outgoing transitions:

    0 : Sinit ---> 0
     inputs:{'park': False}  outputs:{'X0': True, 'X0reach': True, 'X5': False, 'X4': False, 'X3': False, 'X1': False, 'X2': False}

    1 : Sinit ---> 1
     inputs:{'park': True}   outputs:{'X0': True, 'X0reach': True, 'X5': False, 'X4': False, 'X3': False, 'X1': False, 'X2': False}

Select from the available transitions above
by giving its integer,
Press "Enter" to stop the simulation:
int = `

I am asked to pick a transition for the environment to take, but any option (0 or 1) I choose once again prints the text above. Moreover, if I try pressing "Enter", the simulation does not stop, and the text above is printed once more.

I have also tried running this code using the line strategy.run('Sinit') (function found here). I get the same results.

Please let me know if I am doing anything wrong or if there is an issue with this code. Thank you!

@slivingston
Copy link
Member

@khassibi Did you find a solution, or is this question open?

@khassibi
Copy link
Author

I did not find a solution, but I found other functions that allow me to select an environment action and see the system's response.

@khassibi khassibi reopened this Aug 30, 2023
@slivingston slivingston self-assigned this Oct 18, 2023
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