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 deleted file mode 100644 index 9f440a3f5..000000000 --- a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/DefaultSmodelConfig.java +++ /dev/null @@ -1,10 +0,0 @@ -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/SmodelInterpreter.java b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/SmodelInterpreter.java index a1e8e8fc3..c40b82c0c 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,7 +28,13 @@ public class SmodelInterpreter implements Analyzer, Planner, IResettable { public SmodelInterpreter(Smodel model, IFieldValueProvider probeValueProvider, IFieldValueProvider envVariableValueProvider) { IFieldValueProvider optimizableValueProvider = new OptimizableValueProvider(); - ISmodelConfig smodelConfig = new DefaultSmodelConfig(); + ISmodelConfig smodelConfig = new ISmodelConfig() { + + @Override + public double getEpsilon() { + return 0.0001; + } + }; 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/ExpressionCalculator.java b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/ExpressionCalculator.java similarity index 96% rename from bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/ExpressionCalculator.java rename to bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/ExpressionCalculator.java index b5a78f468..2ead16671 100644 --- a/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/ExpressionCalculator.java +++ b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/ExpressionCalculator.java @@ -1,7 +1,9 @@ -package org.palladiosimulator.simexp.dsl.smodel.interpreter; +package org.palladiosimulator.simexp.dsl.smodel.interpreter.impl; 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/impl/SmodelAnalyzer.java b/bundles/org.palladiosimulator.simexp.dsl.smodel.interpreter/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/SmodelAnalyzer.java index fcffabbdd..93a4f1fda 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,7 +1,6 @@ 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 80ff06e03..90e20e7b3 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,7 +7,6 @@ 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 2ef0bcbf2..3a6b26c86 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 61268869e..7df543d1d 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/ExpressionCalculatorTest.java b/tests/org.palladiosimulator.simexp.dsl.smodel.interpreter.tests/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/ExpressionCalculatorTest.java similarity index 99% rename from tests/org.palladiosimulator.simexp.dsl.smodel.interpreter.tests/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/ExpressionCalculatorTest.java rename to tests/org.palladiosimulator.simexp.dsl.smodel.interpreter.tests/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/ExpressionCalculatorTest.java index 35c96de0d..2e6cbbe26 100644 --- a/tests/org.palladiosimulator.simexp.dsl.smodel.interpreter.tests/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/ExpressionCalculatorTest.java +++ b/tests/org.palladiosimulator.simexp.dsl.smodel.interpreter.tests/src/org/palladiosimulator/simexp/dsl/smodel/interpreter/impl/ExpressionCalculatorTest.java @@ -1,4 +1,4 @@ -package org.palladiosimulator.simexp.dsl.smodel.interpreter; +package org.palladiosimulator.simexp.dsl.smodel.interpreter.impl; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -14,6 +14,8 @@ 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;