Skip to content

Commit

Permalink
moved ExpressionCalculatore to interpreter package
Browse files Browse the repository at this point in the history
  • Loading branch information
rsfzi committed Jan 10, 2025
1 parent a3c0704 commit f88fe52
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.palladiosimulator.simexp.dsl.smodel.interpreter;

public class DefaultSmodelConfig implements ISmodelConfig {

@Override
public double getEpsilon() {
return 0.0001;
}

}
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit f88fe52

Please sign in to comment.