diff --git a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/DefaultSmodelConfig.java b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/DefaultSmodelConfig.java new file mode 100644 index 000000000..9f440a3f5 --- /dev/null +++ b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/DefaultSmodelConfig.java @@ -0,0 +1,10 @@ +package org.palladiosimulator.simexp.dsl.smodel.interpreter; + +public class DefaultSmodelConfig implements ISmodelConfig { + + @Override + public double getEpsilon() { + return 0.0001; + } + +} diff --git a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/ExpressionCalculator.java b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/ExpressionCalculator.java similarity index 96% rename from bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/ExpressionCalculator.java rename to bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/ExpressionCalculator.java index 2ead16671..b5a78f468 100644 --- a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/ExpressionCalculator.java +++ b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/ExpressionCalculator.java @@ -1,9 +1,7 @@ -package org.palladiosimulator.simexp.dsl.smodel.interpreter.impl; +package org.palladiosimulator.simexp.dsl.smodel.interpreter; import org.apache.commons.math3.util.Precision; import org.palladiosimulator.simexp.dsl.smodel.api.IExpressionCalculator; -import org.palladiosimulator.simexp.dsl.smodel.interpreter.IFieldValueProvider; -import org.palladiosimulator.simexp.dsl.smodel.interpreter.ISmodelConfig; import org.palladiosimulator.simexp.dsl.smodel.smodel.BoolLiteral; import org.palladiosimulator.simexp.dsl.smodel.smodel.DataType; import org.palladiosimulator.simexp.dsl.smodel.smodel.DoubleLiteral; diff --git a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/SmodelInterpreter.java b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/SmodelInterpreter.java index c40b82c0c..a1e8e8fc3 100644 --- a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/SmodelInterpreter.java +++ b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/SmodelInterpreter.java @@ -28,13 +28,7 @@ public class SmodelInterpreter implements Analyzer, Planner, IResettable { public SmodelInterpreter(Smodel model, IFieldValueProvider probeValueProvider, IFieldValueProvider envVariableValueProvider) { IFieldValueProvider optimizableValueProvider = new OptimizableValueProvider(); - ISmodelConfig smodelConfig = new ISmodelConfig() { - - @Override - public double getEpsilon() { - return 0.0001; - } - }; + ISmodelConfig smodelConfig = new DefaultSmodelConfig(); IFieldValueProvider constantValueProvider = new ConstantValueProvider(smodelConfig); variableValueProvider = new VariableValueProvider(smodelConfig, constantValueProvider, probeValueProvider, optimizableValueProvider, envVariableValueProvider); diff --git a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/SmodelAnalyzer.java b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/SmodelAnalyzer.java index 93a4f1fda..fcffabbdd 100644 --- a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/SmodelAnalyzer.java +++ b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/SmodelAnalyzer.java @@ -1,6 +1,7 @@ package org.palladiosimulator.simexp.dsl.smodel.interpreter.impl; import org.palladiosimulator.simexp.dsl.smodel.api.IExpressionCalculator; +import org.palladiosimulator.simexp.dsl.smodel.interpreter.ExpressionCalculator; import org.palladiosimulator.simexp.dsl.smodel.interpreter.IFieldValueProvider; import org.palladiosimulator.simexp.dsl.smodel.interpreter.ISmodelConfig; import org.palladiosimulator.simexp.dsl.smodel.interpreter.mape.Analyzer; diff --git a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/SmodelPlaner.java b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/SmodelPlaner.java index 90e20e7b3..80ff06e03 100644 --- a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/SmodelPlaner.java +++ b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/SmodelPlaner.java @@ -7,6 +7,7 @@ import org.apache.log4j.Logger; import org.eclipse.emf.ecore.EObject; import org.palladiosimulator.simexp.dsl.smodel.api.IExpressionCalculator; +import org.palladiosimulator.simexp.dsl.smodel.interpreter.ExpressionCalculator; import org.palladiosimulator.simexp.dsl.smodel.interpreter.IFieldValueProvider; import org.palladiosimulator.simexp.dsl.smodel.interpreter.ISmodelConfig; import org.palladiosimulator.simexp.dsl.smodel.interpreter.IVariableAssigner; diff --git a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/value/ConstantValueProvider.java b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/value/ConstantValueProvider.java index 3a6b26c86..2ef0bcbf2 100644 --- a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/value/ConstantValueProvider.java +++ b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/value/ConstantValueProvider.java @@ -1,9 +1,9 @@ package org.palladiosimulator.simexp.dsl.smodel.interpreter.value; import org.palladiosimulator.simexp.dsl.smodel.api.IExpressionCalculator; +import org.palladiosimulator.simexp.dsl.smodel.interpreter.ExpressionCalculator; import org.palladiosimulator.simexp.dsl.smodel.interpreter.IFieldValueProvider; import org.palladiosimulator.simexp.dsl.smodel.interpreter.ISmodelConfig; -import org.palladiosimulator.simexp.dsl.smodel.interpreter.impl.ExpressionCalculator; import org.palladiosimulator.simexp.dsl.smodel.smodel.Constant; import org.palladiosimulator.simexp.dsl.smodel.smodel.Expression; import org.palladiosimulator.simexp.dsl.smodel.smodel.Field; diff --git a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/value/VariableValueProvider.java b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/value/VariableValueProvider.java index 7df543d1d..61268869e 100644 --- a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/value/VariableValueProvider.java +++ b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/value/VariableValueProvider.java @@ -7,11 +7,11 @@ import java.util.TreeMap; import org.palladiosimulator.simexp.dsl.smodel.api.IExpressionCalculator; +import org.palladiosimulator.simexp.dsl.smodel.interpreter.ExpressionCalculator; import org.palladiosimulator.simexp.dsl.smodel.interpreter.IFieldValueProvider; import org.palladiosimulator.simexp.dsl.smodel.interpreter.IResettable; import org.palladiosimulator.simexp.dsl.smodel.interpreter.ISmodelConfig; import org.palladiosimulator.simexp.dsl.smodel.interpreter.IVariableAssigner; -import org.palladiosimulator.simexp.dsl.smodel.interpreter.impl.ExpressionCalculator; import org.palladiosimulator.simexp.dsl.smodel.smodel.DataType; import org.palladiosimulator.simexp.dsl.smodel.smodel.Expression; import org.palladiosimulator.simexp.dsl.smodel.smodel.Field; diff --git a/tests/org.palladiosimulator.simexp.dsl.smodel.interpreter.tests/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/ExpressionCalculatorTest.java b/tests/org.palladiosimulator.simexp.dsl.smodel.interpreter.tests/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/ExpressionCalculatorTest.java similarity index 99% rename from tests/org.palladiosimulator.simexp.dsl.smodel.interpreter.tests/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/ExpressionCalculatorTest.java rename to tests/org.palladiosimulator.simexp.dsl.smodel.interpreter.tests/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/ExpressionCalculatorTest.java index 2e6cbbe26..35c96de0d 100644 --- a/tests/org.palladiosimulator.simexp.dsl.smodel.interpreter.tests/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/ExpressionCalculatorTest.java +++ b/tests/org.palladiosimulator.simexp.dsl.smodel.interpreter.tests/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/ExpressionCalculatorTest.java @@ -1,4 +1,4 @@ -package org.palladiosimulator.simexp.dsl.smodel.interpreter.impl; +package org.palladiosimulator.simexp.dsl.smodel.interpreter; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -14,8 +14,6 @@ import org.junit.Test; import org.mockito.Mock; import org.palladiosimulator.simexp.dsl.smodel.SmodelStandaloneSetup; -import org.palladiosimulator.simexp.dsl.smodel.interpreter.IFieldValueProvider; -import org.palladiosimulator.simexp.dsl.smodel.interpreter.ISmodelConfig; import org.palladiosimulator.simexp.dsl.smodel.smodel.Constant; import org.palladiosimulator.simexp.dsl.smodel.smodel.Smodel; import org.palladiosimulator.simexp.dsl.smodel.smodel.StringLiteral;