mirror of
https://github.com/Echtzeitsysteme/gips.git
synced 2024-05-21 20:00:23 +00:00
+ Fixed the validation log issue, by resetting the validation log before each Problem is built.
This commit is contained in:
parent
953beea22e
commit
4d1241ab8a
|
@ -21,7 +21,7 @@ import org.emoflon.gips.intermediate.GipsIntermediate.Variable;
|
|||
|
||||
public abstract class GipsConstraint<ENGINE extends GipsEngine, CONSTR extends Constraint, CONTEXT extends Object> {
|
||||
final protected ENGINE engine;
|
||||
final protected GipsConstraintValidationLog validationLog;
|
||||
protected GipsConstraintValidationLog validationLog;
|
||||
final protected TypeIndexer indexer;
|
||||
final protected CONSTR constraint;
|
||||
final protected String name;
|
||||
|
@ -51,6 +51,7 @@ public abstract class GipsConstraint<ENGINE extends GipsEngine, CONSTR extends C
|
|||
this.ilpConstraints.clear();
|
||||
this.additionalIlpConstraints.clear();
|
||||
this.additionalVariables.clear();
|
||||
this.validationLog = engine.getValidationLog();
|
||||
}
|
||||
|
||||
public abstract void buildConstraints();
|
||||
|
|
|
@ -34,6 +34,9 @@ public abstract class GipsEngine {
|
|||
if (doUpdate)
|
||||
update();
|
||||
|
||||
// Reset validation log
|
||||
validationLog = new GipsConstraintValidationLog();
|
||||
|
||||
// Constraints are re-build a few lines below
|
||||
constraints.values().stream().forEach(constraint -> constraint.clear());
|
||||
|
||||
|
|
Loading…
Reference in a new issue