Cancelacion Inasistencia

Cancelacion Inasistencia preview image

1 collaborator

Fredy_clavijo Fredy Clavijo (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.0.4 • Viewed 311 times • Downloaded 29 times • Run 0 times
Download the 'Cancelacion Inasistencia' 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

;===============Final de modelamiento==============================
; Jose Alezander Gonzalez Polo
; Diego Pinzon 
; Fredy Clavijo
;==================================================================
;===============aca declaramos las variables globales ===================================================
globals [iter iter2 iter3]  ;variables globales

;patches-own [semaforo?]
turtles-own [inasistencias vision]
 
;=============== limpia toda la aplicacion ===================================================

to clear_all    ; 
  clear-all
end 

;============== aca se inicia la aplicacion ====================================================

to setup
  
  clear-all  ; limpia el mundo
  
    ask patches [ ; ask es para el ciclo
       set pcolor green  
    ]   
    
    ask patches with [pxcor = min-pxcor] 
    [
       set pcolor one-of [black]              
    
    ]
    set iter min-pycor    
    set iter2 min-pycor
    
    crear-estudiantes
    
  reset-ticks
end 
;==================================================================


;===================== Crear estudiantes =============================================

to crear-estudiantes create-turtles students [
     set inasistencias 0
     set xcor iter
     set label 0
     set heading 0
   ;  set ycor round(random-ycor) ;no puede ser aleatorio porque los quiero distribuir uno en cada carril
     set ycor iter
     
     ;set vision random 7
     
     while [any? other turtles-here]
     [ fd 1 ]
   ]
end 

;===================== Codigo go =============================================

to go
  ejecutar
 ; cancelan
  if ticks = 64 [ stop ]
  ;crear_estudiantes
end 
  

  
;===================== Codigo a ejecutar =============================================

to ejecutar
 ;colocar-estudiantes
 
 ask patches with [pxcor = iter2 - 1 ] 
    [ ; ask es para el ciclo
       set pcolor one-of [10]              
    
    ]
 ask patches with [pxcor = ticks + 1 ]
 [    
  
      ; set pcolor one-of [blue]    
      set pcolor one-of [blue]          
         
 ]
    set iter iter + 1
    set iter2 iter2 + 1
    
   cancelan
   tick
end 

;===================== % de estudiantes que cancelan por inacistencia despues de la 3 semana =======================

to cancelan
   ask turtles[
     set heading 90
     ifelse random-float 1 > 0.05
     [
       fd 1
       ] 
   [
     set inasistencias inasistencias + 1
     set label label + 1
     ]
   
  ; if label > 7 [
  ;   die
  ;  ]
     if inasistencias > 7 [
     set shape "circle"
     ]
   ]
end 

;==================================================================

There is only one version of this model, created almost 12 years ago by Fredy Clavijo.

Attached files

File Type Description Last updated
Cancelacion Inasistencia.png preview Preview for 'Cancelacion Inasistencia' almost 12 years ago, by Fredy Clavijo Download

This model does not have any ancestors.

This model does not have any descendants.