@@ -292,4 +292,80 @@ function attraction_effect()
292292
293293 # plot
294294 plot (plt_ab, plt_adb, layout= (1 ,2 ))
295+ end
296+
297+ function compromise_effect ()
298+ max_time = 100
299+ n_seeds = 1000
300+ attention_process = BernoulliAttentionProcess ([.50 , .50 ])
301+ measure_ab = Measure (
302+ MDFT (
303+ 2 , # alternatives (cars) A B
304+ 2 , # attributes E (economy) and Q (quality)
305+ [ # personal evaluation matrix M
306+ # E Q
307+ 1.00 3.00 ; # A
308+ 3.00 1.00 ; # B
309+ ],
310+ # attention weight process
311+ attention_process,
312+ # contrast matrix
313+ contrast_matrix (2 ),
314+ # residual error law
315+ Dirac (0 ),
316+ sym ([ # feedback matrix S
317+ .940 .000 ;
318+ .000 .940 ;
319+ ])
320+ ),
321+ n_seeds,
322+ max_time,
323+ )
324+ measure_acb = Measure (
325+ MDFT (
326+ 3 , # alternatives (cars) A C B
327+ 2 , # attributes E (economy) and Q (quality)
328+ [ # personal evaluation matrix M
329+ # E Q
330+ 1.00 3.00 ; # A
331+ 2.00 2.00 ; # C
332+ 3.00 1.00 ; # B
333+ ],
334+ # attention weight process
335+ attention_process,
336+ # contrast matrix
337+ contrast_matrix (3 ),
338+ # residual error law
339+ Dirac (0 ),
340+ # sym([ # feedback matrix S
341+ # .940 -0.025 -0.010;
342+ # .000 .940 -0.010;
343+ # .000 .000 .940;
344+ # ])
345+ sym ([ # feedback matrix S
346+ .940 - 0.200 - 0.000 ;
347+ .000 .940 - 0.180 ;
348+ .000 .000 .940 ;
349+ ])
350+ ),
351+ n_seeds,
352+ max_time,
353+ )
354+
355+ # AB
356+ results_ab = run_measure (measure_ab)
357+ mean_ab = map (r -> r. mean, results_ab)
358+ lo_ab = map (r -> r. mean - 0.67 * r. std, results_ab)
359+ hi_ab = map (r -> r. mean + 0.67 * r. std, results_ab)
360+ plt_ab = plot (mean_ab' , ribbon= [lo_ab hi_ab], linecolor= [:blue :green ], labels= [' A' ' B' ], ylim= (0 ,1 ))
361+
362+ # ACB
363+ results_acb = run_measure (measure_acb)
364+ mean_acb = map (r -> r. mean, results_acb)
365+ lo_acb = map (r -> r. mean - 0.67 * r. std, results_ab)
366+ hi_acb = map (r -> r. mean + 0.67 * r. std, results_ab)
367+ plt_acb = plot (mean_acb' , ribbon= [lo_acb hi_acb], linecolor= [:blue :red :green ], labels= [' A' ' C' ' B' ], ylim= (0 ,1 ))
368+
369+ # plot
370+ plot (plt_ab, plt_acb, layout= (1 ,2 ))
295371end
0 commit comments