Echtzeitsysteme / gips

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

Serial `filter(...)` expr: In some cases this breaks semantics #90

Open maxkratz opened 1 year ago

maxkratz commented 1 year ago

In some cases, serial filter(...) expressions break the filter semantics. Example: https://github.com/Echtzeitsysteme/gips-tests/pull/31

constraint -> global {
    mappings.n2n
    ->filter(m | m.nodes().vnode.resourceDemand == 0)
    ->filter(m | m.nodes().snode.resourceAmountTotal == 0)
    ->count() == 0
}

Problem (if I understand it correctly): If the first filter expression (in this case ->filter(m | m.nodes().vnode.resourceDemand == 0)) filters nothing out, i.e., the result should not be an empty set, the second filter(...) operation could not be triggered and, therefore, the count() does not evaluate to 0?