admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Quintiq file version 2.0
#parent: #root
StaticMethod Transform (LibOpt_Task task, LibOpt_ScopeElement from, LibOpt_ScopeElement to)
{
  Description:
  [*
    Update the `LibOpt_Scopes` that contain the `from` `LibOpt_ScopeElement` and are the input of one of the ancestors of the supplied `LibOpt_Task`, with the `to` `LibOpt_ScopeElement`.
    We strongly advice against using this method, as this makes the execution of the optimizer less transparent.
    However, we realize there are good reasons to do so, for example, when an order is split or two orders are merged, the same needs to happen to the `LibOpt_ScopeElements`.
  *]
  TextBody:
  [*
    from_set := construct( LibOpt_ScopeElements );
    from_set.Add( from );
    
    to_set := construct( LibOpt_ScopeElements );
    to_set.Add( to );
    LibOpt_ScopeElement::Transform( task, from_set, to_set );
  *]
}