yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Quintiq file version 2.0
#parent: #root
Method CreateAllComponents () as owning LibOpt_Runs
{
  TextBody:
  [*
    original := this.Run( relget );
    
    // Iterator
    it := this.IteratorUntil( this.CreateRun(), 'Iterator1' );
    it.SetMaxLocalDuration( Duration::Seconds( 1 ) );
    it := this.IteratorUntil( this.CreateRun(), 'Iterator2' );
    it.SetMaxIterations( 10 );
    it := this.IteratorUntil( this.CreateRun(), 'Iterator3' );
    it.SetMaxIterations( 10 );
    it.SetMaxLocalDuration( Duration::Seconds( 1 ) );
    this.IteratorForEachLink( this.CreateRun(), 'IteratorForeach' );
    
    // Switches
    this.SwitchPriority( this.CreateRun(), 'SwitchPriority' );
    this.SwitchProbability( this.CreateRun(), 'SwitchProbability' );
    this.SwitchRoundRobin( this.CreateRun(), 'SwitchRoundRobin' );
    
    // Selectors
    neighborhood := construct( LibOpt_NeighborhoodCreatorTest );
    this.SelectorAnchor( this.CreateRun(), 'SelectorAnchor', this.AnchorSetAll(), this.AnchorPickerRandom(), & neighborhood );
    
    // Suboptimizers
    run := this.CreateRun();
    runcontextforutf := LibOpt_MyRunContextForUTF::Create( run );
    this.MPSuboptimizer( run, 'MP', runcontextforutf );
    
    run := this.CreateRun();
    runcontextforutf := LibOpt_MyRunContextForUTF::Create( run );
    this.POASuboptimizer( run, 'POA', runcontextforutf );
    
    return this.Run( relget ).Difference( original );
  *]
  InterfaceProperties { Accessibility: 'Module' }
}