Expertsystemen

 

Runto and Exit

Besides the normal connections to indicate that you are able to go from one node to another, there are two other statements: runto and exit.

Exit: stop the model

exit is the easiest to explain, so we’ll start with that. The exit statement ensures that, if certain conditions are met, the model is exited. This is especially useful when you have sub graphs within sub graphs, going several layers deep. Then, instead of (at the end) returning to the sub graph above, exit allows you to immediately quit the model.

To add an exit statement, you will first have to add a connection by clicking on Connect in the Actions menu. In the window that pops-up, you are able to set a condition and create an exit statement by ticking the exit box.

connect dialog
connect dialog

Now, if the condition that is set is hit, the model will be exited.

Runto: don’t ask, don’t tell, just run to your goal

runto is a bit more complex. The best way to illustrate what it does is by giving an example. Say, you have a model with three nodes: A, B, and C.

In node A you ask for some numbers. In node B you put some calculations and output the explanation of these calculations on the screen. In node C you show the results of these calculations. It could occur that someone is not interested in the explanation of the calculations, but does want to see the results. In this case, you could use a connection. Although a connection will make sure that the user jumps to node C, the calculations done in node B will be ignored. Thus, the results in node C have not been calculated and will therefore not show up.

By using runto you will still be able to see the results. runto makes sure that the user skips from a certain node to another node, ensures that the nodes in between are executed, but does not shown those nodes.

In order to add a runto, you will first have to add a connection by clicking on the connection you want to change. In the window that pops-up, select runto and put in a condition (not explicitly necessary). Click [OK] and you have added a runto statement!

Note: For runto to work, you will still need connections to set the main path of the model. In this case, use connections to connect node A with node B. The runto will make sure that the models jumps from node A to node C over the path set by the connections.

Well done! You are now able to use exit and runto in your models.