HV0 PSerialPosition D. F101:./history +'!comment'(''). + +'!root'(921446829). + +'!children'(921446829, []). + +'!position'(921446829, 41, 118). + D./921446829 F160:./921446829/model +% Serial Position in Free recall: Thu Sep 5 16:27:48 2002 + +'!box'('Serial Position in Free recall', 'Compound' / 'Generic', [], ''). + +'!property_levels'([]). + F312:./921446829/subboxes +% Serial Position in Free recall: Thu Sep 5 16:27:48 2002 + +'!subbox'(903364453, 440, 170, [output(903364449, send), input(903364449, send)]). + +'!subbox'(903390619, 195, 305, [input(903364449, send)]). + +'!subbox'(903364449, 195, 170, [output(903390619, send), input(903364453, send), output(903364453, send)]). + F0:./921446829/description F16:./921446829/cycle +0. 0. 0. 0. 0. F0:./921446829/data_bus F26:./921446829/random_seed +seed(10309, 1361, 22305). F0:./921446829/refract F1:./921446829/temp + F16:./921446829/trial +1. -1. 1. 1. 1. D./921446829/903364453 F0:./921446829/903364453/description F114:./921446829/903364453/model +% Subject: Thu Sep 5 16:27:48 2002 + +'!box'('Subject', 'Compound' / 'Generic', [], ''). + +'!property_levels'([]). + F519:./921446829/903364453/subboxes +% Subject: Thu Sep 5 16:27:48 2002 + +'!subbox'(912815430, 405, 185, [input(903364963, send), output(912815420, send), output(912746100, read)]). + +'!subbox'(912746100, 255, 80, [input(912815430, read), input(903364963, read), input(903364963, send)]). + +'!subbox'(912815420, 260, 285, [input(912815430, send), input(903364963, read)]). + +'!subbox'(903364963, 115, 185, [output(912815430, send), output(912815420, read), output(912746100, read), output(912746100, send), input(903364449, send), output(903364449, send)]). + D./921446829/903364453/912815430 F0:./921446829/903364453/912815430/description F199:./921446829/903364453/912815430/model +% Rehearsal: Thu Sep 5 16:27:48 2002 + +'!box'('Rehearsal', 'Process', [enum("Initialise", 'Each Trial'), boolean("Recurrent", 0), real("Firing Rate", 1.00000)], ''). + +'!property_levels'([0, 0, 0]). + F150:./921446829/903364453/912815430/rules +% Rehearsal: Thu Sep 5 16:27:48 2002 + +'!rule'('Limited-capacity rehearsal channel', [fire_once], [match(Word, 912746100)], [add(Word, 912815420)]). + F0:./921446829/903364453/912815430/messages D./921446829/903364453/912815420 F0:./921446829/903364453/912815420/description F1:./921446829/903364453/912815420/elements.current + F387:./921446829/903364453/912815420/model +% LTS: Thu Sep 5 16:27:48 2002 + +'!box'('LTS', 'Buffer' / 'Propositional', [enum("Initialise", 'Each Trial'), enum("Decay", 'Half-Life'), pos_int("Decay Constant", 25), boolean("Limited Capacity", 0), pos_int("Capacity", 7), enum("On Excess", 'Random'), boolean("Grounded", 1), enum("Access", 'Random'), boolean("Duplicates", 0)], ''). + +'!property_levels'([0, 0, 0, 0, 0, 0, 0, 0, 0]). + F33:./921446829/903364453/912815420/elements +% LTS: Thu Sep 5 16:27:48 2002 + F0:./921446829/903364453/912815420/messages F33:./921446829/903364453/912815420/mapping_rules +% LTS: Thu Sep 5 16:27:48 2002 + F1:./921446829/903364453/912815420/mapped_elements + D./921446829/903364453/903364963 F0:./921446829/903364453/903364963/description F205:./921446829/903364453/903364963/model +% Input/Output: Thu Sep 5 16:27:48 2002 + +'!box'('Input/Output', 'Process', [enum("Initialise", 'Each Trial'), boolean("Recurrent", 1), real("Firing Rate", 1.00000)], ''). + +'!property_levels'([0, 0, 0]). + F530:./921446829/903364453/903364963/rules +% Input/Output: Thu Sep 5 16:27:48 2002 + +'!rule'('Add incoming words to STS', [triggered(word(Word))], [], [add(Word, 912746100)]). + +'!rule'('The recall rule', [refracted, fire_once, triggered(recall)], [recall(Word)], [send(recalled(Word), 903365431), send(recall, 903364963)]). + +'!rule'('Quit rehearsing when recall phase starts', [triggered(recall)], [], [send(stop, 912815430)]). + +'!condition'('Recall from either store', recall, 1, [(recall(Word) :- [match(Word, 912746100)]), (recall(Word) :- [match(Word, 912815420)])]). + F0:./921446829/903364453/903364963/messages D./921446829/903364453/912746100 F0:./921446829/903364453/912746100/description F1:./921446829/903364453/912746100/elements.current + F380:./921446829/903364453/912746100/model +% STS: Thu Sep 5 16:27:48 2002 + +'!box'('STS', 'Buffer' / 'Propositional', [enum("Initialise", 'Each Trial'), enum("Decay", 'None'), pos_int("Decay Constant", 20), boolean("Limited Capacity", 1), pos_int("Capacity", 7), enum("On Excess", 'Random'), boolean("Grounded", 1), enum("Access", 'FIFO'), boolean("Duplicates", 0)], ''). + +'!property_levels'([0, 0, 0, 0, 0, 0, 0, 0, 0]). + F33:./921446829/903364453/912746100/elements +% STS: Thu Sep 5 16:27:48 2002 + F0:./921446829/903364453/912746100/messages F33:./921446829/903364453/912746100/mapping_rules +% STS: Thu Sep 5 16:27:48 2002 + F1:./921446829/903364453/912746100/mapped_elements + F0:./921446829/903364453/messages F0:./921446829/903364453/subboxes.current D./921446829/903364449 F0:./921446829/903364449/description F124:./921446829/903364449/model +% Experimenter: Thu Sep 5 16:27:48 2002 + +'!box'('Experimenter', 'Compound' / 'Generic', [], ''). + +'!property_levels'([]). + F716:./921446829/903364449/subboxes +% Experimenter: Thu Sep 5 16:27:48 2002 + +'!subbox'(903376084, 160, 300, [input(903365431, read), input(903365431, send)]). + +'!subbox'(903375835, 110, 200, [input(903365431, read), input(903365431, send)]). + +'!subbox'(903375178, 320, 35, [output(903365431, send)]). + +'!subbox'(903369132, 150, 40, [input(903365431, send), input(903365431, read)]). + +'!subbox'(903377725, 485, 305, [input(903365431, send)]). + +'!subbox'(903365431, 320, 200, [output(903390619, send), output(903377725, send), output(903376084, read), output(903376084, send), output(903375835, read), output(903375835, send), input(903375178, send), output(903364453, send), output(903369132, send), input(903364453, send), output(903369132, read)]). + D./921446829/903364449/903377725 F0:./921446829/903364449/903377725/description F1:./921446829/903364449/903377725/data.current + F401:./921446829/903364449/903377725/model +% Data table: Thu Sep 5 16:27:48 2002 + +'!box'('Data table', ('Data' / 'Sink') / 'Table', [enum("Initialise", 'Each Session'), char_string("File", "data.current"), enum("Location", 'Local'), char_string("Column Label", "Serial position"), char_string("Row Label", ""), pos_int("Cell Width", 25), pos_int("Cell Height", 20), enum("Sort", 'Alpha')], ''). + +'!property_levels'([0, 0, 0, 0, 0, 0, 0, 0]). + F40:./921446829/903364449/903377725/data +% Data table: Thu Sep 5 16:27:48 2002 + F0:./921446829/903364449/903377725/messages D./921446829/903364449/903369132 F0:./921446829/903364449/903369132/description F315:./921446829/903364449/903369132/elements.current + 0: olive. + 0: purple. + 0: charcoal. + 0: pink. + 0: grey. + 0: cream. + 0: racinggreen. + 0: navy. + 0: skyblue. + 0: russet. + 0: azure. + 0: beige. + 0: mustard. + 0: cyan. + 0: magenta. + 0: brown. + 0: violet. + 0: indigo. + 0: blue. + 0: green. + 0: yellow. + 0: orange. + 0: red. + 0: white. + 0: black. + F394:./921446829/903364449/903369132/model +% word list: Thu Sep 5 16:27:48 2002 + +'!box'('word list', 'Buffer' / 'Propositional', [enum("Initialise", 'Each Trial'), enum("Decay", 'None'), pos_int("Decay Constant", 20), boolean("Limited Capacity", 0), pos_int("Capacity", 7), enum("On Excess", 'Random'), boolean("Grounded", 1), enum("Access", 'Random'), boolean("Duplicates", 0)], ''). + +'!property_levels'([0, 0, 0, 0, 0, 0, 0, 0, 0]). + F828:./921446829/903364449/903369132/elements +% word list: Thu Sep 5 16:27:48 2002 + +'!element'('Nothing', black). + +'!element'('Nothing', white). + +'!element'('Nothing', red). + +'!element'('Nothing', orange). + +'!element'('Nothing', yellow). + +'!element'('Nothing', green). + +'!element'('Nothing', blue). + +'!element'('Nothing', indigo). + +'!element'('Nothing', violet). + +'!element'('Nothing', brown). + +'!element'('Nothing', magenta). + +'!element'('Nothing', cyan). + +'!element'('Nothing', mustard). + +'!element'('Nothing', beige). + +'!element'('Nothing', azure). + +'!element'('Nothing', russet). + +'!element'('Nothing', skyblue). + +'!element'('Nothing', navy). + +'!element'('Nothing', racinggreen). + +'!element'('Nothing', cream). + +'!element'('Nothing', grey). + +'!element'('Nothing', pink). + +'!element'('Nothing', charcoal). + +'!element'('Nothing', purple). + +'!element'('Nothing', olive). + F0:./921446829/903364449/903369132/messages F39:./921446829/903364449/903369132/mapping_rules +% word list: Thu Sep 5 16:27:48 2002 + F1:./921446829/903364449/903369132/mapped_elements + D./921446829/903364449/903375178 F0:./921446829/903364449/903375178/description F44:./921446829/903364449/903375178/data.current +'Nothing': [send(send_word(1), 903365431)]. F136:./921446829/903364449/903375178/model +% start: Thu Sep 5 16:27:48 2002 + +'!box'(start, 'Data' / 'Source', [enum("Initialise", 'Each Trial')], ''). + +'!property_levels'([0]). + F89:./921446829/903364449/903375178/data +% start: Thu Sep 5 16:27:48 2002 + +'!data'('Nothing', [send(send_word(1), 903365431)]). + F0:./921446829/903364449/903375178/messages D./921446829/903364449/903375835 F0:./921446829/903364449/903375835/description F1:./921446829/903364449/903375835/elements.current + F400:./921446829/903364449/903375835/model +% serial record: Thu Sep 5 16:27:48 2002 + +'!box'('serial record', 'Buffer' / 'Propositional', [enum("Initialise", 'Each Trial'), enum("Decay", 'None'), pos_int("Decay Constant", 20), boolean("Limited Capacity", 0), pos_int("Capacity", 7), enum("On Excess", 'Random'), boolean("Grounded", 1), enum("Access", 'LIFO'), boolean("Duplicates", 0)], ''). + +'!property_levels'([0, 0, 0, 0, 0, 0, 0, 0, 0]). + F43:./921446829/903364449/903375835/elements +% serial record: Thu Sep 5 16:27:48 2002 + F0:./921446829/903364449/903375835/messages F43:./921446829/903364449/903375835/mapping_rules +% serial record: Thu Sep 5 16:27:48 2002 + F1:./921446829/903364449/903375835/mapped_elements + D./921446829/903364449/903376084 F0:./921446829/903364449/903376084/description F489:./921446829/903364449/903376084/elements.current + 0: stats(25, 0). + 0: stats(24, 0). + 0: stats(23, 0). + 0: stats(22, 0). + 0: stats(21, 0). + 0: stats(20, 0). + 0: stats(19, 0). + 0: stats(18, 0). + 0: stats(17, 0). + 0: stats(16, 0). + 0: stats(15, 0). + 0: stats(14, 0). + 0: stats(13, 0). + 0: stats(12, 0). + 0: stats(11, 0). + 0: stats(10, 0). + 0: stats(9, 0). + 0: stats(8, 0). + 0: stats(7, 0). + 0: stats(6, 0). + 0: stats(5, 0). + 0: stats(4, 0). + 0: stats(3, 0). + 0: stats(2, 0). + 0: stats(1, 0). + 0: total_trials(0). + F410:./921446829/903364449/903376084/model +% serial statistics: Thu Sep 5 16:27:48 2002 + +'!box'('serial statistics', 'Buffer' / 'Propositional', [enum("Initialise", 'Each Session'), enum("Decay", 'None'), pos_int("Decay Constant", 20), boolean("Limited Capacity", 0), pos_int("Capacity", 7), enum("On Excess", 'Random'), boolean("Grounded", 1), enum("Access", 'LIFO'), boolean("Duplicates", 0)], ''). + +'!property_levels'([0, 0, 0, 0, 0, 0, 0, 0, 0]). + F1029:./921446829/903364449/903376084/elements +% serial statistics: Thu Sep 5 16:27:48 2002 + +'!element'('Nothing', total_trials(0)). + +'!element'('Nothing', stats(1, 0)). + +'!element'('Nothing', stats(2, 0)). + +'!element'('Nothing', stats(3, 0)). + +'!element'('Nothing', stats(4, 0)). + +'!element'('Nothing', stats(5, 0)). + +'!element'('Nothing', stats(6, 0)). + +'!element'('Nothing', stats(7, 0)). + +'!element'('Nothing', stats(8, 0)). + +'!element'('Nothing', stats(9, 0)). + +'!element'('Nothing', stats(10, 0)). + +'!element'('Nothing', stats(11, 0)). + +'!element'('Nothing', stats(12, 0)). + +'!element'('Nothing', stats(13, 0)). + +'!element'('Nothing', stats(14, 0)). + +'!element'('Nothing', stats(15, 0)). + +'!element'('Nothing', stats(16, 0)). + +'!element'('Nothing', stats(17, 0)). + +'!element'('Nothing', stats(18, 0)). + +'!element'('Nothing', stats(19, 0)). + +'!element'('Nothing', stats(20, 0)). + +'!element'('Nothing', stats(21, 0)). + +'!element'('Nothing', stats(22, 0)). + +'!element'('Nothing', stats(23, 0)). + +'!element'('Nothing', stats(24, 0)). + +'!element'('Nothing', stats(25, 0)). + F0:./921446829/903364449/903376084/messages F47:./921446829/903364449/903376084/mapping_rules +% serial statistics: Thu Sep 5 16:27:48 2002 + F1:./921446829/903364449/903376084/mapped_elements + D./921446829/903364449/903365431 F0:./921446829/903364449/903365431/description F209:./921446829/903364449/903365431/model +% expter process: Thu Sep 5 16:31:19 2002 + +'!box'('expter process', 'Process', [enum("Initialise", 'Each Trial'), boolean("Recurrent", 1), real("Firing Rate", 1.00000)], ''). + +'!property_levels'([0, 0, 0]). + F2328:./921446829/903364449/903365431/rules +% expter process: Thu Sep 5 16:31:19 2002 + +'!rule'('Maintain a total trials counter, to allow arbitrary block structure', [refracted], [clock(1), match(total_trials(Trials), 903376084), Trials1 is Trials + 1], [delete(total_trials(Trials), 903376084), add(total_trials(Trials1), 903376084)]). + +'!rule'('Send one word to S every cycle', [triggered(send_word(N))], [once([match(Word, 903369132)]), N1 is N + 1], [send(word(Word), 903364963), add(word(N, Word), 903375835), delete(Word, 903369132), send(send_word(N1), 903365431)]). + +'!rule'('When words exhausted, tell S to start recall', [refracted], [not [match(_, 903369132)]], [send(recall, 903364963)]). + +'!rule'('Get recalled word''s ser pos, increment the tally, and update table', [triggered(recalled(Word))], [match(word(N, Word), 903375835), match(stats(N, Total), 903376084), Total1 is Total + 1, number_atom(N, Nat)], [delete(stats(N, Total), 903376084), add(stats(N, Total1), 903376084), send(data(freq, Nat, Total1), 903377725)]). + +'!condition'('Make 2-digit atom from number', number_atom, 2, [(number_atom(Number, Atom) :- [call(name(Number, String)), append("0", String, Zeroed), append(_, [A, B], Zeroed), call(name(Atom, [A, B]))])]). + +'!rule'('system quiescence indicates end of recall, so graph results', [triggered(system_quiescent), refracted], [], [send(draw_graph, 903365431)]). + +'!rule'('Graph results after recall finished', [triggered(draw_graph)], [Labels = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], get_percentages(0, 25, Percentages), match(total_trials(Trials), 903376084)], [delete_all(_, 867629775), add(obs = 25, 867629775), add(no_of_series = 1, 867629775), add(y_range = 0 to 100, 867629775), add(y_scale_unit = 20, 867629775), add(y_label = '% recall '(n = Trials), 867629775), add(series(1) = Percentages, 867629775), add(name(1) = recall, 867629775), add(category_names = Labels, 867629775), add(x_label = 'Serial position', 867629775), send(graph(chart1), 861216060)]). + +'!condition'('Calculate percentage score for each serial position', get_percentages, 3, [(get_percentages(X, X, []) :- ['!']), (get_percentages(Start, Fin, [H|T]) :- [N is Start + 1, match(stats(N, Freq), 903376084), match(total_trials(Trial), 903376084), H is 100 * (Freq / Trial), get_percentages(N, Fin, T)])]). + F0:./921446829/903364449/903365431/messages F0:./921446829/903364449/messages F0:./921446829/903364449/subboxes.current D./921446829/903390619 F0:./921446829/903390619/description F126:./921446829/903390619/model +% graph package: Thu Sep 5 16:27:48 2002 + +'!box'('graph package', 'Compound' / 'Generic', [], ''). + +'!property_levels'([]). + F608:./921446829/903390619/subboxes +% graph package: Thu Sep 5 16:27:48 2002 + +'!subbox'(864145229, 70, 110, [input(861216060, read), input(861216060, send)]). + +'!subbox'(867629775, 220, 110, [input(903364449, send), input(861216060, send), input(861216060, read)]). + +'!subbox'(867770884, 490, 115, [input(861216060, send), input(861216060, read)]). + +'!subbox'(864077783, 320, 300, [input(861216060, send)]). + +'!subbox'(861216060, 320, 185, [input(903364449, send), output(864077783, send), output(867770884, read), output(867770884, send), output(867629775, read), output(867629775, send), output(864145229, send), output(864145229, read)]). + D./921446829/903390619/864077783 F143:./921446829/903390619/864077783/description +It's a good idea to have point movement off, or your graph will look terrible. +Duplicates should be set to "yes" or else it will be very slow. F1:./921446829/903390619/864077783/elements.current + F678:./921446829/903390619/864077783/model +% graph display: Thu Sep 5 16:27:48 2002 + +'!box'('graph display', 'Buffer' / 'Analogue', [enum("Initialise", 'Each Session'), enum("Decay", 'None'), pos_int("Decay Constant", 20), boolean("Limited Capacity", 0), pos_int("Capacity", 7), enum("On Excess", 'Random'), boolean("Grounded", 1), enum("Access", 'Random'), boolean("Duplicates", 1), enum("Dimensionality", '2D'), boolean("Point Movement", 0), real("Variance", 1.00000), boolean("Continuity", 1), real("Granularity", 1.00000), boolean("Colour", 1), real("X Scale", 1.00000, 0.00000, 10.00000), real("Y Scale", 1.00000, 0.00000, 10.00000)], ''). + +'!property_levels'([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]). + F43:./921446829/903390619/864077783/elements +% graph display: Thu Sep 5 16:27:48 2002 + F0:./921446829/903390619/864077783/messages D./921446829/903390619/867770884 F0:./921446829/903390619/867770884/description F407:./921446829/903390619/867770884/elements.current + 0: x_axis=0. + 0: error=on. + 0: bar_width=ext_float(0.6, 858993459, 1071854387). + 0: cluster=on. + 0: bars=off. + 0: marker_size=4. + 0: marker=on. + 0: line=on. + 0: name(_G3441)=[series(_G3441), error(_G3441)]. + 0: ylen=300. + 0: ytop=50. + 0: xlen=500. + 0: xorig=50. + 0: scale_units=[5, ext_float(2.5, 0, 1074003968), 2, 1]. + 0: primary_axis=on. + 0: marker_types=[circle, square, times, plus]. + F410:./921446829/903390619/867770884/model +% Default properties: Thu Sep 5 16:27:48 2002 + +'!box'('Default properties', 'Buffer' / 'Propositional', [enum("Initialise", 'Each Block'), enum("Decay", 'None'), pos_int("Decay Constant", 20), boolean("Limited Capacity", 0), pos_int("Capacity", 7), enum("On Excess", 'Random'), boolean("Grounded", 1), enum("Access", 'LIFO'), boolean("Duplicates", 0)], ''). + +'!property_levels'([0, 0, 0, 0, 0, 0, 0, 0, 0]). + F1064:./921446829/903390619/867770884/elements +% Default properties: Thu Sep 5 16:27:48 2002 + +'!element'('preferred order of marker types', marker_types = [circle, square, times, plus]). + +'!element'('plot on primary Y axis by default', primary_axis = on). + +'!element'('Nothing', scale_units = [5, 2.50000, 2, 1]). + +'!element'('X position of left of scale in pixels', xorig = 50). + +'!element'('default X scale size in pixels', xlen = 500). + +'!element'('Y position of top of scale in pixels', ytop = 50). + +'!element'('default Y scale size in pixels', ylen = 300). + +'!element'('Default names for mean and error series', name(X) = [series(X), error(X)]). + +'!element'('line chart on by default', line = on). + +'!element'('markers on by default', marker = on). + +'!element'('size of markers in pixels', marker_size = 4). + +'!element'('bar chart off by default', bars = off). + +'!element'('Default bar chart type is cluster', cluster = on). + +'!element'('bar width as proportion of maximum size', bar_width = 0.60000). + +'!element'('error bars on by default', error = on). + +'!element'('floating x_axis at 0', x_axis = 0). + F0:./921446829/903390619/867770884/messages F48:./921446829/903390619/867770884/mapping_rules +% Default properties: Thu Sep 5 16:27:48 2002 + F1:./921446829/903390619/867770884/mapped_elements + D./921446829/903390619/867629775 F0:./921446829/903390619/867629775/description F1:./921446829/903390619/867629775/elements.current + F410:./921446829/903390619/867629775/model +% chart 1 properties: Thu Sep 5 16:27:48 2002 + +'!box'('chart 1 properties', 'Buffer' / 'Propositional', [enum("Initialise", 'Each Block'), enum("Decay", 'None'), pos_int("Decay Constant", 20), boolean("Limited Capacity", 0), pos_int("Capacity", 7), enum("On Excess", 'Random'), boolean("Grounded", 1), enum("Access", 'LIFO'), boolean("Duplicates", 0)], ''). + +'!property_levels'([0, 0, 0, 0, 0, 0, 0, 0, 0]). + F48:./921446829/903390619/867629775/elements +% chart 1 properties: Thu Sep 5 16:27:48 2002 + F0:./921446829/903390619/867629775/messages F48:./921446829/903390619/867629775/mapping_rules +% chart 1 properties: Thu Sep 5 16:27:48 2002 + F1:./921446829/903390619/867629775/mapped_elements + D./921446829/903390619/864145229 F0:./921446829/903390619/864145229/description F1:./921446829/903390619/864145229/elements.current + F410:./921446829/903390619/864145229/model +% chart 2 properties: Thu Sep 5 16:27:48 2002 + +'!box'('chart 2 properties', 'Buffer' / 'Propositional', [enum("Initialise", 'Each Block'), enum("Decay", 'None'), pos_int("Decay Constant", 20), boolean("Limited Capacity", 0), pos_int("Capacity", 7), enum("On Excess", 'Random'), boolean("Grounded", 1), enum("Access", 'LIFO'), boolean("Duplicates", 0)], ''). + +'!property_levels'([0, 0, 0, 0, 0, 0, 0, 0, 0]). + F48:./921446829/903390619/864145229/elements +% chart 2 properties: Thu Sep 5 16:27:48 2002 + F0:./921446829/903390619/864145229/messages F48:./921446829/903390619/864145229/mapping_rules +% chart 2 properties: Thu Sep 5 16:27:48 2002 + F1:./921446829/903390619/864145229/mapped_elements + D./921446829/903390619/861216060 F0:./921446829/903390619/861216060/description F201:./921446829/903390619/861216060/model +% draw graph: Thu Sep 5 16:27:48 2002 + +'!box'('draw graph', 'Process', [enum("Initialise", 'Each Trial'), boolean("Recurrent", 1), real("Firing Rate", 1.00000)], ''). + +'!property_levels'([0, 0, 0]). + F25531:./921446829/903390619/861216060/rules +% draw graph: Thu Sep 5 16:27:48 2002 + +'!comment'('***************************************INITIALISATION*****************************'). + +'!rule'('------------------------calculate scale----------------------', [triggered(graph(Chart)), refracted], [not [property_test(xy_pair, _, Chart)], not [property_test(y_range, _, Chart)], property_test(cluster, on, Chart), property_test(error, ErrBars, Chart), findall(Set, [get_series(_, Set, _, Chart)], Datasets), maxminlist(Datasets, Extremes, ErrBars), sort(Extremes, Sorted), first_element(Sorted, Min1), last_element(Sorted, Max1), property_test(scale_units, ScaleUnits, Chart), once([decide_unit(Min1, Max1, ScaleUnits, 1, Unit, Min, Max)])], [send(add(Chart, y_range = Min to Max), 861216060), send(add(Chart, y_scale_unit = Unit), 861216060), send(graph(Chart), 861216060)]). + +'!rule'('y scale for XY chart', [triggered(graph(Chart)), refracted], [property_test(xy_pair, _, Chart), not [property_test(y_range, _, Chart)], property_test(error, ErrBars, Chart), findall(Set, [y_series(Set, Chart)], Datasets), maxminlist(Datasets, Extremes, ErrBars), sort(Extremes, Sorted), first_element(Sorted, Min1), last_element(Sorted, Max1), property_test(scale_units, ScaleUnits, Chart), once([decide_unit(Min1, Max1, ScaleUnits, 1, Unit, Min, Max)])], [send(add(Chart, y_range = Min to Max), 861216060), send(add(Chart, y_scale_unit = Unit), 861216060), send(graph(Chart), 861216060)]). + +'!rule'('x scale for XY chart', [triggered(graph(Chart)), refracted], [property_test(xy_pair, _, Chart), not [property_test(x_range, _, Chart)], property_test(error, ErrBars, Chart), findall(Set, [x_series(Set, Chart)], Datasets), maxminlist(Datasets, Extremes, ErrBars), sort(Extremes, Sorted), first_element(Sorted, Min1), last_element(Sorted, Max1), property_test(scale_units, ScaleUnits, Chart), once([decide_unit(Min1, Max1, ScaleUnits, 1, Unit, Min, Max)])], [send(add(Chart, x_range = Min to Max), 861216060), send(add(Chart, x_scale_unit = Unit), 861216060), send(graph(Chart), 861216060)]). + +'!rule'('calculate scale for stacked chart', [triggered(graph(Chart)), refracted], [not [property_test(xy_pair, _, Chart)], not [property_test(y_range, _, Chart)], property_test(cluster, off, Chart), property_test(obs, N, Chart), property_test(stacked_series, SeriesNos, Chart), findall(Sum, [get_sums(N, SeriesNos, Sum, Chart)], Sums), maxmin(Sums, Max1, _, off), property_test(scale_units, ScaleUnits, Chart), once([decide_unit(1, Max1, ScaleUnits, 1, Unit, Min, Max)])], [send(add(Chart, y_range = Min to Max), 861216060), send(add(Chart, y_scale_unit = Unit), 861216060), send(graph(Chart), 861216060)]). + +'!rule'('Compute nos of observations and series if required', [triggered(graph(Chart)), refracted], [not [property_test(xy_pair, _, Chart)], not [property_test(obs, _, Chart), property_test(no_of_series, _, Chart)], findall(Points, [get_series(_, Points, _, Chart)], Pointlists), call(maplist(length, Pointlists, Lengths)), standard_deviation(Lengths, 0), Lengths = [N|_], length(Pointlists, Nseries)], [send(add(Chart, obs = N), 861216060), send(add(Chart, no_of_series = Nseries), 861216060), send(graph(Chart), 861216060)]). + +'!rule'('Compute series list for stacked bar chart if required', [triggered(graph(Chart)), refracted], [not [property_test(xy_pair, _, Chart)], property_test(bar, on, Chart), property_test(cluster, off, Chart), not [property_test(stacked_series, _, Chart)], findall(SeriesNo, [get_series(SeriesNo, _, _, Chart)], SeriesNos)], [send(add(Chart, stacked_series = SeriesNos), 861216060), send(graph(Chart), 861216060)]). + +'!rule'('Get default list of marker types if required', [triggered(graph(Chart)), refracted], [property_test(marker, on, Chart), not [property_test(marker_types, _, Chart)], findall(Mark, [draw_marker(Mark, 0, name, (0 , 0), _)], MarkTypes)], [send(add(Chart, marker_types = MarkTypes), 861216060), send(graph(Chart), 861216060)]). + +'!condition'('------------ various conditions for scaling--------------------', maxminlist, 3, [(maxminlist([], [], _) :- []), (maxminlist([List|Rest], [Min, Max|NewRest], Type) :- [maxmin(List, Max, Min, Type), maxminlist(Rest, NewRest, Type)])]). + +'!condition'('get max and min values in list', maxmin, 4, [(maxmin(List, Max, Min, Type) :- [call(maplist(getmax(Type), List, Maxes)), call(maplist(getmin(Type), List, Mins)), append(Mins, Maxes, Extremes), sort(Extremes, Sorted), first_element(Sorted, Min), last_element(Sorted, Max)])]). + +'!condition'('Pick a good set of scale values', decide_unit, 7, [(decide_unit(Min1, Max1, ScaleFactors, Mag, MagUnit, Min, Max) :- [member(Unit, ScaleFactors), MagUnit is Mag * Unit, Klicks is (Max1 - Min1) / MagUnit, Klicks >= 5, Klicks < 10, Min is MagUnit * round(Min1 / MagUnit - 0.50000), Max is MagUnit * round(Max1 / MagUnit + 0.50000)]), (decide_unit(Min1, Max1, ScaleFactors, Mag, MagUnit, Min, Max) :- [not [member(Unit, ScaleFactors), Klicks is (Max1 - Min1) / (Mag * Unit), Klicks < 10], NewMag is Mag * 10, decide_unit(Min1, Max1, ScaleFactors, NewMag, MagUnit, Min, Max)]), (decide_unit(Min1, Max1, ScaleFactors, Mag, MagUnit, Min, Max) :- [not [member(Unit, ScaleFactors), Klicks is (Max1 - Min1) / (Mag * Unit), Klicks >= 5], NewMag is Mag / 10, decide_unit(Min1, Max1, ScaleFactors, NewMag, MagUnit, Min, Max)])]). + +'!comment'('********************************** GRAPH DRAWING ********************************'). + +'!rule'('-----------------------draw axes---------------------------', [triggered(graph(Chart)), refracted], [property_test(primary_axis, on, Chart), property_test(y_range, Min to Max, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), x_axis(Min, Max, Xaxis, Chart), Yscale is Ylen / (Max - Min), Axes = [(Xorig , Ytop), (Xorig , Yorig), (Xorig + Xlen , Yorig)]], [delete_all(polyline(primary_axes, _, _), 864077783), delete_all(line(primary_axes, _, _), 864077783), add(polyline(primary_axes, Axes, [colour(black)]), 864077783), add(line(primary_axes, (Xorig , Yorig - Yscale * (Xaxis - Min)) to (Xorig + Xlen , Yorig - Yscale * (Xaxis - Min)), [colour(black), weight(0), style(dash)]), 864077783)]). + +'!rule'('label primary axis', [triggered(graph(Chart)), refracted], [property_test(primary_axis, on, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), property_test(y_label, Text, Chart)], [delete_all(text(primary_axes, _, _), 864077783), add(text(primary_axes, Text aligned (c , b) at (Xorig , Ytop - 10), [colour(black)]), 864077783)]). + +'!rule'('secondary y-axis', [triggered(graph(Chart)), refracted], [property_test(primary_axis, off, Chart), property_test(y_range, Min to Max, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), x_axis(Min, Max, Xaxis, Chart), Yscale is Ylen / (Max - Min), Axes = [(Xorig , Yorig), (Xorig + Xlen , Yorig), (Xorig + Xlen , Ytop)]], [delete_all(polyline(secondary_axes, _, _), 864077783), delete_all(line(secondary_axes, _, _), 864077783), add(polyline(secondary_axes, Axes, [colour(black)]), 864077783), add(line(secondary_axes, (Xorig , Yorig - Yscale * (Xaxis - Min)) to (Xorig + Xlen , Yorig - Yscale * (Xaxis - Min)), [colour(black)]), 864077783)]). + +'!rule'('label secondary axis', [triggered(graph(Chart)), refracted], [property_test(primary_axis, off, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), property_test(y_label, Text, Chart)], [delete_all(text(secondary_axes, _, _), 864077783), add(text(secondary_axes, Text aligned (c , b) at (Xorig + Xlen , Ytop - 10), [colour(black)]), 864077783)]). + +'!rule'('Mark primary Y-axis', [triggered(graph(Chart)), refracted], [property_test(primary_axis, on, Chart), property_test(y_range, Min to Max, Chart), property_test(y_scale_unit, Yunit, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), Yscale is Ylen / (Max - Min), for(Yvalue, Min, Max, Yunit), Ycoord is Yorig - (Yvalue - Min) * Yscale, Line = (Xorig , Ycoord) to (Xorig - 3 , Ycoord)], [delete_all(line(primary_labels, _, _), 864077783), delete_all(text(primary_labels, _, _), 864077783), add(line(primary_labels, Line, [colour(black)]), 864077783), add(text(primary_labels, Yvalue aligned (r , c) at (Xorig - 8 , Ycoord), [colour(black)]), 864077783)]). + +'!rule'('Mark secondary Y-axis', [triggered(graph(Chart)), refracted], [property_test(primary_axis, off, Chart), property_test(y_range, Min to Max, Chart), property_test(y_scale_unit, Yunit, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), Yscale is Ylen / (Max - Min), Xend is Xorig + Xlen, for(Yvalue, Min, Max, Yunit), Ycoord is Yorig - (Yvalue - Min) * Yscale, Line = (Xend , Ycoord) to (Xend + 3 , Ycoord)], [delete_all(line(secondary_labels, _, _), 864077783), delete_all(text(secondary_labels, _, _), 864077783), add(line(secondary_labels, Line, [colour(black)]), 864077783), add(text(secondary_labels, Yvalue aligned (l , c) at (Xend + 8 , Ycoord), [colour(black)]), 864077783)]). + +'!rule'('Mark X-axis', [triggered(graph(Chart)), refracted], [property_test(x_range, Min to Max, Chart), property_test(x_scale_unit, Xunit, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), Xscale is Xlen / (Max - Min), for(Xvalue, Min, Max, Xunit), Xcoord is Xorig + (Xvalue - Min) * Xscale, Line = (Xcoord , Yorig) to (Xcoord , Yorig + 3)], [delete_all(line(x_labels, _, _), 864077783), delete_all(text(x_labels, _, _), 864077783), add(line(x_labels, Line, [colour(black)]), 864077783), add(text(x_labels, Xvalue aligned (c , t) at (Xcoord , Yorig + 8), [colour(black)]), 864077783)]). + +'!rule'('write X-axis category names', [triggered(graph(Chart)), refracted], [not [property_test(xy_pair, _, Chart)], not [property_test(bar, off, Chart), property_test(line, off, Chart), property_test(marker, off, Chart)], dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), property_test(obs, N, Chart), property_test(category_names, Names, Chart), Xinterval is Xlen / N, call(nth1(CategNo, Names, Name)), Xcoord is Xorig + CategNo * Xinterval], [delete_all(text(x_categ, _, _), 864077783), delete_all(line(x_categ, _, _), 864077783), add(text(x_categ, Name aligned (c , t) at (Xcoord - Xinterval / 2 , Yorig + 8), [colour(black)]), 864077783), add(line(x_categ, (Xcoord , Yorig) to (Xcoord , Yorig + 3), [colour(black)]), 864077783)]). + +'!rule'('X axis label', [triggered(graph(Chart)), refracted], [property_test(x_label, Text, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart)], [delete_all(text(x_title, _, _), 864077783), add(text(x_title, Text aligned (c , t) at (Xorig + Xlen / 2 , Yorig + 20), [colour(black)]), 864077783)]). + +'!comment'('********************************* X-Y Charts ********************************'). + +'!rule'('---------------------- X-Y marker chart---------------------', [triggered(graph(Chart)), refracted], [property_test(xy_pair, _, Chart), property_test(marker, on, Chart), property_test(y_range, MinY to MaxY, Chart), property_test(x_range, MinX to MaxX, Chart), property_test(marker_size, MarkSize, Chart), property_test(marker_types, MarkTypes, Chart), length(MarkTypes, Nmarkers), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), Yscale is Ylen / (MaxY - MinY), Xscale is Xlen / (MaxX - MinX), findall(Pair, [property_read(xy_pair, Pair, Chart)], Pairs), call(nth0(PairNo, Pairs, (XSNo , YSNo))), get_series(XSNo, XValues, XNames, Chart), get_mean(XNames, XName), get_series(YSNo, YValues, YNames, Chart), get_mean(YNames, YName), MarkNo is PairNo mod Nmarkers, call(nth0(MarkNo, MarkTypes, MarkType)), call(nth1(ObsNo, XValues, XValue)), get_mean(XValue, XMean), scale_horizontal(Xscale, MinX, Xorig, XMean, Xcoord), call(nth1(ObsNo, YValues, YValue)), get_mean(YValue, YMean), scale_vertical(Yscale, MinY, Yo -rig, YMean, Ycoord), draw_marker(MarkType, MarkSize, (XName , YName), (Xcoord , Ycoord), MarkObj, DelObj)], [delete_all(DelObj, 864077783), add(MarkObj, 864077783)]). + +'!rule'('-----------------Draw Y error bars (for XY chart)---------------', [triggered(graph(Chart)), refracted], [property_test(xy_pair, _, Chart), property_test(error, on, Chart), property_test(x_range, MinX to MaxX, Chart), property_test(y_range, MinY to MaxY, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), Xscale is Xlen / (MaxX - MinX), Yscale is Ylen / (MaxY - MinY), property_read(xy_pair, (XSNo , YSNo), Chart), get_series(XSNo, XPoints, XNames, Chart), get_err(XNames, XName), get_series(YSNo, YPoints, YNames, Chart), get_err(YNames, YName), call(nth1(ObsNo, XPoints, Xvalue)), get_mean(Xvalue, Xmean), scale_horizontal(Xscale, MinX, Xorig, Xmean, Xcoord), call(nth1(ObsNo, YPoints, Yvalue)), y_error_bar(Yscale, 3, MinY, Yorig, (Xcoord , Yvalue), ErrBar)], [delete_all(polyline((XName , YName), _), 864077783), add(polyline((XName , YName), ErrBar), 864077783)]). + +'!rule'('-----------------Draw X error bars (for XY chart)---------------', [triggered(graph(Chart)), refracted], [property_test(xy_pair, _, Chart), property_test(error, on, Chart), property_test(x_range, MinX to MaxX, Chart), property_test(y_range, MinY to MaxY, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), Xscale is Xlen / (MaxX - MinX), Yscale is Ylen / (MaxY - MinY), property_read(xy_pair, (XSNo , YSNo), Chart), get_series(XSNo, XPoints, XNames, Chart), get_err(XNames, XName), get_series(YSNo, YPoints, YNames, Chart), get_err(YNames, YName), call(nth1(ObsNo, YPoints, Yvalue)), get_mean(Yvalue, Ymean), scale_vertical(Yscale, MinY, Yorig, Ymean, Ycoord), call(nth1(ObsNo, XPoints, Xvalue)), x_error_bar(Xscale, 3, MinX, Xorig, (Xvalue , Ycoord), ErrBar)], [delete_all(polyline((XName , YName), _), 864077783), add(polyline((XName , YName), ErrBar), 864077783)]). + +'!comment'('****************************Categorical charts****************************'). + +'!rule'('----------------------Draw line chart--------------------------', [triggered(graph(Chart)), refracted], [not [property_test(xy_pair, _, Chart)], property_test(line, on, Chart), property_test(y_range, Min to Max, Chart), property_test(obs, N, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), Yscale is Ylen / (Max - Min), Xoffset is Xorig + Xlen / (N * 2), Xinterval is Xlen / N, get_series(Series, Points, Names, Chart), get_mean(Names, Name), call(maplist(get_mean, Points, Means)), call(maplist(scale_vertical(Yscale, Min, Yorig), Means, Yvalues)), x_spacing(Xoffset, Xinterval, Yvalues, Line)], [delete_all(polyline(Name, _), 864077783), add(polyline(Name, Line), 864077783)]). + +'!rule'('----------------------Draw marker chart---------------------', [triggered(graph(Chart)), refracted], [not [property_test(xy_pair, _, Chart)], property_test(marker, on, Chart), property_test(y_range, Min to Max, Chart), property_test(obs, N, Chart), property_test(marker_size, MarkSize, Chart), property_test(marker_types, MarkTypes, Chart), length(MarkTypes, Nmarkers), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), Yscale is Ylen / (Max - Min), Xoffset is Xorig + Xlen / (N * 2), Xinterval is Xlen / N, get_series(Series, Values, Names, Chart), get_mean(Names, Name), MarkNo is 1 + (Series - 1) mod Nmarkers, call(nth1(MarkNo, MarkTypes, MarkType)), call(maplist(get_mean, Values, Means)), call(maplist(scale_vertical(Yscale, Min, Yorig), Means, Yvalues)), x_spacing(Xoffset, Xinterval, Yvalues, Points), member(Point, Points), draw_marker(MarkType, MarkSize, Name, Point, MarkObj, DelObj)], [delete_all(DelObj, 864077783), add(MarkObj, 864077783)]). + +'!rule'('-------------------Draw cluster bar chart---------------------', [triggered(graph(Chart)), refracted], [not [property_test(xy_pair, _, Chart)], property_test(bar, on, Chart), property_test(cluster, on, Chart), property_test(y_range, Min to Max, Chart), property_test(obs, N, Chart), property_test(no_of_series, Nseries, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), property_test(bar_width, BarFactor, Chart), x_axis(Min, Max, Xaxis, Chart), Yscale is Ylen / (Max - Min), BarSpace is Xlen / (N * Nseries), BarSize is BarSpace * BarFactor, Xinterval is Xlen / N, get_series(Series, Points, Names, Chart), get_mean(Names, Name), call(maplist(get_mean, Points, Means)), Xoffset is (Xorig + BarSpace / 2) + (Series - 1) * BarSpace, x_spacing(Xoffset, Xinterval, Means, HalfCoded), member((Xmid , Mean), HalfCoded)], [delete_all(box(Name, _), 864077783), add(box(Name, (BarSize , (Mean - Xaxis) * Yscale) aligned (c , b) at (Xmid , Yorig - (Xaxis - Min) * Yscale)), 864077783)]). + +'!rule'('--------------------Draw stacked bar chart-------------------', [triggered(graph(Chart)), refracted], [not [property_test(xy_pair, _, Chart)], property_test(bar, on, Chart), property_test(cluster, off, Chart), property_test(y_range, Min to Max, Chart), property_test(obs, N, Chart), property_test(no_of_series, Nseries, Chart), property_test(stacked_series, SeriesNos, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), property_test(bar_width, BarFactor, Chart), x_axis(Min, Max, Xaxis, Chart), Yscale is Ylen / (Max - Min), BarSpace is Xlen / N, BarSize is BarSpace * BarFactor, append(BaseSeries, [Series|_], SeriesNos), get_series(Series, Points, Names, Chart), get_mean(Names, Name), call(maplist(get_mean, Points, Means)), Xoffset is Xorig + BarSpace / 2, x_spacing(Xoffset, BarSpace, Means, HalfCoded), call(nth1(ObsNo, HalfCoded, (Xmid , Mean))), sum_across_lists(ObsNo, BaseSeries, Base, Chart)], [delete_all(box(Name, _), 864077783), add(box(Name, (BarSize , (Mean - Xaxis) * Yscale) aligned (c - , b) at (Xmid , Yorig - ((Xaxis + Base) - Min) * Yscale)), 864077783)]). + +'!rule'('-----------------Draw error bars (for non-bar chart)---------------', [triggered(graph(Chart)), refracted], [not [property_test(xy_pair, _, Chart)], property_test(bar, off, Chart), property_test(error, on, Chart), property_test(y_range, Min to Max, Chart), property_test(obs, N, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), Yscale is Ylen / (Max - Min), Xoffset is Xorig + Xlen / (N * 2), Xinterval is Xlen / N, get_series(Series, Points, Names, Chart), get_err(Names, Name), x_spacing(Xoffset, Xinterval, Points, HalfCoded), member(HalfC, HalfCoded), y_error_bar(Yscale, 3, Min, Yorig, HalfC, ErrBar)], [delete_all(polyline(Name, _), 864077783), add(polyline(Name, ErrBar), 864077783)]). + +'!rule'('Draw error bars for cluster bar chart', [triggered(graph(Chart)), refracted], [not [property_test(xy_pair, _, Chart)], property_test(bar, on, Chart), property_test(cluster, on, Chart), property_test(error, on, Chart), property_test(y_range, Min to Max, Chart), property_test(obs, N, Chart), property_test(no_of_series, Nseries, Chart), dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart), Yscale is Ylen / (Max - Min), BarWidth is Xlen / (N * Nseries), Xinterval is Xlen / N, get_series(Series, Points, Names, Chart), get_err(Names, Name), Xoffset is (Xorig + BarWidth / 2) + (Series - 1) * BarWidth, x_spacing(Xoffset, Xinterval, Points, HalfCoded), member(HalfC, HalfCoded), y_error_bar(Yscale, 3, Min, Yorig, HalfC, ErrBar)], [delete_all(polyline(Name, _), 864077783), add(polyline(Name, ErrBar), 864077783)]). + +'!condition'('----------------compute graphics -------------------------', scale_vertical, 5, [(scale_vertical(Factor, Min, Yorig, (X , Y), (X , Yorig - (Y - Min) * Factor)) :- ['!']), (scale_vertical(Factor, Min, Yorig, Y, Yorig - (Y - Min) * Factor) :- [])]). + +'!condition'('', scale_horizontal, 5, [(scale_horizontal(Factor, Min, Xorig, X, Xorig + (X - Min) * Factor) :- [])]). + +'!condition'('generate Y-axis error bar polyline', y_error_bar, 6, [(y_error_bar(Yscale, Width, Min, Yorig, (Xmid , [Mean, Err]), PolyLine) :- [Top is Yorig - ((Mean - Err) - Min) * Yscale, Bottom is Yorig - ((Mean + Err) - Min) * Yscale, Left is Xmid - Width, Right is Xmid + Width, PolyLine = [(Left , Top), (Right , Top), (Xmid , Top), (Xmid , Bottom), (Left , Bottom), (Right , Bottom)]])]). + +'!condition'('generate X-axis error bar polyline', x_error_bar, 6, [(x_error_bar(Xscale, Width, Min, Xorig, ([Mean, Err] , Ymid), PolyLine) :- [Top is Ymid - Width, Bottom is Ymid + Width, Left is Xorig + ((Mean - Err) - Min) * Xscale, Right is Xorig + ((Mean + Err) - Min) * Xscale, PolyLine = [(Left , Top), (Left , Bottom), (Left , Ymid), (Right , Ymid), (Right , Top), (Right , Bottom)]])]). + +'!condition'('Draw a marker (various types)', draw_marker, 6, [(draw_marker(times, Size, Name, (X , Y), polyline(Name, PolyLine, []), polyline(Name, _, _)) :- [Top is Y + Size, Bottom is Y - Size, Left is X - Size, Right is X + Size, PolyLine = [(Left , Top), (Right , Bottom), (X , Y), (Right , Top), (Left , Bottom)]]), (draw_marker(square, Size, Name, Centre, box(Name, (Size * 2 , Size * 2) aligned (c , c) at Centre, [weight(1)]), box(Name, _, _)) :- []), (draw_marker(circle, Size, Name, Centre, circle(Name, Size at Centre, [weight(1)]), circle(Name, _, _)) :- []), (draw_marker(plus, Size, Name, (X , Y), polyline(Name, PolyLine, []), polyline(Name, _, _)) :- [Top is Y + Size, Bottom is Y - Size, Left is X - Size, Right is X + Size, PolyLine = [(Left , Y), (Right , Y), (X , Y), (X , Top), (X , Bottom)]])]). + +'!ignore'('!condition'('Draw a marker (various types)', draw_marker, 5, [(draw_marker(times, Size, Name, (X , Y), polyline(Name, PolyLine, [])) :- [Top is Y + Size, Bottom is Y - Size, Left is X - Size, Right is X + Size, PolyLine = [(Left , Top), (Right , Bottom), (X , Y), (Right , Top), (Left , Bottom)]]), (draw_marker(square, Size, Name, Centre, box(Name, (Size * 2 , Size * 2) aligned (c , c) at Centre, [weight(1)])) :- []), (draw_marker(circle, Size, Name, Centre, circle(Name, Size at Centre, [weight(1)])) :- []), (draw_marker(plus, Size, Name, (X , Y), polyline(Name, PolyLine, [])) :- [Top is Y + Size, Bottom is Y - Size, Left is X - Size, Right is X + Size, PolyLine = [(Left , Y), (Right , Y), (X , Y), (X , Top), (X , Bottom)]])])). + +'!comment'('**************************************MISC PRIMITIVES******************************'). + +'!condition'('for X = Start to Finish, Step Inc', for, 4, [(for(Start, Start, Finish, _Inc) :- [Start =< Finish]), (for(X, OldStart, Finish, Inc) :- [OldStart =< Finish, Start is OldStart + Inc, for(X, Start, Finish, Inc)])]). + +'!condition'('---------------stuff about value lists ---------------', sum_across_lists, 4, [(sum_across_lists(N, [], 0, Chart) :- []), (sum_across_lists(N, [Series|Rest], Sum, Chart) :- [get_series(Series, Points, _, Chart), call(nth1(N, Points, Elem)), get_mean(Elem, Mean), sum_across_lists(N, Rest, SumRest, Chart), Sum is Mean + SumRest])]). + +'!condition'('Condition', get_sums, 4, [(get_sums(N, SeriesNos, Sum, Chart) :- [for(X, 1, N, 1), sum_across_lists(X, SeriesNos, Sum, Chart)])]). + +'!condition'('add X values to categorical data series', x_spacing, 4, [(x_spacing(_, _, [], []) :- []), (x_spacing(Current, Increment, [Y|Rest], NewRest) :- [not [valid_value(Y)], '!', New is Current + Increment, x_spacing(New, Increment, Rest, NewRest)]), (x_spacing(Current, Increment, [Y|Rest], [(Current , Y)|NewRest]) :- [New is Current + Increment, x_spacing(New, Increment, Rest, NewRest)])]). + +'!condition'('Condition', get_mean, 2, [(get_mean([Mean, Err], Mean) :- ['!']), (get_mean(Mean, Mean) :- [])]). + +'!condition'('Condition', get_err, 2, [(get_err([_, Err], Err) :- ['!']), (get_err(Mean, Mean) :- [])]). + +'!condition'('Condition', valid_value, 1, [(valid_value([Mean, Err]) :- []), (valid_value(Mean) :- [call(arithmetic_check(Mean, number))])]). + +'!condition'('Condition', getmax, 3, [(getmax(on, [Mean, Err], Max) :- [Max is Mean + Err, '!']), (getmax(off, [Mean, Err], Mean) :- ['!']), (getmax(_, Mean, Mean) :- [])]). + +'!condition'('Condition', getmin, 3, [(getmin(on, [Mean, Err], Min) :- [Min is Mean - Err, '!']), (getmin(off, [Mean, Err], Mean) :- ['!']), (getmin(_, Mean, Mean) :- [])]). + +'!condition'('-------------property list handling ---------------------', property_test, 3, [(property_test(Name, Value, Chart) :- [once([property_read(Name, FirstValue, Chart)]), Value = FirstValue])]). + +'!condition'('Get chart dimensions', dimensions, 6, [(dimensions(Xorig, Xlen, Ytop, Ylen, Yorig, Chart) :- [property_test(xorig, Xorig, Chart), property_test(xlen, Xlen, Chart), property_test(ytop, Ytop, Chart), property_test(ylen, Ylen, Chart), Yorig is Ylen + Ytop])]). + +'!condition'('Return data series', get_series, 4, [(get_series(SeriesNo, Values, Name, Chart) :- [property_read(series(SeriesNo), Values, Chart), property_test(name(SeriesNo), Name, Chart)])]). + +'!condition'('X-axis line, if specified and within range', x_axis, 4, [(x_axis(Min, Max, Xaxis, Chart) :- [property_test(x_axis, Xaxis, Chart), Xaxis >= Min, Xaxis =< Max, '!']), (x_axis(Min, Max, Min, Chart) :- [])]). + +'!condition'('Condition', y_series, 2, [(y_series(Series, Chart) :- [property_read(xy_pair, (_ , YNo), Chart), get_series(YNo, Series, _, Chart)])]). + +'!condition'('Condition', x_series, 2, [(x_series(Series, Chart) :- [property_read(xy_pair, (XNo , _), Chart), get_series(XNo, Series, _, Chart)])]). + +'!comment'('************EDIT CODE BELOW TO CREATE MORE SIMULTANEOUS CHARTS ********************'). + +'!condition'('Condition', property_read, 3, [(property_read(Name, Value, chart1) :- [match(Name = Value, 867629775)]), (property_read(Name, Value, chart2) :- [match(Name = Value, 864145229)]), (property_read(Name, Value, _) :- [match(Name = Value, 867770884)])]). + +'!rule'('Rule', [triggered(add(chart1, Item))], [], [add(Item, 867629775), send(graph(chart1), 861216060)]). + +'!rule'('Rule', [triggered(add(chart2, Item))], [], [add(Item, 864145229), send(graph(chart2), 861216060)]). + +'!rule'('Flush buffers', [triggered(clear)], [], [delete_all(_, 864077783), delete_all(_, 867629775), delete_all(_, 864145229)]). + F0:./921446829/903390619/861216060/messages F0:./921446829/903390619/messages F0:./921446829/903390619/subboxes.current F125:./921446829/trace +################################################################################ +Initialising session...................done F0:./921446829/messages F0:./921446829/subboxes.current F1835:./921446829/.config +% Serial Position in Free recall: Thu Sep 5 16:33:03 2002 + +version('Version 2.1 pl 1'). +selection(0.211, 0.320). +position(921446829, 0.119, 0.046). +size(921446829, 640, 500). +mode(921446829, open, 0). + +position(903364453, 0.235, 0.240). +size(903364453, 640, 500). +mode(903364453, closed, 0). + +position(912815430, 0.284, 0.305). +size(912815430, 640, 500). +mode(912815430, closed, 0). + +position(912746100, 0.284, 0.305). +size(912746100, 640, 500). +mode(912746100, closed, 0). + +position(912815420, 0.284, 0.305). +size(912815420, 640, 500). +mode(912815420, closed, 0). + +position(903364963, 0.284, 0.305). +size(903364963, 640, 500). +mode(903364963, closed, 0). + +position(903390619, 0.244, 0.280). +size(903390619, 640, 500). +mode(903390619, open, 0). + +position(864145229, 0.284, 0.305). +size(864145229, 640, 500). +mode(864145229, closed, 0). + +position(867629775, 0.284, 0.305). +size(867629775, 640, 500). +mode(867629775, closed, 0). + +position(867770884, 0.284, 0.305). +size(867770884, 640, 500). +mode(867770884, closed, 0). + +position(864077783, 0.004, 0.020). +size(864077783, 640, 523). +mode(864077783, open, 4). + +position(861216060, 0.284, 0.305). +size(861216060, 640, 500). +mode(861216060, closed, 0). + +position(903364449, 0.235, 0.240). +size(903364449, 640, 500). +mode(903364449, closed, 0). + +position(903376084, 0.284, 0.305). +size(903376084, 640, 500). +mode(903376084, closed, 0). + +position(903375835, 0.284, 0.305). +size(903375835, 640, 500). +mode(903375835, closed, 0). + +position(903375178, 0.284, 0.305). +size(903375178, 640, 500). +mode(903375178, closed, 0). + +position(903369132, 0.284, 0.305). +size(903369132, 640, 500). +mode(903369132, closed, 0). + +position(903377725, 0.284, 0.305). +size(903377725, 640, 500). +mode(903377725, closed, 0). + +position(903365431, 0.288, 0.325). +size(903365431, 640, 500). +mode(903365431, open, 0). + D./921446829/Scripts F67:./921446829/Scripts/Default +% Default: Thu Sep 5 16:32:53 2002 + +repeat([call("Trial")], 50). + F83:./921446829/Scripts/Trial +% Trial: Wed Apr 14 10:57:35 1999 + +initialise(trial). + +finish_trial. + +end(trial). + F8:./921446829/scriptname +Default F196:./921446829/oos_init.pl +:- assert(file_search_path(class, '/usr/local/lib/cogent/classes/')). +:- assert(file_search_path(lib, '/usr/local/lib/cogent/oos/')). +:- assert(file_search_path(io, '/home/rick/COGENT/output/')). F102:./921446829/parameters +set_parameter(verbose, false). +set_parameter(messages, true). +set_parameter(foreign_libraries, true). F0:./921446829/oos_input F726:./921446829/oos_output +Modular OOS Version 2.3.02 (20:07:32 04 Sep 2002) +Using PsyCOGENT classes. +oos> initialise(session). +oos> script("Default", run). +atom_chars/2: Cannot represent due to `character_code' +Error: atom_chars(_G6188, [48, 3]) +oos> initialise(session). +oos> script("Default", run). +name/2: Cannot represent due to `character_code' +Error: name(_G6188, [48, 8]) +oos> initialise(session). +oos> script("Default", run). +atom_chars/2: Cannot represent due to `character_code' +Error: atom_chars(_G7420, [48, 2]) +oos> initialise(session). +oos> script("Default", run). +oos> script("Default", run). +oos> initialise(session). +oos> script("Default", run). +oos> initialise(session). +oos> initialise(session). +oos> initialise(session). +oos> halt. F0:./921446829/scriptstate F0:./921446829/variables F0:./921446829/oos_halt F0:./921446829/oos_exit