Fix Constratint parser (it should return the constraint)
This commit is contained in:
parent
103360c35e
commit
68fd7509f9
|
@ -31,12 +31,11 @@ public class ConstraintParser {
|
||||||
Expression expression = resolveExpression(matcher.group(3), variableResolver);
|
Expression expression = resolveExpression(matcher.group(3), variableResolver);
|
||||||
double strength = parseStrength(matcher.group(4));
|
double strength = parseStrength(matcher.group(4));
|
||||||
|
|
||||||
new Constraint(Symbolics.subtract(variable, expression), operator);
|
return new Constraint(Symbolics.subtract(variable, expression), operator);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("could not parse " + constraintString);
|
throw new RuntimeException("could not parse " + constraintString);
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static RelationalOperator parseOperator(String operatorString) {
|
private static RelationalOperator parseOperator(String operatorString) {
|
||||||
|
|
Loading…
Reference in New Issue