Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ahmad Reza Cheraghi
swarm-sim
Commits
0f86f1a8
Commit
0f86f1a8
authored
Mar 18, 2019
by
Ahmad Reza Cheraghi
Browse files
Update run.py for border walk
parent
fae35304
Changes
1
Hide whitespace changes
Inline
Side-by-side
run.py
View file @
0f86f1a8
"""This is the main module of the
Swarm-Sim
"""
"""This is the main module of the
Opportunistic Robotics Network Simulator
"""
import
configparser
...
...
@@ -10,7 +10,6 @@ from datetime import datetime
from
lib
import
sim
def
swarm_sim
(
argv
):
"""In the main function first the config is getting parsed and than
the simulator and the sim object is created. Afterwards the run method of the simulator
...
...
@@ -35,11 +34,13 @@ def swarm_sim(argv):
size_y
=
config
.
getint
(
"Simulator"
,
"size_y"
)
window_size_x
=
config
.
getint
(
"Simulator"
,
"window_size_x"
)
window_size_y
=
config
.
getint
(
"Simulator"
,
"window_size_y"
)
border
=
config
.
getint
(
"Simulator"
,
"border"
)
max_particles
=
config
.
getint
(
"Simulator"
,
"max_particles"
)
mm_limitation
=
config
.
getboolean
(
"Matter"
,
"mm_limitation"
)
mm_particle
=
config
.
getint
(
"Matter"
,
"particle_mm_size"
)
mm_tile
=
config
.
getint
(
"Matter"
,
"tile_mm_size"
)
mm_location
=
config
.
getint
(
"Matter"
,
"location_mm_size"
)
mm_limitation
=
config
.
getboolean
(
"matter"
,
"mm_limitation"
)
mm_particle
=
config
.
getint
(
"matter"
,
"particle_mm_size"
)
mm_tile
=
config
.
getint
(
"matter"
,
"tile_mm_size"
)
mm_location
=
config
.
getint
(
"matter"
,
"location_mm_size"
)
tile_color_map
=
config
.
getboolean
(
"matter"
,
"tile_color_map"
)
multiple_sim
=
0
...
...
@@ -91,7 +92,7 @@ def swarm_sim(argv):
max_particles
=
max_particles
,
mm_limitation
=
mm_limitation
,
particle_mm_size
=
mm_particle
,
tile_mm_size
=
mm_tile
,
location_mm_size
=
mm_location
,
dir
=
directory
,
random_order
=
random_order
,
visualization
=
visualization
)
visualization
=
visualization
,
border
=
border
,
window_size_x
=
window_size_x
,
window_size_y
=
window_size_y
,
)
simulator
.
run
()
logging
.
info
(
'Finished'
)
...
...
Write
Preview
Supports
Markdown
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