haorenhui
2023-10-30 6d6cc10d9e8e242661da7fd655dec155a09d676c
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
Quintiq file version 2.0
#parent: #root
Method OnFinish
{
  Description: 'This method is called as a post-process or clean-up after a run ends.'
  TextBody:
  [*
    this.FinishedOn( DateTime::ActualTime() );
    this.FinishedOnPrecision( OS::PrecisionCounter() / OS::PrecisionCounterFrequency() );
    if( this.AutoIterationsEnabled() )
    {
      this.HasIterations( true );
    }
    
    traverse( this, Scope.astype( LibOpt_ScopeThin ), scope )
    {
      scope.ConvertToFat();
    }
    if( this.IsAutoCleanupSnapshots() )
    {
      this.CleanupSnapshots();
    }
    Transaction::Transaction().Propagate( method( LibOpt_Run, CreateStatisticsAndIssuesPrecondition, Boolean ) );
    if( this.AutoAnalysisEnabled() and this.CreateStatisticsAndIssuesPrecondition( true /*is fail-fast check*/ ) )
    {
      this.CreateStatisticsAndIssues();
    }
  *]
  InterfaceProperties { Accessibility: 'Module' }
}