Skip to content

Commit

Permalink
GLH updates/comments
Browse files Browse the repository at this point in the history
  • Loading branch information
heileman committed Aug 11, 2020
1 parent 3f2a7dc commit f63a2a9
Show file tree
Hide file tree
Showing 12 changed files with 272 additions and 289 deletions.
70 changes: 29 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,29 @@
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Build Status](https://travis-ci.org/CurricularAnalytics/CurricularAnalytics.jl.svg?branch=master)](https://travis-ci.org/CurricularAnalytics/CurricularAnalytics.jl)
[![Coverage Status](https://coveralls.io/repos/github/CurricularAnalytics/CurricularAnalytics.jl/badge.svg?branch=master)](https://coveralls.io/github/CurricularAnalytics/CurricularAnalytics.jl?branch=master)
[![DOI](https://zenodo.org/badge/147096983.svg)](https://zenodo.org/badge/latestdoi/147096983)

# CurricularAnalytics.jl
**CurricularAnalytics.jl** is a toolbox for studying and analyzing academic program curricula. The toolbox represents curricula as graphs, allowing various graph-theoretic measures to be applied in order to quantify the complexity of curricula. In addition to analyzing curricular complexity, the toolbox supports the ability to visualize curricula, to compare and contrast curricula, to create optimal degree plans for completing curricula that satisfy particular constraints, and to simulate the impact of various events on student progression through a curriculum.

## Documentation
Full documentation is available at [GitHub Pages](https://curricularanalytics.github.io/CurricularAnalytics.jl/latest/).
Documentation for functions in this toolbox is also available via the Julia REPL help system.
Additional tutorials can be found at the [Curricular Analytics Notebooks](https://github.com/CurricularAnalytics/CA-Notebooks) site.

# Installation

Installation is straightforward. First, install the Julia programming language on your computer. To do this, download Julia here: https://julialang.org, and follow the instructions for your operating system.

Next, open the Julia application that you just installed. It should look similar to the image below. This interface is referred to as the `Julia REPL`.

![Julia termain](https://s3.amazonaws.com/curricularanalytics.jl/julia-command-line.png)

Next, enter Pkg mode from within Julia by hitting the `]` key, and then type:
```julia-repl
pkg> add CurricularAnalytics
```
This will install the toolbox, along with the other Julia packages needed to run it. To load and use the toolbox, hit the `backspace` key to return to the Julia REPL. Now type:
```julia-repl
julia> using CurricularAnalytics
```
The toolbox must be loaded again via `using CurricularAnalytics` every time you restart Julia.

For more information about installing the toolbox, including the steps neccessary to utilize degree plan optimization, please see the [INSTALLING.md](https://curricularanalytics.github.io/CurricularAnalytics.jl/latest/install.html)

## Supported Versions
* CurricularAnalytics master will be maintained/enhanced to work with the latest stable version of Julia.
* Julia 1.0.5, 1.2, 1.3, 1.4: CurricularAnalytics v1.0.0 is the latest version guaranteed to work with Julia 1.0.5 to version 1.4.
* Later versions: Some functionality might not work with prerelease / unstable / nightly versions of Julia. If you run into a problem, please file an issue.

# Contributing and Reporting Bugs
We welcome contributions and bug reports! Please see [CONTRIBUTING.md](https://github.com/CurricularAnalytics/CurricularAnalytics.jl/blob/master/CONTRIBUTING.md)
for guidance on development and bug reporting.
# CurricularAnalytics.jl (Simulation)

## Installation
- Clone the repo to the local machine

## Run Simulation Examples
- ``` bash
cd CurricularAnalytics.jl/example/Simulations
```
- ``` bash
julia runSimulation.jl
```

## Set Course Pass Rate for a Specific Course
- To access all courses in the curriculum:
- If the degree plan is stored in the variable `degreePlan`
- ``` julia
courses = degreePlan.curriculum.courses
```
- First Course:
``` julia
courses[1]
```
- Change the pass rate of the first course to 0.5:
``` julia
courses[1].passrate = 0.5
```

**Note:** Change the simulation configurations and degree plans by adjusting **config** section
29 changes: 0 additions & 29 deletions docs/src/simulation.md

This file was deleted.

43 changes: 21 additions & 22 deletions examples/Simulations/runSimulation.jl
Original file line number Diff line number Diff line change
@@ -1,50 +1,49 @@
using Pkg
Pkg.activate("../..")
Pkg.resolve()
Pkg.instantiate()
#using Pkg
#Pkg.activate("../..")
#Pkg.resolve()
#Pkg.instantiate()
using CurricularAnalytics

include("CurriculumPool.jl")

################### Change the Setting ###################
# config
num_students = 10
num_students = 50
course_passrate = 0.8

max_credits = 19
duration = 10
duration_lock = false
duration = 14
durationLock = false
stopouts = true

performance_model = PassRate
enrollment_model = Enrollment

# Comment and uncomment to change the degree plan
# courses, degree_plan = Example_C1() # refer to the curriculum in examples/Introduction/Example_C1.jl
# courses, degree_plan = Example_C2() # refer to the curriculum in examples/Introduction/Example_C2.jl
# courses, degree_plan = UKY_EE_curric() # refer to the curriculum in examples/UKY_EE_curric.jl
# courses, degreePlan = Example_C1() # refer to the curriculum in examples/Introduction/Example_C1.jl
# courses, degreePlan = Example_C2() # refer to the curriculum in examples/Introduction/Example_C2.jl
# courses, degreePlan = UKY_EE_curric() # refer to the curriculum in examples/UKY_EE_curric.jl

# Comment this whole section if use the courses and degree plan above
degree_plan = read_csv("Univ_of_Arizona-Aero.csv") # change the degree plan csv file for different plan
courses = degree_plan.curriculum.courses
name = degree_plan.curriculum.name
println()
println("Degree Plan: $name")
degreePlan = read_csv("./examples/Univ_of_Arizona-Aero.csv") # change the degree plan csv file for different plan
courses = degreePlan.curriculum.courses
name = degreePlan.curriculum.name
println("\n $(degreePlan.curriculum.name), $(degreePlan.name)")

##########################################################

students = simple_students(num_students) # Create a cohort of students for simulation
set_passrates(courses, course_passrate) # set pass rate for all courses
students = simpleStudents(num_students) # Create a cohort of students for simulation
setPassrates(courses, course_passrate) # set pass rate for all courses

# run simulation
simulation = simulate(degree_plan,
simulation = simulate(degreePlan,
students,
max_credits = max_credits,
performance_model = PassRate,
enrollment_model = Enrollment,
performance_model=PassRate,
enrollment_model=Enrollment,
duration = duration,
duration_lock = duration_lock,
durationLock = durationLock,
stopouts = stopouts)

# print
simulation_report(simulation, duration, course_passrate, max_credits)
simulationReport(simulation, duration, course_passrate, max_credits)
53 changes: 53 additions & 0 deletions examples/Univ_of_Arizona-Aero.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Curriculum,Aerospace Engineering,,,,,,,,,
Degree Plan,2019-20 Degree Plan,,,,,,,,,
Institution,University of Arizona,,,,,,,,,
Degree Type,BS,,,,,,,,,
System Type,semester,,,,,,,,,
CIP,14.0201,,,,,,,,,
Courses,,,,,,,,,,
Course ID,Course Name,Prefix,Number,Prerequisites,Corequisites,Strict-Corequisites,Credit Hours,Institution,Canonical Name,Term
1,Calculus I w/ Applications,MATH,125,,,,3,,,1
2,Gen Chemistry I,CHEM,151,,,,4,,,1
3,First-year Comp.,ENGL,101,,,,3,,,1
4,Intro to Engineering,ENGR,102,,1,,3,,,1
5,Tier I General Ed.,,,,,,3,,,1
6,Calculus II,MATH,129,1,,,3,,,2
7,Intro. to MATLAB I,AME,105,1,,,1,,,2
8,Intro Mechanics,PHYS,141,1,,,4,,,2
9,First-year Comp.,ENGL,102,3,,,3,,,2
10,Programming for Eng. Apps.,ECE,175,,1,,3,,,2
11,Tier I General Ed. 1,,,,,,3,,,2
12,Statics,CE,214,8;6,,,3,,,3
13,Vector Calculus,MATH ,223,6,,,4,,,3
14,Electricity & Magnetism,PHYS,241,6;8,,,4,,,3
15,Intro. To MATLAB II,AME ,205,7,,,1,,,3
16,Comp. Aided Drafting & Manufacturing,AME,211,,,,3,,,3
17,Tier I General Ed. 2,,,,,,3,,,3
18,Thermodynamics,AME,230,8,,,3,,,4
19,Dynamics,AME,250,12,20,,3,,,4
20,Intro. to ODEs,MATH,254,13,,,3,,,4
21,Intro. to Aerospace Eng.,AME,220,13; 8,20,,3,,,4
22,Tier I General Ed. 3,,,,,,3,,,4
23,Aerodynamics,AME,320,21,26,,3,,,5
24,Mech. Behavior of Eng. Materials.,AME ,324A,12,,,3,,,5
25,Engineering Analysis,AME,301,20,,,3,,,5
26,Instrumentation Lab.,AME,300,,24;18,,3,,,5
27,Fund. of Materials for Engineers,MSE,331R,2,,,3,,,5
28,Mech. of Materials Lab.,AME,324L,25,,,1,,,5
29,Eng. Component Design,AME,324B,25,,,3,,,6
30,Aircraft Performance,AME,321,19;21,23,,3,,,6
31,Gasdynamics,AME,323,20; 18; 21,32,,3,,,6
32,Numerical Methods,AME,302,20;15;19,26,,3,,,6
33,Aero./Mech. Eng. Lab,AME,313,,,,1,,,6
34,Tier II General Ed. 1,,,,,,3,,,6
35,Senior Aerospace Lab.,AME,401,27;23;31,,,3,,,7
36,Aerospace Conceptual Design,AME,420,33;23;30;31,,,3,,,7
37,Aerospace Propulsion,AME,425,18;31;24,,,3,,,7
38,Stability and Control of Aero. Vehicles,AME,427,23;30;15,,,3,,,7
39,Orbital Mechanicans and Space Flt.,AME,457,13;19,,,3,,,7
40,Senior Colloquium,AME,495S,,,,1,,,7
41,Aerospace Eng.Design,AME,422,36,33,,3,,,8
42,Num. Meth. in Fluid Mech. & Heat Xfer,AME,431,18;24;32,,,3,,,8
43,Technical Elective 1,,,,,,3,,,8
44,Technical Elective 2,,,,,,3,,,8
45,Tier II General Ed. 2,,,,,,3,,,8
7 changes: 5 additions & 2 deletions src/CurricularAnalytics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ include("DegreePlanAnalytics.jl")
include("DegreePlanCreation.jl")

include("Simulation/Simulation.jl")
include("Simulation/PassRate.jl")
include("Simulation/Enrollment.jl")
include("Simulation/Report.jl")

export AA, AAS, AS, BA, BS, Course, CourseCatalog, Curriculum, Degree, DegreePlan, EdgeClass, LearningOutcome, Requisite, System, Term, add_course!,
add_lo_requisite!, add_requisite!, all_paths, basic_metrics, basic_statistics, bin_filling, blocking_factor, centrality, co, compare_curricula,
complexity, course, course_from_id, course_from_vertex, course_id, courses_from_vertices, create_degree_plan, dead_ends, delay_factor, delete_requisite!,
dfs, extraneous_requisites, find_term, gad, homology, is_duplicate, isvalid_curriculum, isvalid_degree_plan, longest_path, longest_paths, merge_curricula,
pre, print_plan, quarter, reach, reach_subgraph, reachable_from, reachable_from_subgraph, reachable_to, reachable_to_subgraph, read_csv, requisite_distance,
requisite_type, semester, similarity, strict_co, topological_sort, total_credits, write_csv, Grade, grade, AbstractRequirement, CourseSet, RequirementSet,
CourseRecord, StudentRecord, TransferArticulation, add_transfer_catalog, add_transfer_course, transfer_equiv, PassRate, Enrollment, Simulation, Student, set_passrates,
simple_students, simulate, simulation_report, pass_table
CourseRecord, StudentRecord, TransferArticulation, add_transfer_catalog, add_transfer_course, transfer_equiv, PassRate, Enrollment, Simulation, Student, setPassrates,
simpleStudents, simulate, simulationReport, passTable

# Check if a curriculum graph has requisite cycles.
"""
Expand Down
4 changes: 3 additions & 1 deletion src/DataTypes/Course.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ mutable struct Course
metrics::Dict{String, Any} # Course-related metrics
metadata::Dict{String, Any} # Course-related metadata

termReq::Int # Number of terms that must be completed before enrolling
passrate::Float64 # Percentage of students that pass the course

# Constructor
function Course(name::AbstractString, credit_hours::Real; prefix::AbstractString="", learning_outcomes::Array{LearningOutcome}=Array{LearningOutcome,1}(),
num::AbstractString="", institution::AbstractString="", college::AbstractString="", department::AbstractString="",
cross_listed::Array{Course}=Array{Course,1}(), canonical_name::AbstractString="", id::Int=0, passrate::Float64=0.5)
cross_listed::Array{Course}=Array{Course,1}(), canonical_name::AbstractString="", id::Int=0, termReq::Number=0, passrate::Float64=1.0)
this = new()
this.name = name
this.credit_hours = credit_hours
Expand All @@ -69,6 +70,7 @@ mutable struct Course
this.learning_outcomes = learning_outcomes
this.vertex_id = Dict{Int, Int}() # curriculum id -> vertex id

this.termReq = termReq
this.passrate = passrate
return this
end
Expand Down
42 changes: 21 additions & 21 deletions src/DataTypes/Simulation.jl
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
import CurricularAnalytics: degree_plan
import CurricularAnalytics: DegreePlan

mutable struct Simulation
degree_plan::DegreePlan # The curriculum that is simulated
degreePlan::DegreePlan # The curriculum that is simulated #GLH - this is actually a degree plan, is term info used in the simulation?
duration::Int # The number of terms the simulation runs for

prediction_model::Module # Module that implements the model for predicting student's performance in courses
predictionModel::Module # Module that implements the model for predicting student's performance in courses

num_students::Int # The number of students in the simulation
enrolled_students::Array{Student} # Array of students that are enrolled
graduated_students::Array{Student} # Array of students that have graduated
stopout_students::Array{Student} # Array of students who stopped out
numStudents::Int # The number of students in the simulation
enrolledStudents::Array{Student} # Array of students that are enrolled
graduatedStudents::Array{Student} # Array of students that have graduated
stopoutStudents::Array{Student} # Array of students who stopped out

student_progress::Array{Int} # Indicates wheter students have passed each course
studentProgress::Array{Int} # Indicates wheter students have passed each course

grad_rate::Float64 # Graduation rate at the end of the simulation
term_grad_rates::Array{Float64} # Array of graduation rates at the end of the simulation
time_to_degree::Float64 # Average number of semesters it takes to graduate students
stopout_rate::Float64 # Stopout rate at the end of the simulation
term_stopout_rates::Array{Float64} # Array of stopout rates for each term
gradRate::Float64 # Graduation rate at the end of the simulation
termGradRates::Array{Float64} # Array of graduation rates at the end of the simulation
timeToDegree::Float64 # Average number of terms it takes to graduate
stopoutRate::Float64 # Stopout rate at the end of the simulation
termStopoutRates::Array{Float64} # Array of stopout rates for each term

function Simulation(degree_plan)
function Simulation(degreePlan)
this = new()

this.degree_plan = degree_plan
this.degreePlan = degreePlan

this.enrolled_students = Student[]
this.graduated_students = Student[]
this.stopout_students = Student[]
this.enrolledStudents = Student[]
this.graduatedStudents = Student[]
this.stopoutStudents = Student[]

# Set up degree plan
degree_plan.metadata["stopout_model"] = Dict()
degreePlan.metadata["stopoutModel"] = Dict()

# Set up courses
for (id, course) in enumerate(degree_plan.curriculum.courses)
for (id, course) in enumerate(degreePlan.curriculum.courses)
course.metadata["id"] = id
course.metadata["failures"] = 0
course.metadata["enrolled"] = 0
course.metadata["passrate"] = 0
course.metadata["term_req"] = 0
course.metadata["termReq"] = 0
course.metadata["grades"] = Float64[]
course.metadata["students"] = Student[]
course.metadata["model"] = Dict()
Expand Down
2 changes: 1 addition & 1 deletion src/DataTypes/Student.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mutable struct Student
end

# Returns an array of students
function simple_students(number)
function simpleStudents(number)
students = Student[]
for i = 1:number
student = Student(i, Dict())
Expand Down
Loading

0 comments on commit f63a2a9

Please sign in to comment.