Advertisement
rodolpheg

Untitled

Nov 18th, 2020
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. // Nom du modèle
  2. model trafic
  3.  
  4. // Méthode globale définissant l'environnement.
  5. global {
  6. file shape_file_buildings <- file("../includes/bati.shp");
  7. file shape_file_roads <- file("../includes/rues_vm.shp");
  8. geometry shape <- envelope(shape_file_roads);
  9.  
  10. init {
  11. create bati from: shape_file_buildings;
  12. create rue from: shape_file_roads ;
  13. }
  14. }
  15.  
  16. // Agent "bati"
  17. species bati {
  18. aspect base {
  19. draw shape color: #red ;
  20. }
  21. }
  22.  
  23. // Agent "rue"
  24. species rue {
  25. rgb color <- #black ;
  26. aspect base {
  27. draw shape color: color ;
  28. }
  29. }
  30.  
  31. // Définition de la simulaiton et de ses affichages
  32. experiment trafic type: gui {
  33. output {
  34. display ville_marie type:opengl {
  35. species bati aspect: base ;
  36. species rue aspect: base ;
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement