From 48a1909bbd5c6cbccbec47bf17bc12fe9f0a1661 Mon Sep 17 00:00:00 2001
From: Reiner Jung <reiner.jung@email.uni-kiel.de>
Date: Tue, 25 Jul 2023 15:55:17 +0200
Subject: [PATCH] Updated make tables and images.

---
 models/make-tables-and-images.sh | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/models/make-tables-and-images.sh b/models/make-tables-and-images.sh
index f596c19..c2be75d 100755
--- a/models/make-tables-and-images.sh
+++ b/models/make-tables-and-images.sh
@@ -2,7 +2,7 @@
 
 export BASE_DIR=$(cd "$(dirname "$0")"; pwd)
 
-. "${BASE_DIR}/../common-functions.rc"
+. "${BASE_DIR}/common-functions.rc"
 
 if [ -f "$BASE_DIR/config" ] ; then
         . $BASE_DIR/config
@@ -37,6 +37,20 @@ for LINE in `cat "${JOB_FILE}"` ; do
 			MERGE_MODEL="${JOB_DIRECTORY}/original-model-optimized-$OPT"
 			mkdir -p "${MERGE_MODEL}"
 			${MOP} -e merged-$OPT-$NAME  -i "${JOB_DIRECTORY}/original-model" "${JOB_DIRECTORY}/optimized-$OPT" -o "${MERGE_MODEL}" merge
+			
+			LEFT=""
+			RIGHT="optimized-$OPT"
+			for E in `cat "${MERGE_MODEL}/source-model.xmi" | grep "<value>" | sort | uniq | sed 's/^ *<value>\(.*\)<\/value>$/\1/g' | grep -v "optimized-$OPT"` ; do
+				if [ "${LEFT}" == "" ] ; then
+					LEFT=$E
+				else
+					LEFT="$LEFT,$E"
+				fi
+			done
+			
+			${MVIS} -c allen num-of-calls op-coupling module-coupling -g dot-op dot-component -i "${MERGE_MODEL}" -o "${MERGE_MODEL}" -m add-nodes -s "all-color:$LEFT:$RIGHT"
+			${BASE_DIR}/dotPic-single-fileConverter.sh "${MERGE_MODEL}/original-model-optimized-$OPT-component.dot" pdf
+			${BASE_DIR}/dotPic-single-fileConverter.sh "${MERGE_MODEL}/original-model-optimized-$OPT-operation.dot" pdf
 		else
 			information $LINE
 			JOB_DIRECTORY="${OPTIMIZATION_DATA}/$LINE.job"
-- 
GitLab