https://github.com/itsdfish/cognitiveworkload.jl
A julia package for computing cognitive workload.
https://github.com/itsdfish/cognitiveworkload.jl
cognitive-workload julia julia-language julialang
Last synced: 6 months ago
JSON representation
A julia package for computing cognitive workload.
- Host: GitHub
- URL: https://github.com/itsdfish/cognitiveworkload.jl
- Owner: itsdfish
- License: mit
- Created: 2023-03-12T12:43:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-12T12:52:57.000Z (over 3 years ago)
- Last Synced: 2025-01-22T06:25:56.926Z (over 1 year ago)
- Topics: cognitive-workload, julia, julia-language, julialang
- Language: Julia
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CognitiveWorkload
This is a small package for computing for estimating cognitive workload from a cognitive model. Mean workload can be estimated over a large interval with `compute_mean_workload` or at a desired temporal resolution with `compute_workload`.
# Example
```julia
using CognitiveWorkload
using Plots
modules = [:procedural,:declarative,:imaginal,:motor,:visual]
weights = [2.0, 4.0, 4.0, 1.0, 1.0]
res = .01 #seconds
start_time = 0.0
end_time = 1.0
activity = Activity[]
a = Activity(;start_time=0.0, end_time=.05, idx=1, Module="procedural")
push!(activity, a)
a = Activity(;start_time=0.05, end_time=.10, idx=1, Module="procedural")
push!(activity, a)
a = Activity(;start_time=0.1, end_time=.185, idx=5, Module="visual")
push!(activity, a)
a = Activity(;start_time=0.185, end_time=.235, idx=1, Module="procedural")
push!(activity, a)
a = Activity(;start_time=0.235, end_time=.350, idx=2, Module="declarative")
push!(activity, a)
a = Activity(;start_time=0.350, end_time=.400, idx=1, Module="procedural")
push!(activity, a)
a = Activity(;start_time=0.400, end_time=.600, idx=4, Module="motor")
push!(activity, a)
workload,_ = compute_workload(activity, res, weights, start_time, end_time)
plot(res:res:end_time, workload, grid=false, leg=false, xlabel="Time (seconds)", ylabel = "workload", size=(600,400))
```
