fixed a bug in max path len calculation

This commit is contained in:
hneemann 2024-05-09 13:31:05 +02:00
parent 12e85e62f9
commit 10103a3c74
2 changed files with 3 additions and 6 deletions

View File

@ -48,7 +48,7 @@ public final class CycleDetector {
traverse(root, s.getValue(), nodes, visited);
}
// Turned of for now because if it is used you can build circuits with a state
// Turned off for now because if it is used you can build circuits with a cycle
// which are not detected as such.
//removeSwitchCycles(nodes.values());

View File

@ -319,11 +319,8 @@ public class ModelAnalyser {
* @throws AnalyseException AnalyseException
*/
public int calcMaxPathLen() throws PinException, BacktrackException, AnalyseException {
LOGGER.debug("start to calculate the depth of the model...");
if (!Main.isExperimentalMode() && !modelContainsSwitches())
CycleDetector.checkForCycles(inputs);
LOGGER.debug("start to calculate the max path len of the model...");
CycleDetector.checkForCycles(inputs);
PathLenAnalyser da = new PathLenAnalyser(this);
return da.getMaxPathLen();
}