Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DALSim
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thibaut DEMARE
DALSim
Commits
0629911a
Commit
0629911a
authored
6 years ago
by
ThibautDemare
Browse files
Options
Downloads
Patches
Plain Diff
Rename the LSP species + add a piece of code to delete some Warehouses
parent
173f43e7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
models/Main.gaml
+18
-4
18 additions, 4 deletions
models/Main.gaml
with
18 additions
and
4 deletions
models/Main.gaml
+
18
−
4
View file @
0629911a
...
@@ -94,7 +94,7 @@ global {
...
@@ -94,7 +94,7 @@ global {
// River
// River
create RiverLine from: river_shapefile with: [speed::read("speed") as float, length::read("length") as float, is_new::read("is_new") as int];
create RiverLine from: river_shapefile with: [speed::read("speed") as float, length::read("length") as float, is_new::read("is_new") as int];
river_network <- as_edge_graph(RiverLine);
river_network <- as_edge_graph(RiverLine);
// Region observers
// Region observers
create RegionObserver from: regions_shapefile with: [name::read("nom") as string];
create RegionObserver from: regions_shapefile with: [name::read("nom") as string];
create RegionObserver from: antwerp_shapefile with: [name::read("Name") as string];
create RegionObserver from: antwerp_shapefile with: [name::read("Name") as string];
...
@@ -141,6 +141,20 @@ global {
...
@@ -141,6 +141,20 @@ global {
// Warehouses
// Warehouses
create Warehouse from: warehouse_shapefile returns: lw with: [totalSurface::read("surface") as float];
create Warehouse from: warehouse_shapefile returns: lw with: [totalSurface::read("surface") as float];
/*
* The following code can be commented or not, depending if the user want to execute the simulation with every Warehouse
* It is mainly used for tests to avoid CPU overload.
*/
int i <- 100;
list<Warehouse> llsp <- shuffle(Warehouse);
loop while: i < length(llsp) {
Warehouse s <- llsp[i];
remove index: i from: llsp;
ask s {
do die;
}
}
/**/
// Logistic Service providers
// Logistic Service providers
create LogisticsServiceProvider from: logistic_provider_shapefile;
create LogisticsServiceProvider from: logistic_provider_shapefile;
...
@@ -150,9 +164,9 @@ global {
...
@@ -150,9 +164,9 @@ global {
* It is mainly used for tests to avoid CPU overload.
* It is mainly used for tests to avoid CPU overload.
*/
*/
/*int i <- 100;
/*int i <- 100;
list<LogisticProvider> llsp <- shuffle(LogisticProvider);
list<Logistic
sService
Provider> llsp <- shuffle(Logistic
sService
Provider);
loop while: i < length(llsp) {
loop while: i < length(llsp) {
LogisticProvider s <- llsp[i];
Logistic
sService
Provider s <- llsp[i];
remove index: i from: llsp;
remove index: i from: llsp;
ask s {
ask s {
do die;
do die;
...
@@ -231,4 +245,4 @@ global {
...
@@ -231,4 +245,4 @@ global {
// AntAttractiveness <- 3.0;
// AntAttractiveness <- 3.0;
// do update_proba_to_choose_provider;
// do update_proba_to_choose_provider;
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
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