Commit 0875e792 authored by ThibautDemare's avatar ThibautDemare
Browse files

Add a RegionObserver for Antwerp

parent eff8295b
......@@ -314,6 +314,27 @@ experiment 'Every output' type: gui {
}
}/**/
display 'Share of mode of transport (number of vehicles) - Region Antwerp' refresh:every(1) {
chart "Share of mode of transport (number of vehicles) - Region Antwerp" type: series {
RegionObserver sr <- nil;
ask RegionObserver {
if(self.name = "Antwerpen"){
sr <- self;
}
}
if(sr!=nil){
data "Share of road" value: sr.shareRoadVehicleRO color: rgb('green') ;
data "Share of river" value: sr.shareRiverVehicleRO color: rgb('red') ;
data "Share of maritime" value: sr.shareMaritimeVehicleRO color: rgb('blue') ;
}
else { // At step 0, RegionObserver are not initialized, so, sr = nil
data "Share of road" value: 0 color: rgb('green') ;
data "Share of river" value: 0 color: rgb('red') ;
data "Share of maritime" value: 0 color: rgb('blue') ;
}
}
}/**/
display 'Share of mode of transport (quantities of goods)' refresh:every(1) {
chart "Share of mode of transport (quantities of goods)" type: series {
data "Share of road" value: shareRoadQuantities color: rgb('green') ;
......@@ -427,6 +448,27 @@ experiment 'Every output' type: gui {
}
}/**/
display 'Share of mode of transport (quantities of goods) - Region Antwerp' refresh:every(1) {
chart "Share of mode of transport - Region Antwerp" type: series {
RegionObserver sr <- nil;
ask RegionObserver {
if(self.name = "Antwerpen"){
sr <- self;
}
}
if(sr!=nil){
data "Share of road" value: sr.shareRoadQuantitiesRO color: rgb('green') ;
data "Share of river" value: sr.shareRiverQuantitiesRO color: rgb('red') ;
data "Share of maritime" value: sr.shareMaritimeQuantitiesRO color: rgb('blue') ;
}
else { // At step 0, RegionObserver are not initialized, so, sr = nil
data "Share of road" value: 0 color: rgb('green') ;
data "Share of river" value: 0 color: rgb('red') ;
data "Share of maritime" value: 0 color: rgb('blue') ;
}
}
}/**/
display 'Share of the different strategies adopted' refresh:every(1) {
chart "Share of the different strategies adopted" type: series {
data "Strategy 1 (closest/largest warehouse according to a probability)" value: nbLPStrat1 color: rgb('green') ;
......
......@@ -65,6 +65,10 @@ global {
// Data comes from :
// Contours des régions françaises sur OpenStreetMap (consulted the 30/11/2018) -> https://www.data.gouv.fr/fr/datasets/contours-des-regions-francaises-sur-openstreetmap/
file regions_shapefile <- file(pathBD+"Regions/regions.shp");
// And Antwerp (actually, it is the limits of Antwerpen + Beveren (had to merge them because one of the Antwerp terminal is not inside the boundaries of the city))
// Data come from :
// Atlas de Belgique - divisions communes (consulted the 06/21/2018) -> http://www.atlas-belgique.be/cms2/index.php?page=cartodata_fr
file antwerp_shapefile <- file(pathBD+"Regions/antwerpen_limits.shp");
//Define the border of the environnement according to the road network
geometry shape <- envelope(roads_shapefile);
......@@ -93,6 +97,7 @@ global {
// Region observers
create RegionObserver from: regions_shapefile with: [name::read("nom") as string];
create RegionObserver from: antwerp_shapefile with: [name::read("Name") as string];
// Providers
create Provider from: provider_shapefile with: [port::read("Port") as string];
......
......@@ -664,6 +664,7 @@ global {
do saveShareTransportModeRegion(filePath, params, "Centre");
do saveShareTransportModeRegion(filePath, params, "Île-de-France");
do saveShareTransportModeRegion(filePath, params, "Picardie");
do saveShareTransportModeRegion(filePath, params, "Antwerpen");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment