ConflictToStopConverter.emam 469 Bytes
Newer Older
1
2
3
package ba.intersection;

//TODO: x = (n-1)n/2
4
component ConflictToStopConverter<N1 n = 2,N1 x = 1,N1 m = 5>{
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
    port in Z(1:n) indexLookupIn[x];
    port in B conflictIn[x];
    port out B stopOut[n];

    implementation Math{
        for i = 1:n
            stopOut(i) = False;
        end

        for i = 1:x
            if conflictIn(i)
                Z curIndex = indexLookupIn(i);
                stopOut(curIndex) = True;
            end
        end

    }

}