Drone3Din2D-tsmit

Drone3Din2D-tsmit preview image

1 collaborator

Default-person Tanea Smith (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 3D 6.1.1 • Viewed 19 times • Downloaded 1 time • Run 0 times
Download the 'Drone3Din2D-tsmit' 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?

(a general understanding of what the model is trying to show or explain)

## HOW IT WORKS

(what rules the agents use to create the overall behavior of the model)

## HOW TO USE IT

(how to use the model, including a description of each of the items in the Interface tab)

## THINGS TO NOTICE

(suggested things for the user to notice while running the model)

## THINGS TO TRY

(suggested things for the user to try to do (move sliders, switches, etc.) with the model)

## EXTENDING THE MODEL

(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)

## 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 [drone a-drone]
globals [numpts errlist toterr relerr]
turtles-own [errval]

to update
  ca
  set numpts Number_of_points
  crt 10 [set shape "target" set color green set size point-size set pen-size point-size]
  crt 10 [set shape "target" set color orange set size point-size set pen-size point-size]
  ask turtles with [who mod 10 >= numpts] [set hidden? true]
  ask turtle 0 [setxyz 0 0 0 pendown set xcor x0 set ycor y0 set zcor z0 penup set label "C0" set shape "circle 2"]
  ask turtle 1 [setxyz 0 0 0 if (not hidden?) [pendown] set xcor x1 set ycor y1 set zcor z1 penup set label "C1" ]
  ask turtle 2 [setxyz 0 0 0 if (not hidden?) [pendown] set xcor x2 set ycor y2 set zcor z2 penup set label "C2" ]
  ask turtle 3 [setxyz 0 0 0 if (not hidden?) [pendown] set xcor x3 set ycor y3 set zcor z3 penup set label "C3" ]
  ask turtle 4 [setxyz 0 0 0 if (not hidden?) [pendown] set xcor x4 set ycor y4 set zcor z4 penup set label "C4" ]
  ask turtle 5 [setxyz 0 0 0 if (not hidden?) [pendown] set xcor x5 set ycor y5 set zcor z5 penup set label "C5" ]
  ask turtle 6 [setxyz 0 0 0 if (not hidden?) [pendown] set xcor x6 set ycor y6 set zcor z6 penup set label "C6" ]
  ask turtle 7 [setxyz 0 0 0 if (not hidden?) [pendown] set xcor x7 set ycor y7 set zcor z7 penup set label "C7" ]
  ask turtle 8 [setxyz 0 0 0 if (not hidden?) [pendown] set xcor x8 set ycor y8 set zcor z8 penup set label "C8" ]
  ask turtle 9 [setxyz 0 0 0 if (not hidden?) [pendown] set xcor x9 set ycor y9 set zcor z9 penup set label "C9" ]

  ask turtle 10 [set heading az0 set pitch el0 pendown fd r0 penup set label "S0" set errval distance turtle 0 set shape "circle 2"]
  ask turtle 11 [set heading az1 set pitch el1 if (not hidden?) [pendown] fd r1 penup set label "S1" set errval distance turtle 1]
  ask turtle 12 [set heading az2 set pitch el2 if (not hidden?) [pendown] fd r2 penup set label "S2" set errval distance turtle 2]
  ask turtle 13 [set heading az3 set pitch el3 if (not hidden?) [pendown] fd r3 penup set label "S3" set errval distance turtle 3]
  ask turtle 14 [set heading az4 set pitch el4 if (not hidden?) [pendown] fd r4 penup set label "S4" set errval distance turtle 4]
  ask turtle 15 [set heading az5 set pitch el5 if (not hidden?) [pendown] fd r5 penup set label "S5" set errval distance turtle 5]
  ask turtle 16 [set heading az6 set pitch el6 if (not hidden?) [pendown] fd r6 penup set label "S6" set errval distance turtle 6]
  ask turtle 17 [set heading az7 set pitch el7 if (not hidden?) [pendown] fd r7 penup set label "S7" set errval distance turtle 7]
  ask turtle 18 [set heading az8 set pitch el8 if (not hidden?) [pendown] fd r8 penup set label "S8" set errval distance turtle 8]
  ask turtle 19 [set heading az9 set pitch el9 if (not hidden?) [pendown] fd r9 penup set label "S9" set errval distance turtle 9]

  set toterr sum [errval] of turtles with [not hidden? and who >= 10 and who < 20]
  let denom min list (sum [distancexyz 0 0 0] of turtles with [not hidden? and who >= 10 and who < 20]) (sum [distancexyz 0 0 0] of turtles with [not hidden? and who >= 0 and who < 10])
  set relerr ifelse-value (denom = 0) [0] [100 * toterr / denom]
  if relerr < 5 [output-print "Target measurement error for your tools should be around 5%. \nSignificantly less means you likely calculated, rather than measured, \none of your sets of values"]

  create-drone 1 [set color violet setxyz x0 y0 z0 set size point-size + 3
  set heading 0 set pitch 0]
  crt 1 [set color blue
         setxyz 0 0 0 pendown set heading 0 set pitch 0 forward max-pycor penup
         setxyz 0 0 0 pendown set heading 90 set pitch 0 forward max-pxcor penup
         setxyz 0 0 0 pendown set heading 0 set pitch 90 forward max-pzcor penup
         die]
end 

There is only one version of this model, created 11 days ago by Tanea Smith.

Attached files

File Type Description Last updated
Drone3Din2D-tsmit.png preview Preview for 'Drone3Din2D-tsmit' 11 days ago, by Tanea Smith Download

This model does not have any ancestors.

This model does not have any descendants.