ACassimiro / TSNsched

Automated Schedule Generation for Time-Sensitive Networks (TSN).
GNU General Public License v3.0
87 stars 38 forks source link

The flow type setting problem #23

Closed Dddddd007 closed 2 years ago

Dddddd007 commented 2 years ago

I set flow type as UNICAST in my java file, but the output file (.log) show the flow is MULTICAST. My java file screenshot: java

The output file screenshot: log

ACassimiro commented 2 years ago

Initially, unicast and multicast flows were structurally different in TSNsched, but now creating a flow as unicast only allows you to use the setEndDevice and addToPath methods, given that building a multicast flow is slightly more complicated. During the scheduling process, TSNsched converts the structure of all unicast flows to multicast, as a unicast flow is a multicast one that never branches, in order to use the same data structure for handling all data streams.

Let me know if you have any other questions.

Dddddd007 commented 2 years ago

Thank you for your answer. In Port.java file, I find two modes: "useMicroCycles" and "useHyperCycle", but I do not find the implications of the two modes in your paper "TSNSCHED: Automated Schedule Generation for Time Sensitive Networking". Therefore, I want to know the difference between these two modes. It seems like "useMicroCycles" is the default mode?

ACassimiro commented 2 years ago

Prior to the FMCAD publication we would use user-defined cycle sizes, but this is too error prone in real topologies, so we developed approaches for working around this issue. The hypercycle and microcycle are two modes of operation that tsnsched uses to automatically calculate the cycle sizes in the scheduling problem. It calculates it based in the periodicity of the flows. Microcycles use less transmission windows and the cycle size is calculated using the greatest common divisor of the periodicity of all flows that goes through the port of that cycle; it is less flexible with schedules but generates an output faster. Hypercycles use more transmission windows and the cycle size is equals to the least common multiple of the periodicities of all flows that go through the port of that cycle; it is more flexible with regards to scheduling capabilities but it is more computationally expensive and thus usually takes longer to provide a schedule. Most of the examples that we currently have use the same periodicity for all flows, thus there shouldn't be much difference in execution time and provided output.

For more information, you can take a look into section 4.4.7 of this document: https://repositorio.ufpb.br/jspui/bitstream/123456789/19914/1/AellisonCassimiroTeixeiraDosSantos_Dissert.pdf