Merge pull request #144 from Echtzeitsysteme/hotfix/reset_validationLog

Fixed the validation log issue
This commit is contained in:
Maximilian Kratz 2024-04-19 13:05:50 +02:00 committed by GitHub
commit 13e882471a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -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();

View file

@ -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());