\r
import java.io.StringReader;\r
import java.util.ArrayList;\r
+import java.util.Arrays;\r
import java.util.HashMap;\r
+import java.util.List;\r
import java.util.Set;\r
\r
import org.simantics.sysdyn.expressionParser.ExpressionParser;\r
PARAMETER("parameter"),\r
CONSTANT("constant"),\r
CONTINUOUS("");\r
+ \r
+ \r
+ private static List<String> timeDependentFunctions = Arrays.asList(\r
+ "pre",\r
+ "delay"\r
+ );\r
\r
private String text;\r
\r
references.remove(t.image);\r
}\r
}\r
+ \r
+ // Check used functions\r
+ for(String function : parser.getFunctionCallReferences().keySet()) {\r
+ if(functions.containsKey(function) && functions.get(function).hasTimeReference())\r
+ return Variability.CONTINUOUS;\r
+ else if (timeDependentFunctions.contains(function)) {\r
+ return Variability.CONTINUOUS;\r
+ }\r
+ }\r
\r
// Go through each reference\r
for(String reference : references) {\r
}\r
}\r
\r
- for(String function : parser.getFunctionCallReferences().keySet()) {\r
- if(functions.containsKey(function) && functions.get(function).hasTimeReference())\r
- return Variability.CONTINUOUS;\r
- }\r
-\r
// All found variables were sheets or non-continuous\r
return Variability.PARAMETER;\r
}\r