Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SPADE-BDI
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
serfrape
SPADE-BDI
Commits
91f19ae7
Commit
91f19ae7
authored
Apr 11, 2019
by
serfrape
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the .goto action
parent
2c239fc4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
13 deletions
+1
-13
bdi.py
spade_bdi/bdi.py
+1
-13
No files found.
spade_bdi/bdi.py
View file @
91f19ae7
...
...
@@ -22,6 +22,7 @@ class BDIAgent(Agent):
async
def
setup
(
self
):
template
=
Template
(
metadata
=
{
"performative"
:
"BDI"
})
self
.
add_behaviour
(
self
.
BDIBehaviour
(),
template
)
super
()
.
setup
()
def
add_behaviour
(
self
,
behaviour
,
template
=
None
):
if
type
(
behaviour
)
==
self
.
BDIBehaviour
:
...
...
@@ -65,19 +66,6 @@ class BDIAgent(Agent):
msg
=
Message
(
to
=
receiver
,
body
=
body
,
metadata
=
mdata
)
self
.
agent
.
submit
(
self
.
send
(
msg
))
yield
#
@self.agent.bdi_actions.add
(
".goto"
,
3
)
def
_goto
(
agent
,
term
,
intention
):
"""Sets the PyGomas destination. Expects args to be x,y,z"""
args
=
pyson
.
grounded
(
term
.
args
,
intention
.
scope
)
absx
=
abs
(
args
[
0
]
-
self
.
agent
.
movement
.
position
.
x
)
absz
=
abs
(
args
[
2
]
-
self
.
agent
.
movement
.
position
.
z
)
if
(
absx
<
PRECISION_X
)
and
(
absz
<
PRECISION_Z
):
self
.
agent
.
movement
.
position
.
x
=
args
[
0
]
self
.
agent
.
movement
.
position
.
z
=
args
[
2
]
yield
@self.agent.bdi_actions.add
(
".custom_action"
,
1
)
def
_custom_action
(
agent
,
term
,
intention
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment