How to display vector modules at different coordinates (e.g. tandem queues)?

15 views
Skip to first unread message

amrcg

unread,
Sep 17, 2021, 6:31:51 AM9/17/21
to OMNeT++ Users
Hello!
I have built an example with one source, one sink, and a vector of tandem queues in the middle. The tandem queues are well connected and the results make sense. My problem is that the queues appear on top of each other at the same location indicated by the @display directive. In fact, I would like to define the @display coordinates of each queue as a function of the index of that queue in the vector. I have tried to use a FOR loop, but this caused a syntax error. Is there a way to do this while keeping the tandem queues as a vector?
Thank you in advance.

Attila Török

unread,
Sep 17, 2021, 6:35:49 AM9/17/21
to OMNeT++ Users
Hello,
Take a look at the additional values of the "p" tag in the @display property: https://doc.omnetpp.org/omnetpp/manual/#sec:display-strings:module-and-connection-display-strings
Setting for example "p=100,150,r,40" will position the first (zeroth) module in the vector at 100,150, and lay out the rest of the modules in the vector in a row, with 40 spacing between consecutive elements.
Attila

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/omnetpp/0cde36b6-f890-42b8-8c35-994f5d1e252an%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages