Jednoliko pravocrtno gibabanje s vise automobila

No preview image

1 collaborator

Default-person Hrvoje Mladinić (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 5.0.2 • Viewed 185 times • Downloaded 53 times • Run 0 times
Download the 'Jednoliko pravocrtno gibabanje s vise automobila' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

Model simulira jednoliko pravocrtno gibanje koje je jedno od osnovnih pojmova u podru_ju fizike.

HOW IT WORKS

Pokretni agenti (turtle, breed automobili) prikazani su kao automobili koji se gibaju od polja oznaenog sa A do polja oznaenog sa B koristei formulu za prijeeni put (dx = v * dt) u jednolikom pravocrtnom gibanju.

HOW TO USE IT

Pomou prekidaa 'viseautomobila?' biramo da li _emo promatrati jednoliko pravocrtno gibanje jednog ili vie automobila. U sluaju jednog automobila, pomou klizaa 'brzina' postavljamo iznos brzine kojom _e se automobil gibati, a u sluaju vie automobila brzina pojedinog automobila je nasumino odabrana i mo_e se promatrati na brzina - vrijeme grafu. Pritiskom na gumb 'setup' prikazat e se automobil/automobili kao i polazna (A) i krajnja (B) toka gibanja. Namjestimo li prekida_ 'putanja?' na On, putanja gibanja automobila je vidljiva, ina_e se ne vidi. Pritiskom na gumb 'go' simulacija se pokree, odnosno automobil/automobili se poinju gibati konstantnom brzinom.

THINGS TO NOTICE

Put kojeg automobil/automobili prelaze nije uvijek isti, ve_ se mijenja nasumi_no svaki put kada stvorimo svijet, odnosno pritisnemo gumb 'setup'. Model ukljuuje grafiki prikaz prijeenog puta pomou kojeg se moe vidjeti kako se prijeeni put u ovisnosti o vremenu (Napomena: prijeeni put je izraen kao broj polja koje automobil prijee, dok je vrijeme izraeno kao broj tick-ova. Svaki put kada se procedura 'go' izvri, broj tick-ova se povea za jedan). Model ukljuuje i grafiki prikaz brzine pomou kojeg se moe vidjeti promjena brzine u ovisnosti o vremenu (odnosno tick-ovima).

THINGS TO TRY

Korisnik moe paliti i gasiti prekida 'viseautomobila?' i na taj nain promatrati jednoliko pravocrtno gibanje jednog ili vi_e autmobila. Zanimljivo je, u sluaju jednog automobila, mijenjati iznos brzine putem klizaa i promatrati promjene na grafovima prije_enog puta i brzine. Korisnik moe paliti i gasiti prekida 'putanja?' i na taj na_in prikazati ili sakriti putanju automobila

EXTENDING THE MODEL

Kosinik moe dodati grafiki prikaz kineti_ke energije automobila.

NETLOGO FEATURES

(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)

RELATED MODELS

(models in the NetLogo Models Library and elsewhere which are of related interest)

CREDITS AND REFERENCES

(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

breed [automobili automobil]

turtles-own 
[d_x]

automobili-own
[v_a]

globals
[s v B d_t a_d_x a_s]

to setup
  clear-all
  setup-cestica
  setup-pozadina
  reset-ticks
end 

to setup-pozadina
   set B random 30
   ask patch 0 0 
   [
     set pcolor white
     set plabel "A"
     set plabel-color red
   ]
   ask patch B 0 
   [
     set pcolor white
     set plabel "B"
     set plabel-color red
   ]
end 

to setup-cestica
  ifelse (vise_automobila?)
  [
    create-automobili 8
    ask automobili
    [
      setxy 0 who
      set color (2 * who + 1) * 5
      set shape "car"
      set heading 90
      set v_a random 200
      if putanja? 
      [
        pen-down
      ]
    ]
  ]
  
  [
    create-turtles 1
    ask turtle 0 
    [
    set color red
    setxy 0 0
    set heading 90
    set shape "car" 
    if putanja? 
    [
      pen-down
    ]
    ]
  ]
end 

to go
  ifelse (vise_automobila?)
  [
  ask automobili
  [
    ifelse xcor <= B
    [
      automobili-unos
      automobili-izracun 
    ]
    
    [
      set v_a 0
    ]
    
  ]
  ]
  
  [
  ask turtle 0 
  [
  ifelse xcor <= B
  [
  unos
  izra_un
  ]
  
  [ 
  set v 0
  ]
  ]
  ]
  tick  
end 

to unos
    set v brzina
    set d_t 0.001
end 

to izra_un 
  set d_x (v * d_t)
  set xcor (xcor + d_x) 
  set s (s + d_x)
end 

to automobili-unos
  set d_t 0.001
end 

to automobili-izracun
  set a_d_x (v_a * d_t)
  set xcor (xcor + a_d_x)
end 

  
  

There are 4 versions of this model.

Uploaded by When Description Download
Hrvoje Mladinić almost 13 years ago Reverted to older version Download this version
Hrvoje Mladinić almost 13 years ago Reverted to older version Download this version
Hrvoje Mladinić almost 13 years ago Jednoliko pravocrtno gibanje s vise automobila Download this version
Hrvoje Mladinić almost 13 years ago Initial upload Download this version

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.