Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DataScienceSWP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
phwitte
DataScienceSWP
Commits
1086229e
Commit
1086229e
authored
8 years ago
by
markr
Browse files
Options
Downloads
Patches
Plain Diff
Update simulate.py
parent
890428aa
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
simulate.py
+3
-3
3 additions, 3 deletions
simulate.py
with
3 additions
and
3 deletions
simulate.py
+
3
−
3
View file @
1086229e
...
@@ -285,8 +285,8 @@ def update_couzin(agent, agents, maxV, winWidth, winHeight, window, maxTurn, rad
...
@@ -285,8 +285,8 @@ def update_couzin(agent, agents, maxV, winWidth, winHeight, window, maxTurn, rad
agent
[
3
].
draw
(
window
)
agent
[
3
].
draw
(
window
)
return
agents
return
agents
def
update_vicsek
(
agent
,
agents
,
maxV
,
winWidth
,
winHeight
,
window
,
maxTurn
,
radTurn
,
negRadTurn
,
zoo_r
,
blind
,
speed
):
def
update_vicsek
(
agent
,
agents
,
maxV
,
winWidth
,
winHeight
,
window
,
zoo_r
,
speed
):
return
update_couzin
(
agent
,
agents
,
maxV
,
winWidth
,
winHeight
,
window
,
maxTurn
,
radTurn
,
negRadTurn
,
0
,
zoo_r
,
0
,
blind
,
speed
,
True
)
return
update_couzin
(
agent
,
agents
,
maxV
,
winWidth
,
winHeight
,
window
,
180
,
math
.
radians
(
180
),
-
math
.
radians
(
180
)
,
0
,
zoo_r
,
0
,
0
,
speed
,
True
)
# -----------------plot stuff
# -----------------plot stuff
...
@@ -365,7 +365,7 @@ def main():
...
@@ -365,7 +365,7 @@ def main():
numpycount
=
np
.
append
(
numpycount
,
i
)
numpycount
=
np
.
append
(
numpycount
,
i
)
#agents = update_simplest(agent, agents, maxV, winWidth, winHeight, window)
#agents = update_simplest(agent, agents, maxV, winWidth, winHeight, window)
agents
=
update_couzin
(
agent
,
agents
,
maxV
,
winWidth
,
winHeight
,
window
,
maxTurn
,
radTurn
,
negRadTurn
,
zor_r
,
zoo_r
,
zoa_r
,
blind
,
speed
,
False
)
agents
=
update_couzin
(
agent
,
agents
,
maxV
,
winWidth
,
winHeight
,
window
,
maxTurn
,
radTurn
,
negRadTurn
,
zor_r
,
zoo_r
,
zoa_r
,
blind
,
speed
,
False
)
#agents = update_vicsek(agent, agents, maxV, winWidth, winHeight, window,
maxTurn, radTurn, negRadTurn, zoo_r, blind
, speed)
#agents = update_vicsek(agent, agents, maxV, winWidth, winHeight, window,
zoo_r
, speed)
time
.
sleep
(
0.01
)
time
.
sleep
(
0.01
)
plt
.
errorbar
(
numpycount
,
distancedata
,
yerr
=
distancestd
)
plt
.
errorbar
(
numpycount
,
distancedata
,
yerr
=
distancestd
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment