nreusch / TSNConf

A tool for optimization and visualization of TSN networks
14 stars 8 forks source link

readme related content #3

Closed lingyun888 closed 3 months ago

lingyun888 commented 5 months ago

Hello, from the readme, it can be seen that both model12 and model13 are based on the SA algorithm. Is there any difference between the two models?

nreusch commented 5 months ago

Hello,

yes, the difference is the following:

mode11: Do routing using a Simulated Annealing(SA) methaheuristic, afterwards do a simple scheduling where each task & message is placed ASAP.

mode12: Do routing using a Simulated Annealing(SA) methaheuristic, afterwards do scheduling using a Simulated Annealing(SA) methaheuristic.

mode13: Do routing & scheduling using a Simulated Annealing(SA) methaheuristic at the same time.

mode13 is explained in section 7 of the paper "Dependability-aware Routing and Scheduling for Time-Sensitive Networks" (https://ietresearch.onlinelibrary.wiley.com/doi/full/10.1049/cps2.12030)

lingyun888 commented 5 months ago

Thank you. I would like to trouble you to answer two more questions. 1.Which chapter of the above paper corresponds to Model 11 and Model 12 respectively? 2.If security and redundancy are not considered, which model do you think is more advantageous to choose?

nreusch commented 5 months ago

Hello, mode11 and mode12 are not explicitly explained in the paper. However, you can look at section 7.5 to see how the ASAP scheduling used in mode11 works. mode12 works very similar to mode13, just that routing and scheduling optimization is done seperatly.

mode13 is the best one to use. For smaller testcases you might also use mode1 with the CP solver.

lingyun888 commented 5 months ago

Hello, may I ask what is the relationship between application, task, and steam? From the scheduling results graph, it can be seen that the flow is distributed on the link while the tasks are distributed on the end devices. Is this the actual scheduled steam? The tasks are only designed for end devices without time synchronization capabilities.

nreusch commented 5 months ago

Hello, to understand the relationship, take a look at section 4.2 of the aforementioned paper. An application represents the dependencies between tasks as a directed-acylclic graph, where the tasks are the verticies, and the streams are the edges. Figure 4 shows an example application. A stream is equivalent to a flow in other literature: It represents a periodic data transmission between end-systems.

What do you mean with: "The tasks are only designed for end devices without time synchronization capabilities."? Our model assumes that all devices are time-synchronized.

lingyun888 commented 5 months ago

Sorry,I still don't quite understand. Why not just schedule the streams, but also schedule tasks? Can you give an example to illustrate what applications, tasks, and streams represent respectively?Can I use this SA method to schedule only the flow like other papers? You write in Chapter 2 that "Through this, we compare on the solution's optimization to be able to support heterogeneous TSN networks feature unscheduled and/or unsynchronized end systems while safeguarding the real-time properties of critical communication." Isn't Chapter 2 mainly aimed at terminal devices without time synchronization capability?

nreusch commented 5 months ago

We also schedule tasks to have a more comprehensive solution, which supports many usecases. I think the best explanation is of the terms is given in Section 4.2 of the above paper. Here is how the example application from Figure 4 would be defined in the input file:

<application name="App1" period="1000" type="NORMAL">
        <tasks>
            <task name="t1" node="ES1" wcet="100" period="1000" type="NORMAL"/>
            <task name="t2" node="ES2" wcet="100" period="1000" type="NORMAL"/>
            <task name="t3" node="ES3" wcet="100" period="1000" type="NORMAL"/>
            <task name="t4" node="ES4" wcet="100" period="1000" type="NORMAL"/>
        </tasks>
        <streams>
            <stream name="s1" src="ES1" dest="ES3" sender_task="t1" receiver_tasks="t3" size="500" period="1000" rl="1" secure="True" type="NORMAL" />
            <stream name="s2" src="ES2" dest="ES3,ES4" sender_task="t2" receiver_tasks="t3,t4" size="500" period="1000" rl="2" secure="True" type="NORMAL" />
        </streams>
</application>

You can schedule only flows by:

You are confusing two different papers. This tool here only support synchronized end-systems and was used for this paper: https://ietresearch.onlinelibrary.wiley.com/doi/full/10.1049/cps2.12030

lingyun888 commented 5 months ago

Did indeed confuse the two papers. Can you help me write an example of scheduling only the flow in Figure 4, similar to the XML file above. Can you first help me check if the XML file written according to your steps below is correct? If not, please help me modify it. Once again, thank you very much

<<NetworkDescription mtu="1500" frame_overhead="22" key_length="64" mac_length="32">
    <application name="App1" period="1000" type="NORMAL">
        <tasks>
            <task name="t1" node="ES1" wcet="0" period="1000" type="NORMAL"/>
            <task name="t3" node="ES3" wcet="0" period="1000" type="NORMAL"/>
        </tasks>
        <streams>
            <stream name="s1" src="ES1" dest="ES3" sender_task="t1" receiver_tasks="t3" size="500" period="1000" rl="1"
                    secure="True" type="NORMAL"/>
        </streams>
    </application>
    <application name="App1" period="1000" type="NORMAL">
        <tasks>
            <task name="t2" node="ES2" wcet="0" period="1000" type="NORMAL"/>
            <task name="t3" node="ES3" wcet="0" period="1000" type="NORMAL"/>
        </tasks>
        <streams>
            <stream name="s2" src="ES2" dest="ES3" sender_task="t2" receiver_tasks="t3" size="500" period="1000"
                    rl="2" secure="True" type="NORMAL"/>
        </streams>
    </application>
    <application name="App1" period="1000" type="NORMAL">
        <tasks>
            <task name="t2" node="ES2" wcet="0" period="1000" type="NORMAL"/>
            <task name="t4" node="ES4" wcet="0" period="1000" type="NORMAL"/>
        </tasks>
        <streams>
            <stream name="s2" src="ES2" dest="ES4" sender_task="t2" receiver_tasks="t4" size="500" period="1000"
                    rl="2" secure="True" type="NORMAL"/>
        </streams>
    </application>
</NetworkDescription>
lingyun888 commented 5 months ago

Is this flow and task modeling approach designed separately in your paper or borrowed from other papers? If so, is it convenient to publish a reference paper.

nreusch commented 3 months ago

Hello @lingyun888,

for the complete example testcase look here: https://github.com/nreusch/TSNConf/blob/main/testcases/TC0_example.flex_network_description

The flow and task modelling is my own, so the best reference is the paper that I mentioned above. Feel free to ask if you have questions.