Message Boards Message Boards

Modeling distriburted computation. How to set priority for certain rules?

Posted 1 month ago

I am modeling distributed computation using Wolfram Physics project.

I have actors with memory, which compute their state and send messages to each other. All of this represented by a directed graph.

We can't know for sure in which order events gonna happen, and Wolfram Multiway System does perfect job simulating all possibilities, and providing states graph.

However, my distributed system uses timers. Even though messages can be lost and reordered, I assume that timers always work for each actor.

However, MultiwaySystem tries to apply all rules, and produce all kinds of possible states, even scenarios when timer event didn't happen.

I would like to filter out such branches of state evolution, otherwise state graph gonna be too cluttered.

How do I do that?

I came to conclusion that there are two options:

  1. Filter out resulting graph. Look at each state. If at least one of the possible applied rules is a timer rule, then disregard all others. That would require some additional filtering of the resulting graph.
  2. Find a way to set priority for rules. If there is at least one priority rule that can be applied, apply only it (timer rule). Disregard others.

Second options looks cleaner. I found that there is some kind of selection function that is used in Wolfram MultiwaySystem: https://resources.wolframcloud.com/FunctionRepository/resources/MultiwayFunctionSystem/. However, it doesn't seems like available options would suit me.

Do you have any ideas how I could approach this problem?

POSTED BY: Vladimir Gordeev

I found a solution myself: reformulate state of the timers in such a way, that it could be exclusively in tow states: timer fired and not fired.

And then just add to each rule additional check, that timer is not fired. Just check that certain edge in the graph exists.

POSTED BY: Vladimir Gordeev
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract