决策交互模拟SDG4

决策交互模拟SDG4 preview image

1 collaborator

Default-person cao su (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.4.0 • Viewed 17 times • Downloaded 0 times • Run 0 times
Download the '决策交互模拟SDG4' modelDownload this modelEmbed this model

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


Info tab cannot be displayed because of an encoding error

Comments and Questions

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

Click to Run Model

globals [
  high-income-cutoff
  pareto-distribution-alpha
  pareto-distribution-minimum
  sdg4_4_1_1_completion_rate  ; 小学/初中教育巩固率
  sdg4_4_2_2_gross_enrollment_rate  ; 学前教育毛入园率
  sdg4_4_3_1_transition_rate  ; 初中毕业生升学率和普职比
  sdg4_4_6_1_net_enrollment_rate_primary_secondary  ; 小学/初中净入学率、高中毛入学率
  sdg4_4_5_1_gender_equality_index  ; 指标4.1.1的性别平等指数
  sdg4_4_a_1_school_infrastructure_access_rate  ; 能获得基本设施和服务的学校比例
  sdg4_4_c_1_teacher_training_rate  ; 接受过有关国家相应水平教学所规定的有组织任前或在职师资培训的教师比例
  sdg4_overall_score  ; SDG4 总体好坏指标
]

breed [students student]
breed [schools school]
breed [government gov]

students-own [target enrolled? income years-in-school school-achievement]
schools-own [enrollment achievement traffic-lights-color is-private?]
government-own [government-achievement]

to setup
  clear-all
  set-default-shape schools "house"
  set-default-shape students "person"
  set-default-shape government "house"
  ask patches [ set pcolor 108 ]

  set pareto-distribution-alpha 3
  set pareto-distribution-minimum 1
  set high-income-cutoff (pareto-distribution-minimum / (high-income-percentage / 100) ^ (1 / pareto-distribution-alpha))

  create-schools number-of-schools

  [
    set color yellow
    set traffic-lights-color 5
    fd max-pxcor
    setxy random-xcor random-ycor
    set achievement random-normal 5 1
    if achievement < 0 [set achievement 0]
    ifelse (achievement > 6 and random-float 100 < 45.4) [set is-private? TRUE set shape "private-school"]
    [
      ifelse (achievement > 4 and random-float 100 < 2.6) [set is-private? TRUE set shape "private-school"]
      [
        ifelse (random-float 100 < 0.4) [set is-private? TRUE][set is-private? FALSE]
      ]
    ]
    set enrollment 0
    set size 2
    paint-school
  ]

  create-students initial-students * 0.9 [
    set color orange
    setxy random-xcor random-ycor
    set income random-pareto pareto-distribution-alpha pareto-distribution-minimum
    set enrolled? FALSE
    set years-in-school random 9 + 1
    paint-students
  ]

  create-government 2 [
    set color magenta - 3
    set size 4
    setxy random-xcor random-ycor
    set government-achievement random-normal 5 1
  ]

  reset-ticks
end 

to go
  call-new-students
  ask students [
    choose-school
    study-a-year
    seniors-graduate
  ]
  ask schools [ enroll ]
  ask links [ set color white ]
  update-sdg4-indicators
  tick
  display-labels
  display-sdg4-indicators
end 

to choose-school
  ifelse (income > high-income-cutoff and with-school-choice?)
  [
    set target one-of schools with [[income] of myself - (distance myself) * school-transportation-cost / 100 > 0] with-max [(achievement ^ alpha) *
     (((world-height * sqrt 2) - distance myself) / (world-height * sqrt 2)) ^ (1 - alpha) ]
  ]
  [
    ifelse (with-school-choice? and traffic-lights?)
    [
      set target min-one-of schools with [[income] of myself - (distance myself) * school-transportation-cost / 100 > 0 and is-private? = FALSE]
      with-max [(traffic-lights-color ^ alpha) *
        (((world-height * sqrt 2) - distance myself) / (world-height * sqrt 2)) ^ (1 - alpha) ] [distance myself]
    ]
    [
      ifelse (with-school-choice?)
      [
        set target min-one-of schools
        with [[income] of myself - (distance myself) * school-transportation-cost / 100 > 0 and is-private? = FALSE] [distance myself]
      ]
      [
        set target min-one-of schools
        with [[income] of myself - (distance myself) * school-transportation-cost / 100 > 0] [distance myself]
      ]
    ]
  ]

  if target != nobody
  [
    create-link-with target
    set school-achievement [achievement] of target
    set enrolled? TRUE

    ; 移动到选择的学校
    face target
    fd 0.1 ; 适当调整步长
  ]
end 

to call-new-students
  create-students initial-students * 0.1 [
    set color gray
    setxy random-xcor random-ycor
    set income random-pareto pareto-distribution-alpha pareto-distribution-minimum
    set enrolled? FALSE
    set years-in-school 10
    paint-students
  ]
end 

to enroll ;school procedure
  set enrollment count link-neighbors
end 

to display-labels
  ask schools [ set label round enrollment set label-color black ]
end 

to paint-school
  ask schools [
    ifelse achievement > 6 [set color green set traffic-lights-color 6]
    [if achievement < 4 [set color red set traffic-lights-color 4]]
  ]
end 

to study-a-year
  set years-in-school years-in-school - 1
end 

to paint-students
  ask students [
    ifelse income > high-income-cutoff [set color blue]
    [if income < high-income-cutoff [set color pink]]
  ]
end 

to seniors-graduate
  if years-in-school = 0 [die]
end 

to-report random-pareto [sigma mm]
  report mm / ( random-float 1 ^ (1 / sigma) )
end 

to update-sdg4-indicators
  ; 更新 SDG4 相关指标
  let total_students count students
  let enrolled_students count students with [enrolled?]
  let completion_rate (enrolled_students / total_students) * 100
  set sdg4_4_1_1_completion_rate completion_rate

  ; 计算学生与学校比例
  let student_school_ratio count students / count schools
  let inverse_ratio 1 / student_school_ratio

  ; 计算 SDG4 总体好坏指标
  let total_score sdg4_4_1_1_completion_rate + sdg4_4_2_2_gross_enrollment_rate + sdg4_4_3_1_transition_rate + sdg4_4_6_1_net_enrollment_rate_primary_secondary + sdg4_4_5_1_gender_equality_index + sdg4_4_a_1_school_infrastructure_access_rate + sdg4_4_c_1_teacher_training_rate
  let weighted_score total_score / 7

  ; 根据学生与学校比例调整总体评分
  let adjusted_score weighted_score * inverse_ratio
  set sdg4_overall_score adjusted_score

  ; 计算其他指标
  let total_schools count schools
  let gross_enrollment_rate ((total_students / total_schools) * 100) / (1 + random-normal 0 0.05)  ; 控制在 120% 左右
  set sdg4_4_2_2_gross_enrollment_rate gross_enrollment_rate

  let total_graduates count students with [years-in-school = 0]
  let transition_rate ((total_graduates / (enrolled_students + total_graduates)) * 100) / (1 + random-normal 0 0.01)  ; 控制在 100% 左右
  set sdg4_4_3_1_transition_rate transition_rate

  let total_female_students count students with [color = gray]
  let total_male_students count students with [color = blue]
  let gender_equality_index (total_female_students / total_male_students)
  set sdg4_4_5_1_gender_equality_index gender_equality_index

  let total_schools_with_infrastructure count schools with [color = yellow]
  let school_infrastructure_access_rate (total_schools_with_infrastructure / total_schools) * 100
  set sdg4_4_a_1_school_infrastructure_access_rate school_infrastructure_access_rate
end 

to display-sdg4-indicators
  ; 显示 SDG4 相关指标值到控制台
  print (word "SDG4 Indicator Values:")
  print (word "SDG4 Overall Score: " sdg4_overall_score)
  print (word "4.1.1 Completion Rate: " sdg4_4_1_1_completion_rate "%")
  print (word "4.5.1 Gender Equality Index: " sdg4_4_5_1_gender_equality_index)
  print (word "4.a.1 School Infrastructure Access Rate: " sdg4_4_a_1_school_infrastructure_access_rate "%")
end 

There is only one version of this model, created 26 days ago by cao su.

Attached files

File Type Description Last updated
决策交互模拟SDG4.png preview Preview for '决策交互模拟SDG4' 26 days ago, by cao su Download

This model does not have any ancestors.

This model does not have any descendants.