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