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

Clearing the input-link of agent. #111

Closed
harit7 opened this issue Nov 7, 2017 · 5 comments
Closed

Clearing the input-link of agent. #111

harit7 opened this issue Nov 7, 2017 · 5 comments

Comments

@harit7
Copy link

harit7 commented Nov 7, 2017

There are ways to clear wme's from output-link. But I am not able to find a way to clear the input-link.
There is an update() method. But it requires the knowledge of input structure in jsoar. Is there a better and cleaner way to do this.

@marinier
Copy link
Contributor

marinier commented Nov 7, 2017 via email

@harit7
Copy link
Author

harit7 commented Nov 8, 2017

Thanks for the reply. I am building the input using InputBuilder. I can get the wmes by agent.getInputOutput().getInputLink().getWmes(), but these are Wme objects, they don't have a remove method and Converting them to InputWme gives ClassCastException.
How can I get InputWme Objects ?

@marinier
Copy link
Contributor

marinier commented Nov 8, 2017 via email

@harit7
Copy link
Author

harit7 commented Nov 10, 2017

Thanks for the help. I am able to remove wme elements which are not repeated, for example If we have the following on the input link then I can remove ^city using the remove method. But Somehow ^person are not getting removed? What am I missing?
I2 ^person abc ^person def ^person jkl ^city somecity

Also could you please explain how and when the inputWme gets removed exactly. Since This is happening in the java code(jsoar), hence one can do it at any time, in the worst case the soar agent might be reading the input at that time.

@marinier
Copy link
Contributor

marinier commented Nov 10, 2017 via email

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