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
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
Quintiq file version 2.0
#parent: #root
Method DisplayGoalValue (
  CapacityPlanningSuboptimizer_CapacityPlanningAlgorithm program,
  const RunContextForCapacityPlanning runcontext
)
{
  Description: 'Display goal values'
  TextBody:
  [*
    slmp := this.CurrentSubOptimizerLevel().GetStrategyLevelMacroPlan(); 
    
    info( Translations::Algorithm_MP_InfoGoalValuesForExecution( [String]this.CurrentSubOptimizerLevel().LevelNumber() ) );
    info( Translations::Algorithm_MP_InfoScalingFactors( [String]runcontext.MassScalingFactor(), [String]runcontext.MonetaryScalingFactor() ) );
    info( Translations::Algorithm_MP_InfoGoalScalingFactorForLevel( [String] slmp.GoalScaling() ) );
    info( Translations::Algorithm_MP_InfoRelativeGoalSlackForLevel( [String] slmp.RelativeGoalSlack() ) );
    
    weightlevels := runcontext.WeightLevelNonFinancial(); 
    
    traverse( this, MacroPlan.StrategyMacroPlan.StrategyLevelMacroPlan, sl ) 
    {
      if( weightlevels.SlackLevel() = sl.Level() and weightlevels.SlackWeight() > 0.0 )
      {
         info( this.GetPrefix( program, weightlevels.SlackLevel() )
              + Translations::Algorithm_MP_InfoTotalSlack( [String]program.TotalSlackVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.StockingPointCapacityLevel() = sl.Level() and weightlevels.StockingPointCapacityWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.StockingPointCapacityLevel() )
              + Translations::Algorithm_MP_InfoStockingPointCapacity( [String]program.TotalStockingPointCapacityVariables().Get().OptimalValue() ) );
      }
      
      if( runcontext.UseBlending() and weightlevels.BlendingLevel() = sl.Level() )
      {
        info( this.GetPrefix( program, weightlevels.BlendingLevel() )
              + Translations::Algorithm_MP_InfoBlending( [String]program.TotalBlendingVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.CampaignLevel() = sl.Level() and weightlevels.CampaignWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.CampaignLevel() )
              + Translations::Algorithm_MP_InfoCampaign( [String]program.TotalCampaignVariables().Get().OptimalValue() ) );
      }
      
      if( weightlevels.UnitCapacityLevel() = sl.Level() and weightlevels.UnitCapacityWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.UnitCapacityLevel() )
              + Translations::Algorithm_MP_InfoUnitCapacity( [String]program.TotalUnitCapacityVariables().Get().OptimalValue() ) );
        
        info( this.GetPrefix( program, weightlevels.UnitCapacityLevel() )
              + Translations::Algorithm_MP_InfoUnitSecondaryCapacity( [String]program.TotalUnitSecondaryCapacityVariables().Get().OptimalValue() ) );
      }
      
      if( weightlevels.InventoryMixBalancingLevel() = sl.Level() and weightlevels.InventoryMixBalancingWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.InventoryMixBalancingLevel() )
              + Translations::Algorithm_MP_InfoInventoryMixBalancing( [String]program.TotalInventoryMixBalancingVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.LotSizeLevel() = sl.Level() and weightlevels.LotSizeWeight() > 0.0 )
      {
       info( this.GetPrefix( program, weightlevels.LotSizeLevel() )
              + Translations::Algorithm_MP_InfoLotSize( [String]program.TotalLotSizeVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.MaximumInventoryLevel() = sl.Level() and weightlevels.MaximumInventoryLevelWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.MaximumInventoryLevel() )
              + Translations::Algorithm_MP_InfoMaximumInventoryLevel( [String]program.TotalMaximumInventoryLevelVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.MinimumInventoryLevel() = sl.Level() and weightlevels.MinimumInventoryLevelWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.MinimumInventoryLevel() )
              + Translations::Algorithm_MP_InfoMinimumInventoryLevel( [String]program.TotalMinimumInventoryLevelVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.MaximumSupplyLevel() = sl.Level() and weightlevels.MaximumSupplyWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.MaximumSupplyLevel() )
              + Translations::Algorithm_MP_InfoMaximumSupply( [String]program.TotalMaximumSupplyVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.MinimumSupplyLevel() = sl.Level() and weightlevels.MinimumSupplyWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.MinimumSupplyLevel() )
              + Translations::Algorithm_MP_InfoMinimumSupply( [String]program.TotalMinimumSupplyVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.MinimumUnitCapacityLevel() = sl.Level() and weightlevels.MinimumUnitCapacityWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.MinimumUnitCapacityLevel() )
              + Translations::Algorithm_MP_InfoMinimumUnitCapacity( [String]program.TotalMinimumUnitCapacityVariables().Get().OptimalValue() ) );
              
        info( this.GetPrefix( program, weightlevels.MinimumUnitCapacityLevel() )
              + Translations::Algorithm_MP_InfoMinimumUnitSecondaryCapacity( [String]program.TotalMinimumUnitSecondaryCapacityVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.PostponementPenaltyLevel() = sl.Level() and weightlevels.PostponementPenaltyWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.PostponementPenaltyLevel() )
              + Translations::Algorithm_MP_InfoPostponementPenalty( [String]program.TotalPostponementPenaltyVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.ProcessMaximumQuantityLevel() = sl.Level() and weightlevels.ProcessMaximumQuantityWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.ProcessMaximumQuantityLevel() )
              + Translations::Algorithm_MP_InfoProcessMaximumQuantity( [String]program.TotalProcessMaximumQuantityVariables().Get().OptimalValue() ) );
      }
      
      if( weightlevels.SalesDemandPriorityLevel() = sl.Level() and weightlevels.SalesDemandPriorityWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.SalesDemandPriorityLevel() )
              + Translations::Algorithm_MP_InfoSalesDemandPriority( [String]program.TotalSalesDemandPriorityVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.FulfillmentTargetLevel() = sl.Level() and weightlevels.FulfillmentTargetWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.FulfillmentTargetLevel() )
              + Translations::Algorithm_MP_InfoFulfillmentTarget( [String]program.TotalFulfillmentTargetVariables().Get().OptimalValue() ) );
      }
      
      if( weightlevels.FulfillmentLevel() = sl.Level() and weightlevels.FulfillmentWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.FulfillmentLevel() )
              + Translations::Algorithm_MP_InfoFulfillment( [String]program.TotalFulfillmentVariables().Get().OptimalValue() ) );
      }
      
      if( weightlevels.ServiceLevelLevel() = sl.Level() and weightlevels.ServiceLevelWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.ServiceLevelLevel() )
              + Translations::Algorithm_MP_InfoServiceLevel( [String]program.TotalServiceLevelVariables().Get().OptimalValue() ) );
      }
      
      if( weightlevels.SupplyTargetLevel() = sl.Level() and weightlevels.SupplyTargetWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.SupplyTargetLevel() )
              + Translations::Algorithm_MP_InfoSupplyTarget( [String]program.TotalSupplyTargetVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.TargetInventoryLevel() = sl.Level() and weightlevels.TargetInventoryLevelWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.TargetInventoryLevel() )
              + Translations::Algorithm_MP_InfoTargetInventoryLevel( [String]program.TotalTargetInvLevelVariables().Get().OptimalValue() ) );
      }
          
      if( runcontext.UseExpiredQty() and weightlevels.ExpiredQtyLevel() = sl.Level() )
      {
        info( this.GetPrefix( program, weightlevels.ExpiredQtyLevel() )
              + Translations::Algorithm_MP_InfoTotalExpiredQty( [String] program.TotalExpiredQtyVariables().Get().OptimalValue() ));
      }
      
      if( weightlevels.CO2EmissionLevel() = sl.Level() and weightlevels.CO2EmissionWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.CO2EmissionLevel() )
              + Translations::Algorithm_MP_InfoCO2Emission( [String]program.TotalCO2EmissionVariables().Get().OptimalValue() ) );
      }
      if( weightlevels.ShiftPatternChangesPenaltyLevel() = sl.Level() and weightlevels.ShiftPatternChangesPenaltyWeight() > 0.0 )
      {
        info( this.GetPrefix( program, weightlevels.ShiftPatternChangesPenaltyLevel() )
              + Translations::Algorithm_MP_InfoShiftPatternChangesPenalty( [String] program.TotalShiftPatternChangesPenaltyVariables().Get().OptimalValue() ) );
      }
    }
  *]
  InterfaceProperties { Accessibility: 'Module' }
}