Commit 0f3203d6 authored by CD's avatar CD

Small changes to model and loader added

parent 4829cbc9
(load "load-act-r-6.lisp")
(load "MODELPATH/Subtraction_Model_Fixed.lisp")
;Use run-CS function. Can use this function to change blc (:new-blc),
; max-arousal (:max-arous), and whether or not to Slow-Breath (:SB)
......@@ -240,9 +240,11 @@ TBD
;to automate chunk activation, have function (run-Dancy...) move file to suitable folder
(defun run-exp ( &key (cnd 'spelled-out) (runNum 1) (lCount nil) (syl nil) (imag nil) (file t) (subj-id 1) (blocks 1) (trial-time 240) (logtyp 'by-line) (pm-scale 1.5) (slow-breathing nil))
(defun run-exp ( &key (cnd 'spelled-out) (runNum 1) (lCount nil) (syl nil) (imag nil)
(file t) (subj-id 1) (blocks 1) (trial-time 240) (logtyp 'by-line)
(pm-scale 1.5) (slow-breathing nil) (file-id "1"))
(let ((prev-num-resp 0)
(fileName "CogSci18PhysSub")
(fileName (concatenate 'string "CogSci18PhysSub" file-id))
(dirPath "./CogSci18/"))
(setq *pm-scale* pm-scale)
......@@ -259,9 +261,9 @@ TBD
(schedule-event-relative 0.026 'start-slow-breathing :module 'physio
:priority :max :details "Start deep slow breaths")
;;Schedule an event to advance 15s (of slow breathing)
(schedule-event-relative 0.027 'advance-phys :module :physio :priority :max :params (list 0.25))
(schedule-event-relative 0.030 'advance-phys :module :physio :priority :max :params (list 0.25))
;;Back to spontaneous breathing
(schedule-event-relative 0.028 'stop-controlled-breathing :module 'physio
(schedule-event-relative 0.031 'stop-controlled-breathing :module 'physio
:priority :max :details "Back to spontaneous breath")))
(log-event (make-sub-log-exp :event 'block :tm (get-internal-real-time) :subj-id subj-id :cnd cnd :subtrahend sub :start-val val :blk i))
(setf prev-num-resp
......@@ -276,24 +278,25 @@ TBD
(defvar *stress-on* nil)
;;CogSci 18
(defun run-CS (num-times &optional (sb nil))
(defun run-CS (num-times &key (sb nil) (new-blc nil) (max-arous nil))
(ensure-directories-exist "CogSci18/")
(when new-blc (sgp-fct (list :blc (/ new-blc 100.0))))
(when max-arous (sgp-fct (list :AA-max-arous (/ max-arous 100.0))))
;So that we can record arousal values
;(schedule-event-after-module 'declarative 'test-record-arousal :output nil)
(dotimes (i num-times)
(sgp-fct (list :seed (list 12345 i)))
;;Schedule an event to advance the physiology system a day to stabilize params
(when (phys-module-enabled (get-module physio))
;(schedule-event-relative 0.015 'advance-phys :module :physio :priority :max :params (list 1440))
;;Turn on daily planner so that sleep schedule and sleep homeostasis can cause deprivation
(schedule-event-relative 0.022 'create-high-stress :module 'physio
:priority :max :details "Stress Model out!")
(model-output "Stressed....")
;;Schedule an event to advance the physiology system 15 mins to sim stress
(schedule-event-relative 0.024 'advance-phys :module :physio :priority :max :params (list 15))
;;Turn off stress vars
);(schedule-event-relative 0.026 'de-stress-graded :module :physio :priority :max))
(run-exp :blocks 4 :runNum i :lCount 0 :slow-breathing sb)
(run-exp :blocks 4 :runNum i :lCount 0 :slow-breathing sb
:file-id (format nil "B~SM~S" new-blc max-arous))
#|(let ((boldData (predict-bold-response)))
for bD in boldData
......@@ -521,7 +524,6 @@ TBD
;(sgp :save-buffer-trace t :traced-buffers (retrieval production goal visual-location visual manual))
;(sgp :sact t)
(sgp :phys-delay 2 :phys-enabled t)
(sgp :AA-enabled t)
......@@ -817,7 +819,7 @@ TBD
(setf *wme-list* (nreverse *wme-list*))
(setf *tens&above* (nreverse *tens&above*))
(add-dm-fct *wme-list*)
(dolist (dm-name *threes*) (set-base-levels-fct (list (list dm-name 2.43)))))
#|(dolist (dm-name *threes*) (set-base-levels-fct (list (list dm-name 2.43))))|#)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment