Advertisement
rodolpheg

Untitled

Nov 18th, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 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 shp_bati <- file("../includes/bati.shp");
  7. file shp_rue <- file("../includes/rues_vm.shp");
  8. geometry shape <- envelope(shp_rue);
  9. graph reseau;
  10.  
  11. init {
  12. create bati from: shp_bati;
  13. create rue from: shp_rue ;
  14. reseau <- as_edge_graph(shp_rue);
  15. }
  16. }
  17.  
  18. // Agent "bati"
  19. species bati {
  20. aspect base {
  21. draw shape color: #red ;
  22. }
  23. }
  24.  
  25. // Agent "rue"
  26. species rue {
  27. rgb color <- #black ;
  28. aspect base {
  29. draw shape color: color ;
  30. }
  31. }
  32.  
  33. // Définition de la simulaiton et de ses affichages
  34. experiment trafic type: gui {
  35. output {
  36. display ville_marie type:opengl {
  37. species bati aspect: base ;
  38. species rue aspect: base ;
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement