Echtzeitsysteme / gips

Graph-Based (M)ILP Problem Specification Tool
https://gips.dev
GNU General Public License v3.0
3 stars 1 forks source link

Validator: At least use `self` once per sub-constraint #59

Open maxkratz opened 2 years ago

maxkratz commented 2 years ago

The validator must forbid any sub-constraints that do not contain any self reference. Example:

constraint -> pattern::vnodeNotMapped {
    mappings.n2n->filter(m | m.nodes().snode.resourceAmountAvailable > 0)->count() == 1 & self.nodes().vnode.resourceDemand > 0
}```

java.lang.IllegalArgumentException: Context must be used at least once per non-global constraint. at org.emoflon.gips.build.transformation.GipsToIntermediate.transformConstraint(GipsToIntermediate.java:485) at org.emoflon.gips.build.transformation.GipsToIntermediate.transformConstraints(GipsToIntermediate.java:349) at org.emoflon.gips.build.transformation.GipsToIntermediate.transform(GipsToIntermediate.java:86) at org.emoflon.gips.build.GipsProjectBuilder.build(GipsProjectBuilder.java:46)