#80 -- fix consequents

pull/87/head
Anton Romanov 1 year ago
parent 1cd53459ed
commit 412d22fafd

@ -56,7 +56,7 @@ public class FuzzyInferenceService {
dbRule.getFirstAntecedentValue().getAntecedentValue(),
dbRule.getSecondAntecedent().name(),
dbRule.getSecondAntecedentValue().getAntecedentValue(),
dbRule.getConsequent());
dbRule.getConsequent().replaceAll(" ", "_"));
}
private RuleBlock getRuleBlock(Engine engine,
@ -86,7 +86,7 @@ public class FuzzyInferenceService {
output.setDefaultValue(Double.NaN);
output.setLockValueInRange(false);
for (int i = 0; i < consequentValues.size(); i++) {
output.addTerm(new Triangle(consequentValues.get(i), i - 0.1, i + 2.1));
output.addTerm(new Triangle(consequentValues.get(i).replaceAll(" ", "_"), i - 0.1, i + 2.1));
}
engine.addOutputVariable(output);

Loading…
Cancel
Save