Commit 306273f8 authored by ThibautDemare's avatar ThibautDemare
Browse files

Put geom function to parent species

parent b8c7affe
......@@ -3,9 +3,9 @@ model Terminals
import "Building.gaml"
species Terminal parent:Building{
string col <- "grey";
aspect geom {
if(colorValue = -1){
string col <- "grey";
if(colorValue = -1){
draw shape + 2°px color: rgb(col) border: rgb(col);
}
else {
......@@ -18,16 +18,7 @@ species MaritimeTerminal parent:Terminal{
float handling_time_to_maritime;
float handling_time_from_maritime;
string col <- "red";
aspect geom {
if(colorValue = -1){
string col <- "grey";
draw shape + 2°px color: rgb(col) border: rgb(col);
}
else {
draw shape + 2°px color: rgb(255, colorValue, 0) border:rgb(255, colorValue, 0);
}
}
reflex manageMaritimeComingCommodities {
int i <- 0;
loop while:i<length(comingCommodities) {
......@@ -63,16 +54,7 @@ species RiverTerminal parent:Terminal{
}
}
}
aspect geom {
if(colorValue = -1){
string col <- "grey";
draw shape + 2°px color: rgb(col) border: rgb(col);
}
else {
draw shape + 2°px color: rgb(255, colorValue, 0) border:rgb(255, colorValue, 0);
}
}
}
species MaritimeRiverTerminal parent:Terminal {
......@@ -111,18 +93,4 @@ species MaritimeRiverTerminal parent:Terminal {
}
}
}
reflex updateHandlingTimeToRoad when: cycle = 100 {
handling_time_to_road <- 100000;
}
aspect geom {
if(colorValue = -1){
string col <- "grey";
draw shape + 2°px color: rgb(col) border: rgb(col);
}
else {
draw shape + 2°px color: rgb(255, colorValue, 0) border:rgb(255, colorValue, 0);
}
}
}
\ No newline at end of file
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