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
41
42
43
44
45
46
47
48
49
50
Quintiq file version 2.0
#parent: #root
Method Update (
  Unit owner,
  String id,
  String name,
  RoutingStep routingstep,
  Duration leadtime,
  Duration standarddeviationleadtime,
  Real throughput,
  Boolean hasuserlotsize,
  Real userminimumquantity,
  Boolean hasusermaximumquantity,
  Real usermaximumquantity,
  Real userlotsize,
  Real co2Emission,
  Boolean isfromdb
) as Operation
{
  Description: 'Update operation'
  TextBody:
  [*
    // Update operation
    this.UpdateTypeIndex( id );
    
    /* Set to SystemName instead of Name
       Name will declaratively refer to SystemName */
    this.SystemName( name );
    this.StandardDeviationLeadTimeOperation( standarddeviationleadtime );
    this.Throughput( throughput );
    this.HasUserLotSize( hasuserlotsize );
    this.UserMinimumQuantity( userminimumquantity );
    this.HasUserMaximumQuantity( hasusermaximumquantity );
    this.UserMaximumQuantity( usermaximumquantity );
    this.UserLotSize( userlotsize );
    this.CO2Emission( co2Emission );
    
    owner.Operation( relmove, this );
    this.RoutingID( routingstep.Routing().ID() );
    this.RoutingStepName( routingstep.Name() );
    
    this.UpdateLeadTime( leadtime );
    
    this.UpdateCommitLogic( owner );
    
    this.IsManuallyConfigured( not isfromdb );
    
    return this;
  *]
}