Skip to content
Snippets Groups Projects
Networks.gaml 1.43 KiB
Newer Older
model Networks

global {
	graph road_network;
	graph maritime_network;
	graph river_network;
}

species Network {
	string col;
	float speed;
	float length;
	int colorValue <- -1; // This value is filled by the custom GAMA Plugin : MovingOnNetwork. It allows to colour the road according to the quantity of goods on the road.
	string colorRVBValue <- "";
	int sizeShape <- 1;
	float current_marks;
	float cumulative_marks;
	float cumulative_nb_agents;

			draw shape + 2°px color: rgb("#4575b4") border: rgb("#4575b4");
		}
		else{
			if(colorRVBValue = ""){
				if(sizeShape = 0){
					draw shape color: rgb(col) border: rgb(col);
				}
				else {
					draw shape color: rgb(col) border: rgb(col);
				}
			}
			else {
				if(sizeShape = 0){
					draw shape color: rgb(colorRVBValue) border:rgb(colorRVBValue);
				}
				else {
					draw shape + sizeShape°px color: rgb(colorRVBValue) border:rgb(colorRVBValue);
				}
			}
		}
	}

	aspect lightGeom {
		if(blocked){
			draw shape color: rgb("#4575b4") border: rgb("#4575b4");
			if(colorRVBValue = ""){
				draw shape color: rgb(col) border: rgb(col);
				draw shape color: rgb(colorRVBValue) border:rgb(colorRVBValue);
species Road parent:Network {
	string col <- "grey";
}
species MaritimeLine parent:Network {
	string col <- "blue";
species RiverLine parent:Network {
	string col <- "green";
	int is_new;