Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
PHY571 Birds flocking
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quentin LOUIS
PHY571 Birds flocking
Commits
2dced7b5
Commit
2dced7b5
authored
Nov 27, 2018
by
Quentin LOUIS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new code for multiple simulations
parent
4dd88f66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
Amaury/experiments.py
Amaury/experiments.py
+18
-11
No files found.
Amaury/experiments.py
View file @
2dced7b5
...
...
@@ -46,8 +46,12 @@ def launch_two_groups(output_file: str, L: float, n_birds_1: int, n_birds_2: int
def
start_experiment
(
output_dir
:
str
,
L
:
float
,
n_birds
:
int
,
eta
:
float
=
.
5
,
total_time
:
float
=
100
,
nb_experiments
:
int
=
1
,
vel
:
float
=
0.1
)
->
None
:
subdir
=
""
if
nb_experiments
>
1
:
subdir
=
"N_"
+
str
(
n_birds
)
+
"_L_"
+
str
(
L
)
+
"_Eta_"
+
str
(
eta
)
+
"_angle_vel_"
+
"pi"
+
"_T_"
+
str
(
total_time
)
\
+
"_vel_"
+
str
(
vel
)
+
"/"
for
i
in
range
(
nb_experiments
):
name
=
"N_"
+
str
(
n_birds
)
+
"_L_"
+
str
(
L
)
+
"_Eta_"
+
str
(
eta
)
+
"_angle_vel_"
+
"pi"
+
"_T_"
+
str
(
total_time
)
\
name
=
subdir
+
"N_"
+
str
(
n_birds
)
+
"_L_"
+
str
(
L
)
+
"_Eta_"
+
str
(
eta
)
+
"_angle_vel_"
+
"pi"
+
"_T_"
+
str
(
total_time
)
\
+
"_vel_"
+
str
(
vel
)
+
"_nb_exp_"
+
str
(
i
+
1
)
launch_simulation_random
(
"phy571/simulation_data/"
+
output_dir
+
"/"
+
name
+
".json"
,
L
=
L
,
n_birds
=
n_birds
,
eta
=
eta
,
total_time
=
total_time
,
ang_vel
=
2
*
np
.
pi
)
...
...
@@ -72,7 +76,8 @@ def ssh_experiments():
'129.104.253.43'
,
'129.104.253.44'
,
'129.104.253.45'
,
'129.104.253.46'
,
'129.104.253.47'
,
'129.104.253.48'
,
'129.104.253.49'
,
'129.104.253.50'
,
'129.104.253.51'
,
'129.104.253.52'
,
'129.104.253.53'
,
'129.104.253.54'
,
'129.104.253.55'
,
'129.104.253.56'
,
'129.104.253.64'
,
'129.104.253.65'
,
'129.104.253.66'
,
'129.104.253.67'
,
'129.104.253.68'
,
'129.104.253.69'
,
#'129.104.253.65',
'129.104.253.66'
,
'129.104.253.67'
,
'129.104.253.68'
,
'129.104.253.69'
,
'129.104.253.70'
,
'129.104.253.71'
,
'129.104.253.72'
,
'129.104.253.73'
,
'129.104.253.74'
,
'129.104.253.75'
,
'129.104.253.76'
,
'129.104.253.77'
,
'129.104.253.78'
,
'129.104.253.79'
,
'129.104.253.80'
,
'129.104.253.81'
,
'129.104.253.82'
,
'129.104.253.83'
,
'129.104.253.84'
,
...
...
@@ -86,7 +91,9 @@ def ssh_experiments():
'129.104.254.70'
,
'129.104.254.71'
,
'129.104.254.72'
,
'129.104.254.73'
,
'129.104.254.74'
,
'129.104.254.75'
,
'129.104.254.76'
,
'129.104.254.77'
,
'129.104.254.78'
,
'129.104.254.79'
,
'129.104.254.80'
,
'129.104.254.81'
,
'129.104.254.82'
,
'129.104.254.83'
,
'129.104.254.84'
,
'129.104.254.85'
,
'129.104.254.86'
,
'129.104.254.87'
,
'129.104.254.88'
,
'129.104.252.32'
,
#'129.104.254.85',
#'129.104.254.86',
'129.104.254.86'
,
'129.104.254.87'
,
'129.104.254.88'
,
'129.104.252.32'
,
'129.104.252.33'
,
'129.104.252.34'
,
'129.104.252.35'
,
'129.104.252.36'
,
'129.104.252.37'
,
'129.104.252.38'
,
'129.104.252.39'
,
'129.104.252.40'
,
'129.104.252.41'
,
'129.104.252.42'
,
'129.104.252.43'
,
'129.104.252.44'
,
'129.104.252.45'
,
'129.104.252.46'
,
'129.104.252.47'
,
...
...
@@ -97,14 +104,14 @@ def ssh_experiments():
'129.104.252.75'
,
'129.104.252.76'
,
'129.104.252.77'
,
'129.104.252.78'
,
'129.104.252.79'
,
'129.104.252.80'
,
'129.104.252.81'
,
'129.104.252.82'
,
'129.104.252.83'
,
'129.104.252.84'
,
'129.104.252.85'
,
'129.104.252.86'
,
'129.104.252.87'
,
'129.104.252.88'
]
login
,
passw
=
""
,
""
Ns
=
[
400
,
1600
,
3600
,
10000
,
40000
]
Ls
=
[
20
,
40
,
60
,
100
,
200
]
t
=
400
0
Eta
=
[
0.01
,
0.05
,
0.1
,
0.11
,
0.12
,
0.13
,
0.14
,
0.15
,
0.2
,
0.25
,
0.3
,
0.35
,
0.4
,
0.45
,
0.5
,
0.55
,
0.6
,
0.65
,
0.7
,
0.75
,
0.8
]
file
=
"2
7
_11_18"
login
,
passw
=
Ns
=
[
400
]
#
, 1600, 3600, 10000, 40000]
Ls
=
[
20
]
#
, 40, 60, 100, 200]
t
=
1
0
Eta
=
[
0.01
]
#, 0.05, 0.1, 0.11, 0.12, 0.13, 0.132, 0.134, 0.136, 0.138
, 0.14, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8]
file
=
"2
8
_11_18"
vel
=
0.1
nb_exp
=
10
nb_exp
=
2
current_server
=
-
1
for
i
in
range
(
len
(
Ns
)):
...
...
@@ -121,7 +128,7 @@ def ssh_experiments():
f"./phy571-birds-flocking/venv/bin/python3.6 ./phy571-birds-flocking/Amaury/remote.py --file
{
file
}
--n
{
Ns
[
i
]
}
--l
{
Ls
[
i
]
}
--eta
{
Eta
[
k
]
}
"
f"--t
{
t
}
--nb_exp
{
nb_exp
}
--vel
{
vel
}
"
)
#ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command(f"pkill ./phy571-birds-flocking/venv/bin/python3.6 && pkill ./phy571-birds-flocking/venv/bin/python")
#
ssh_stdout, ssh_stderr = ssh_stdout.read(), ssh_stderr.read()
ssh_stdout
,
ssh_stderr
=
ssh_stdout
.
read
(),
ssh_stderr
.
read
()
ssh
.
close
()
log
.
info
(
f"server:
{
current_server_ip
}
, stdin:
{
ssh_stdin
}
, stdout:
{
ssh_stdout
}
, stderr:
{
ssh_stderr
}
"
)
...
...
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