chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
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
Quintiq file version 2.0
#parent: #root
Method UpdateReplannableSnapshots
{
  Description:
  [*
    Some attributes of the `LibOpt_SnapshotReplannableCopyDataset` objects in this dataset might be outdated, because the status of some of the datasets might have changed while the user was working in another dataset.
    These attributes are updated in `snapshot.Update(...)`.
    The attributes are mainly used for the 'Status' image attribute column that is used in the 'Snapshots' and 'Replannable snapshots' forms.
  *]
  TextBody:
  [*
    // evr3 Apr-29-2020 (created)
    
    snapshots := selectset( this, Optimizer.Run.Snapshot.astype( LibOpt_SnapshotReplannableCopyDataset ), snapshot, true );
    
    if( snapshots.Size() > 0 )
    {
      // editor.ObjectInfos can be very expensive
      editor := MDSEditor::Editor();
      objectinfos := editor.ObjectInfos();
      infocurrentdataset := editor.LoadedObjectInfo( this.MDSID() );
      
      traverse( snapshots, Elements, snapshot )
      {
        snapshot.Update( objectinfos, infocurrentdataset );
      }
    }
  *]
  InterfaceProperties { Accessibility: 'Module' }
}