S# is a formal modeling and safety analysis framework for safety-critical systems. It provides a domain specific modeling language and fully automated formal safety analysis tools based on C# and .NET.
Currently all possible distributions can be computed lazily, but since OrderBy() is called on the result, they are actually evaluated eagerly.
Not only is this inefficient, but this also means that later recruitments as well as additional information about the previous resource flow are not considered when retrieving the next distribution. Simply restarting the calculation in such a case may cause an endless loop: as long as the minimal-change distribution is the same, it is checked for a possible resource flow over and over again!
At the minimum, fix the current algorithm to pick up changes by restarting the calculation, while preventing loops by filtering out previous distributions.
Ideally, implement a better algorithm that lazily computes solutions, can thus pick up changes and avoids endless loops.
Currently all possible distributions can be computed lazily, but since
OrderBy()
is called on the result, they are actually evaluated eagerly.Not only is this inefficient, but this also means that later recruitments as well as additional information about the previous resource flow are not considered when retrieving the next distribution. Simply restarting the calculation in such a case may cause an endless loop: as long as the minimal-change distribution is the same, it is checked for a possible resource flow over and over again!