5 #######################################################################
6 # Visualization - fix cross-references between AIS_ConnectedInteractive
7 # and connected presentation
8 #######################################################################
10 pload MODELING VISUALIZATION
22 set aMemInit [meminfo h]
27 eval compound [lrepeat $aNb s] ss
29 for {set i 1} {$i <= $aNb} {incr i} { vdisplay -noupdate ss_${i}; vsetlocation -noupdate ss_${i} 0 0 s }
31 set aMemDisp1 [meminfo h]
33 set aMemClear1 [meminfo h]
35 # display as connected instances of single presentation
36 vconnectto i_1 0 0 0 s
37 for {set i 2} {$i < $aNb} {incr i} { vconnectto i_${i} ${i} 0 0 i_1 }
38 set aMemDisp2 [meminfo h]
40 set aMemClear2 [meminfo h]
42 puts "Initial memory: [expr $aMemInit / (1024 * 1024)] MiB"
43 puts "Displaying (simple): [expr $aMemDisp1 / (1024 * 1024)] MiB"
44 puts "Clearing (simple): [expr $aMemClear1 / (1024 * 1024)] MiB"
45 puts "Displaying (connected): [expr $aMemDisp2 / (1024 * 1024)] MiB"
46 puts "Clearing (connected): [expr $aMemClear2 / (1024 * 1024)] MiB"
48 set aRatio [expr $aMemClear2 / double($aMemClear1)]
50 # check if the memory difference is greater than 10%
51 if [expr $aRatio > 1.1] {
52 puts "Error : TEST FAILED"