Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Results are different between command line(generateSchedule.sh) and Eclipse java project(use src/*.java files)? #6

Closed
nwpucong opened this issue Jun 23, 2020 · 1 comment

Comments

@nwpucong
Copy link

Hello,
i run tests from cmd and Eclipse java project. The test case is same(Script/example.java).But results are a little different between command line(generateSchedule.sh) and Eclipse java project(use src/.java files).
Is there something different from Scripts/libs/
.jar and src/*java files?

Result.tar.gz

I also confused about the value "Fragment slot duration : 28.375(28.5)" , because packetsize is 1625, that means the packet need 13 microsecond to transmit. so i think fragment slot duration 14 microseconds is enough. How to get the value 28?

FLOW LIST:
Flow name: flow1
Start dev. first t1: 0
Start dev. HC: 1000
Start dev. packet periodicity: 1000
Flow type: Multicast
List of leaves: dev15, dev16, dev17, dev18, dev19,
Path to dev15: dev4, switch0(flow1Fragment1), switch4(flow1Fragment2), switch3(flow1Fragment3), dev15,
Path to dev16: dev4, switch0(flow1Fragment1), switch4(flow1Fragment2), switch3(flow1Fragment4), dev16,
Path to dev17: dev4, switch0(flow1Fragment1), switch4(flow1Fragment2), switch3(flow1Fragment5), dev17,
Path to dev18: dev4, switch0(flow1Fragment1), switch4(flow1Fragment2), switch3(flow1Fragment6), dev18,
Path to dev19: dev4, switch0(flow1Fragment1), switch4(flow1Fragment2), switch3(flow1Fragment7), dev19,

Fragment name: flow1Fragment1
    Fragment node: switch0
    Fragment next hop: switch4
    Fragment priority: 0
    Fragment slot start 0: 0.125
    Fragment slot duration 0 : 28.375
    Fragment times-
      (0) Fragment departure time: 0.0
      (0) Fragment arrival time: 1.0
      (0) Fragment scheduled time: 14.0
      ----------------------------
Fragment name: flow1Fragment2
    Fragment node: switch4
    Fragment next hop: switch3
    Fragment priority: 0
    Fragment slot start 0: 0.125
    Fragment slot duration 0 : 28.375
    Fragment times-
      (0) Fragment departure time: 14.0
      (0) Fragment arrival time: 15.0
      (0) Fragment scheduled time: 28.0
      ----------------------------
Fragment name: flow1Fragment3
    Fragment node: switch3
    Fragment next hop: dev15
    Fragment priority: 0
    Fragment slot start 0: 0.125
    Fragment slot duration 0 : 28.375
    Fragment times-
      (0) Fragment departure time: 28.0
      (0) Fragment arrival time: 29.0
      (0) Fragment scheduled time: 42.0
      ----------------------------
Fragment name: flow1Fragment4
    Fragment node: switch3
    Fragment next hop: dev16
    Fragment priority: 0
    Fragment slot start 0: 0.125
    Fragment slot duration 0 : 28.375
    Fragment times-
      (0) Fragment departure time: 28.0
      (0) Fragment arrival time: 29.0
      (0) Fragment scheduled time: 42.0
      ----------------------------
Fragment name: flow1Fragment5
    Fragment node: switch3
    Fragment next hop: dev17
    Fragment priority: 0
    Fragment slot start 0: 0.125
    Fragment slot duration 0 : 28.375
    Fragment times-
      (0) Fragment departure time: 28.0
      (0) Fragment arrival time: 29.0
      (0) Fragment scheduled time: 42.0
      ----------------------------
Fragment name: flow1Fragment6
    Fragment node: switch3
    Fragment next hop: dev18
    Fragment priority: 0
    Fragment slot start 0: 0.125
    Fragment slot duration 0 : 28.375
    Fragment times-
      (0) Fragment departure time: 28.0
      (0) Fragment arrival time: 29.0
      (0) Fragment scheduled time: 42.0
      ----------------------------
Fragment name: flow1Fragment7
    Fragment node: switch3
    Fragment next hop: dev19
    Fragment priority: 0
    Fragment slot start 0: 0.125
    Fragment slot duration 0 : 28.375
    Fragment times-
      (0) Fragment departure time: 28.0
      (0) Fragment arrival time: 29.0
      (0) Fragment scheduled time: 42.0
      ----------------------------
@ACassimiro
Copy link
Owner

Hello,

About your first question, it is possible that some of the optional constraints are enabled on the .jar file version, making your schedule different from what is generated when you run TSNsched on your IDE. I would have to double check that. Also, depending on how the solver handles the network that you give as input, the result can be slightly different, so even the order of creation of your devices can affect your output. Don't worry though, both schedules are valid.

About the slot duration (the transmission window size), TSNsched allows your transmission window to be greater than the transmission of a single packet. This can be useful to create more flexible schedules allowing the usage of a single transmission window to transmit more than one packet (given that they have the same priority/class). That said, TSNsched sometimes can create a slot with 50 microseconds of duration to transmit only one packet (that takes 13 microseconds to be transmitted). You can fine tune the duration of a slot controlling the maximumSlotDuration variable in the cycle. It is given as a parameter of the constructor method of the Cycle objects. Notice the "new Cycle(50);" commands on the GeneratedCode class, which basically means "create a new cycle where its slots cannot have their duration greater than 50".

I hope this clarifies your questions. Let me know if there is anything else that I can help you with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants