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 198 times • Downloaded 22 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.)


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 over 10 years ago by Fredy Clavijo.

Attached files

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

This model does not have any ancestors.

This model does not have any descendants.