Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DALSim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Thibaut DEMARE
DALSim
Commits
96b63356
Commit
96b63356
authored
Oct 29, 2019
by
ThibautDemare
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove feature to bakcup simulations since it is not working due to bug of gama
parent
fe75f30e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
57 deletions
+1
-57
models/Experiments.gaml
models/Experiments.gaml
+1
-57
No files found.
models/Experiments.gaml
View file @
96b63356
...
...
@@ -17,20 +17,9 @@ global {
rgb
divergingCol7
<-
rgb
(
"#FFC107"
);//
yellow
//
rgb
(
160
,
55
,
100
);
//
purple
rgb
divergingCol8
<-
rgb
(
"#004D40"
);//
green
string
pathPreviousSim
<-
"/saveSimu.gsim"
;
bool
saveSimulation
<-
false
;
//
Use
by
some
experiments
.
It
indicates
if
we
should
save
the
state
of
the
simulation
at
the
end
.
int
savedSteps
<-
-
1
;//
Use
by
some
experiments
,
if
saveSimulation
=
true
.
It
indicates
when
we
should
save
the
state
of
the
simulation
.
bool
saveAgents
<-
false
;
//
Use
by
some
experiments
.
It
indicates
if
we
should
save
the
state
of
the
agents
.
int
savedAgents
<-
-
1
;//
Use
by
some
experiments
,
if
saveSimulation
=
true
.
It
indicates
when
we
should
save
the
state
of
the
agents
.
reflex
storeSimulation
when
:
saveSimulation
{
if
(
savedSteps
>
0
and
cycle
mod
savedSteps
=
0
){
write
"================ START SAVE SIMULATION - "
+
cycle
;
write
"Save of simulation : "
+
save_simulation
(
"/Backup/saveSimu_"
+
cycle
+
".gsim"
);
write
"================ END SAVE SIMULATION - "
+
cycle
;
}
}
reflex
storeAgent
when
:
saveAgents
{
if
(
savedAgents
>
0
and
cycle
mod
savedAgents
=
0
){
write
"================ START SAVE - "
+
cycle
;
...
...
@@ -41,67 +30,22 @@ global {
write
"================ END SAVE AGENTS - "
+
cycle
;
}
}
action
backupSim
{
if
(
cycle
mod
500
=
0
){
write
"================ START SAVE SIMULATION - "
+
cycle
;
write
"Save of simulation : "
+
save_simulation
(
"/Backup/backup_simu_"
+
cycle
+
".gsim"
);
write
"================ END SAVE SIMULATION - "
+
cycle
;
}
}
}
experiment
'Docker'
type
:
gui
{
parameter
"saver"
var
:
saveObservations
<-
true
;
parameter
"pathBD"
var
:
pathBD
<-
"/bd/Used/"
;
parameter
"CSVFolderPath"
var
:
CSVFolderPath
<-
"/CSV/"
;
parameter
"saveSimulation"
var
:
saveSimulation
<-
false
;
parameter
"savedSteps"
var
:
savedSteps
<-
-
1
;
parameter
"saveAgents"
var
:
saveAgents
<-
false
;
parameter
"savedAgents"
var
:
savedAgents
<-
-
1
;
reflex
reflexBackup
{
ask
world
{
do
backupSim
;
}
}
}
experiment
'Docker from previous simulation'
type
:
gui
{
parameter
"saver"
var
:
saveObservations
<-
true
;
parameter
"pathBD"
var
:
pathBD
<-
"/bd/Used/"
;
parameter
"CSVFolderPath"
var
:
CSVFolderPath
<-
"/CSV/"
;
parameter
"saveSimulation"
var
:
saveSimulation
<-
false
;
parameter
"savedSteps"
var
:
savedSteps
<-
[];
parameter
"saveAgents"
var
:
saveAgents
<-
false
;
parameter
"savedAgents"
var
:
savedAgents
<-
[];
parameter
"pathPreviousSim"
var
:
pathPreviousSim
<-
"/saveSimu.gsim"
;
action
_init_
{
create
simulation
from
:
saved_simulation_file
(
pathPreviousSim
);
}
reflex
reflexBackup
{
ask
world
{
do
backupSim
;
}
}
}
experiment
'Docker with traffic screenshots'
type
:
gui
{
parameter
"saver"
var
:
saveObservations
<-
true
;
parameter
"pathBD"
var
:
pathBD
<-
"/bd/Used/"
;
parameter
"CSVFolderPath"
var
:
CSVFolderPath
<-
"/CSV/"
;
parameter
"saveSimulation"
var
:
saveSimulation
<-
false
;
parameter
"savedSteps"
var
:
savedSteps
<-
[];
parameter
"saveAgents"
var
:
saveAgents
<-
false
;
parameter
"savedAgents"
var
:
savedAgents
<-
[];
reflex
reflexBackup
{
ask
world
{
do
backupSim
;
}
}
parameter
"savedAgents"
var
:
savedAgents
<-
-
1
;
output
{
//
The
size
of
these
two
displays
is
due
to
the
size
of
the
calc
I
apply
on
the
snapshots
when
I
generate
a
video
...
...
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