Skip to content

Commit

Permalink
Merge branch 'inet-framework:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
haug-den-lucas authored Aug 1, 2024
2 parents b7414b8 + f5d0b6b commit f10061f
Show file tree
Hide file tree
Showing 24 changed files with 165 additions and 151 deletions.
2 changes: 1 addition & 1 deletion examples/mobility/MobileNetwork.ned
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ network MobileNetwork
bool hasVisualizer = default(false);
bool hasScenarioManager = default(false);
bool hasEnvironment = default(false);
@display("bgb=600,400");
@display("bgb=600,600");
submodules:
visualizer: IntegratedCanvasVisualizer if hasVisualizer {
parameters:
Expand Down
2 changes: 1 addition & 1 deletion examples/mobility/omnetpp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sim-time-limit = 1000s
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 600m
**.constraintAreaMaxY = 400m
**.constraintAreaMaxY = 600m
**.constraintAreaMaxZ = 0m

[Config Update]
Expand Down
14 changes: 7 additions & 7 deletions python/inet/scave/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def add_to_dataframe(df, style_tuple_list=None, default_dict=None, order=None):
or
order = ['configname', 'Advanced_config', 'Default_config', 'Manual_config']
Note that the value parameter in style_tuple_list and the order can contain regex (e.g. .*foo). Make sure to escape regex characters such as [ and ] with \
Note that the value parameter in style_tuple_list and the order can contain regex (e.g. .*foo). Make sure to escape regex characters such as [ and ] with \\
"""


Expand Down Expand Up @@ -700,8 +700,8 @@ def remove_zero_index_if_present(df):

for i in range(0,len(df)):
pattern = re.compile(value)
logger.debug(f"value: {value}, pattern: {pattern}, df[column][i] {df[column][i]}")
match = re.fullmatch(pattern, df[column][i])
logger.debug(f"value: {value}, pattern: {pattern}, df.loc[i, column] {df.loc[i, column]}")
match = re.fullmatch(pattern, df.loc[i, column])
logger.debug(f"match: {match}")
if match != None:
# if debug:
Expand Down Expand Up @@ -732,9 +732,9 @@ def remove_zero_index_if_present(df):
logger.debug(f'order_column: {order_column}, order_dict {order_dict}')
for i in order_dict.items():
for j in range(0,len(df)):
# if df[order_column][j] == i[0]:
# if df.loc[j, order_column] == i[0]:
pattern = re.compile(i[0])
match = re.fullmatch(pattern, df[order_column][j])
match = re.fullmatch(pattern, df.loc[j, order_column])
if match != None:
df.loc[j, 'order'] = i[1]
else:
Expand All @@ -743,9 +743,9 @@ def remove_zero_index_if_present(df):
logger.debug(f'order_column: {order_column}, order_list {order_list}')
for order in range(0, len(order_list)):
for j in range(0,len(df)):
# if df[order_column][j] == i[0]:
# if df.loc[j, order_column] == i[0]:
pattern = re.compile(order_list[order])
match = re.fullmatch(pattern, df[order_column][j])
match = re.fullmatch(pattern, df.loc[j, order_column])
if match != None:
df.loc[j, 'order'] = order

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4624,7 +4624,7 @@ if df.empty:
# apply vector operations
df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module'].map(lambda module: re.sub(".*\.(.*)\..*", "\\1", module))
df['legend'] = df['module'].map(lambda module: re.sub(".*\\.(.*)\\..*", "\\1", module))
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -5198,7 +5198,7 @@ if df.empty:
# apply vector operations
df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module'].map(lambda module: re.sub(".*\.(.*)\..*", "\\1", module))
df['legend'] = df['module'].map(lambda module: re.sub(".*\\.(.*)\\..*", "\\1", module))
# plot
utils.plot_vectors(df, props)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<input pattern="/inet/showcases/tsn/gatescheduling/eager/results/Eager-*.sca"/>
</inputs>
<charts>
<chart icon="icons/full/obj/linechart.png" id="1635758751" name="Application End-to-End Delay" template="linechart_native" type="LINE">
<chart icon="icons/full/obj/linechart.png" id="1057960291" name="Application End-to-End Delay" template="linechart_native" type="LINE">
<script><![CDATA[import math
from omnetpp.scave import results, chart, utils
import os
Expand Down Expand Up @@ -36,10 +36,10 @@ if df.empty:
# apply vector operations
df = utils.perform_vector_ops(df, props["vector_operations"])
style_tuple_list = [('module', '.*app\[0\].*', {'marker': 'd', 'markersize': 4}),
('module', '.*app\[1\].*', {'marker': 'x', 'markersize': 2}),
('module', '.*app\[2\].*', {'marker': 'd', 'markersize': 4}),
('module', '.*app\[3\].*', {'marker': 's', 'markersize': 2})]
style_tuple_list = [('module', '.*app\\[0\\].*', {'marker': 'd', 'markersize': 4}),
('module', '.*app\\[1\\].*', {'marker': 'x', 'markersize': 2}),
('module', '.*app\\[2\\].*', {'marker': 'd', 'markersize': 4}),
('module', '.*app\\[3\\].*', {'marker': 's', 'markersize': 2})]
order = ['module', {'TsnDumbbellNetwork.server2.app[2].sink': 2,
'TsnDumbbellNetwork.server2.app[3].sink': 3,
Expand Down
16 changes: 8 additions & 8 deletions showcases/tsn/gatescheduling/sat/SatShowcase.anf
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ if df.empty:
# apply vector operations
df = utils.perform_vector_ops(df, props["vector_operations"])
style_tuple_list = [('module', '.*app\[0\].*', {'marker': 'd', 'markersize': 4}),
('module', '.*app\[1\].*', {'marker': 'x', 'markersize': 2}),
('module', '.*app\[2\].*', {'marker': 'd', 'markersize': 4}),
('module', '.*app\[3\].*', {'marker': 's', 'markersize': 2})]
style_tuple_list = [('module', '.*app\\[0\\].*', {'marker': 'd', 'markersize': 4}),
('module', '.*app\\[1\\].*', {'marker': 'x', 'markersize': 2}),
('module', '.*app\\[2\\].*', {'marker': 'd', 'markersize': 4}),
('module', '.*app\\[3\\].*', {'marker': 's', 'markersize': 2})]
order = ['module', {'TsnDumbbellNetwork.server2.app[2].sink': 2,
'TsnDumbbellNetwork.server2.app[3].sink': 3,
Expand Down Expand Up @@ -716,10 +716,10 @@ df_sat= utils.perform_vector_ops(df_sat, props["vector_operations"])
#print(df_eager, df_sat)
style_tuple_list = [('module', '.*app\[0\].*', {'marker': 'd', 'markersize': 4, 'color': '#1f77b4'}),
('module', '.*app\[1\].*', {'marker': 'x', 'markersize': 2, 'color': '#ff7f0e'}),
('module', '.*app\[2\].*', {'marker': 'd', 'markersize': 4, 'color': '#2ca02c'}),
('module', '.*app\[3\].*', {'marker': 's', 'markersize': 2, 'color': '#d62728'})]
style_tuple_list = [('module', '.*app\\[0\\].*', {'marker': 'd', 'markersize': 4, 'color': '#1f77b4'}),
('module', '.*app\\[1\\].*', {'marker': 'x', 'markersize': 2, 'color': '#ff7f0e'}),
('module', '.*app\\[2\\].*', {'marker': 'd', 'markersize': 4, 'color': '#2ca02c'}),
('module', '.*app\\[3\\].*', {'marker': 's', 'markersize': 2, 'color': '#d62728'})]
#style_tuple_list = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ if df.empty:
# apply vector operations
df = utils.perform_vector_ops(df, props["vector_operations"])
df['title'] = df['title'].map(lambda title: re.sub("\, vector.*", "", title))
df['title'] = df['title'].map(lambda title: re.sub("\\, vector.*", "", title))
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -1239,7 +1239,7 @@ if df.empty:
# apply vector operations
df = utils.perform_vector_ops(df, props["vector_operations"])
df['title'] = df['title'].map(lambda title: re.sub("\, vector.*", "", title))
df['title'] = df['title'].map(lambda title: re.sub("\\, vector.*", "", title))
# plot
utils.plot_vectors(df, props)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if df.empty:
# apply vector operations
df = utils.perform_vector_ops(df, props["vector_operations"])
df['title'] = df['title'].map(lambda title: re.sub("\, vector.*", "", title))
df['title'] = df['title'].map(lambda title: re.sub("\\, vector.*", "", title))
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -667,7 +667,7 @@ if df.empty:
# apply vector operations
df = utils.perform_vector_ops(df, props["vector_operations"])
df['title'] = df['title'].map(lambda title: re.sub("\, vector.*", "", title))
df['title'] = df['title'].map(lambda title: re.sub("\\, vector.*", "", title))
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -1304,7 +1304,7 @@ if df.empty:
# apply vector operations
df = utils.perform_vector_ops(df, props["vector_operations"])
df['title'] = df['title'].map(lambda title: re.sub("\, vector.*", "", title))
df['title'] = df['title'].map(lambda title: re.sub("\\, vector.*", "", title))
# plot
utils.plot_vectors(df, props)
Expand Down
36 changes: 18 additions & 18 deletions showcases/tsn/timesynchronization/clockdrift/ClockDriftShowcase.anf
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module']
for i in range(0,len(df['legend'])):
df['legend'][i] = df['module'][i].replace('ClockDriftShowcase.','')
df['legend'][i] = df['legend'][i].replace('.clock','')
df.loc[i, 'legend'] = df.loc[i, 'module'].replace('ClockDriftShowcase.','')
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace('.clock','')
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -629,8 +629,8 @@ df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module']
for i in range(0,len(df['legend'])):
df['legend'][i] = df['module'][i].replace('ClockDriftShowcase.','')
df['legend'][i] = df['legend'][i].replace('.clock','')
df.loc[i, 'legend'] = df.loc[i, 'module'].replace('ClockDriftShowcase.','')
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace('.clock','')
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -1210,8 +1210,8 @@ df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module']
for i in range(0,len(df['legend'])):
df['legend'][i] = df['module'][i].replace('ClockDriftShowcase.','')
df['legend'][i] = df['legend'][i].replace('.clock','')
df.loc[i, 'legend'] = df.loc[i, 'module'].replace('ClockDriftShowcase.','')
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace('.clock','')
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -1791,8 +1791,8 @@ df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module']
for i in range(0,len(df['legend'])):
df['legend'][i] = df['module'][i].replace('ClockDriftShowcase.','')
df['legend'][i] = df['legend'][i].replace('.clock','')
df.loc[i, 'legend'] = df.loc[i, 'module'].replace('ClockDriftShowcase.','')
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace('.clock','')
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -2372,8 +2372,8 @@ df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module']
for i in range(0,len(df['legend'])):
df['legend'][i] = df['module'][i].replace('ClockDriftShowcase.','')
df['legend'][i] = df['legend'][i].replace('.clock','')
df.loc[i, 'legend'] = df.loc[i, 'module'].replace('ClockDriftShowcase.','')
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace('.clock','')
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -2953,8 +2953,8 @@ df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module']
for i in range(0,len(df['legend'])):
df['legend'][i] = df['module'][i].replace('ClockDriftShowcase.','')
df['legend'][i] = df['legend'][i].replace('.clock','')
df.loc[i, 'legend'] = df.loc[i, 'module'].replace('ClockDriftShowcase.','')
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace('.clock','')
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -3534,8 +3534,8 @@ df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module']
for i in range(0,len(df['legend'])):
df['legend'][i] = df['module'][i].replace('ClockDriftShowcase.','')
df['legend'][i] = df['legend'][i].replace('.clock','')
df.loc[i, 'legend'] = df.loc[i, 'module'].replace('ClockDriftShowcase.','')
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace('.clock','')
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -4117,8 +4117,8 @@ df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module']
for i in range(0,len(df['legend'])):
df['legend'][i] = df['module'][i].replace('ClockDriftShowcase.','')
df['legend'][i] = df['legend'][i].replace('.clock','')
df.loc[i, 'legend'] = df.loc[i, 'module'].replace('ClockDriftShowcase.','')
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace('.clock','')
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -4698,8 +4698,8 @@ df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module']
for i in range(0,len(df['legend'])):
df['legend'][i] = df['module'][i].replace('ClockDriftShowcase.','')
df['legend'][i] = df['legend'][i].replace('.clock','')
df.loc[i, 'legend'] = df.loc[i, 'module'].replace('ClockDriftShowcase.','')
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace('.clock','')
# plot
utils.plot_vectors(df, props)
Expand Down
16 changes: 8 additions & 8 deletions showcases/tsn/timesynchronization/gptp/GptpShowcase.anf
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ if df.empty:
df['legend'] = df['module']
for i in range(0,len(df)):
df['legend'][i] = df['legend'][i].replace("OneMasterClockGptpShowcase.","")
df['legend'][i] = df['legend'][i].replace(".clock","")
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace("OneMasterClockGptpShowcase.","")
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace(".clock","")
# apply vector operations
df = utils.perform_vector_ops(df, props["vector_operations"])
Expand Down Expand Up @@ -628,8 +628,8 @@ df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module']
for i in range(0,len(df)):
df['legend'][i] = df['legend'][i].replace("TwoMasterClocksTreeGptpShowcase.","")
# df['legend'][i] = df['legend'][i].replace(".clock","")
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace("TwoMasterClocksTreeGptpShowcase.","")
# df.loc[i, 'legend'] = df.loc[i, 'legend'].replace(".clock","")
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -1204,8 +1204,8 @@ df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module']
for i in range(0,len(df)):
df['legend'][i] = df['legend'][i].replace("TwoMasterClocksTreeGptpShowcase.","")
# df['legend'][i] = df['legend'][i].replace(".clock[0]","")
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace("TwoMasterClocksTreeGptpShowcase.","")
# df.loc[i, 'legend'] = df.loc[i, 'legend'].replace(".clock[0]","")
# plot
utils.plot_vectors(df, props)
Expand Down Expand Up @@ -1780,8 +1780,8 @@ df = utils.perform_vector_ops(df, props["vector_operations"])
df['legend'] = df['module']
for i in range(0,len(df)):
df['legend'][i] = df['legend'][i].replace("TwoMasterClocksTreeGptpShowcase.","")
# df['legend'][i] = df['legend'][i].replace(".clock[0]","")
df.loc[i, 'legend'] = df.loc[i, 'legend'].replace("TwoMasterClocksTreeGptpShowcase.","")
# df.loc[i, 'legend'] = df.loc[i, 'legend'].replace(".clock[0]","")
# plot
utils.plot_vectors(df, props)
Expand Down
Loading

0 comments on commit f10061f

Please sign in to comment.