1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| Quintiq file version 2.0
| #parent: #root
| StaticMethod CreateAllowedCombination (
| Units owners,
| ShiftPatterns shiftpatterns
| ) as owning UnitShiftPatterns
| {
| Description: 'Creates combinations of unit shift pattern based on given shift pattern and unit.'
| TextBody:
| [*
| // Create unitshiftpattern of all combinations
| usps := construct( UnitShiftPatterns );
|
| traverse( shiftpatterns, Elements, shiftpattern )
| {
| traverse( owners, Elements, owner )
| {
| usp := UnitShiftPattern::Create( owner, shiftpattern );
| usp.IsAllowed( true );
| usps.Add( usp );
| }
| }
| return &usps;
| *]
| }
|
|