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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
Quintiq file version 2.0
#parent: #root
Method ImportBinaryData (
  BinaryValues binarydatas,
  Strings brokernames,
  output BinaryValue periods_o,
  output BinaryValue uoms_o,
  output BinaryValue currencies_o,
  output BinaryValue priorities_o,
  output BinaryValue shiftpatterns_o,
  output BinaryValue globalparameter_o,
  output BinaryValue salesdemand_o,
  output BinaryValue postponesalesdemandcosts_o,
  output BinaryValue groups_o,
  output BinaryValue units_o,
  output BinaryValue stockingpoints_o,
  output BinaryValue salessegments_o,
  output BinaryValue products_o,
  output BinaryValue lanes_o,
  output BinaryValue routings_o,
  output BinaryValue campaigns_o,
  output BinaryValue servicelevels_o,
  output BinaryValue inventoryspecifications_o,
  output BinaryValue stockingpointcapacities_o,
  output BinaryValue supplyspecifications_o,
  output BinaryValue inventorysupplies_o,
  output BinaryValue entities_o,
  output BinaryValue unitcapacities_o,
  output BinaryValue unitavailabilities_o,
  output BinaryValue transportcapacities_o,
  output BinaryValue transportavailabilities_o,
  output BinaryValue unitcalendars_o,
  output BinaryValue recipes_o,
  output BinaryValue actualpispips_o,
  output BinaryValue feedbacks_o,
  output BinaryValue actualunitperiods_o,
  output BinaryValue optimizerpuzzles_o,
  output BinaryValue postponementspecandfulfillment_o,
  output BinaryValue customerorder_o
)
{
  Description: 'Process the set of binaryvalues and return it in the output argument'
  TextBody:
  [*
    // Initialize looping index
    i := 0;                     
    
    // Traverse all broker names
    traverse( brokernames, Elements, broker )
    {
      // Import PeriodParameters and PeriodSpecifications
      if( broker = typeof( MP_ImportPeriodsBroker ).ShortName() )
      {
        periods_o := binarydatas.Element( i );
      }
      // Import UnitOfMeasures and BaseCoversionFactors
      else if( broker = typeof( MP_ImportUnitOfMeasuresBroker).ShortName() )// general uom
      {
        uoms_o := binarydatas.Element( i );
      }
      // Import Currencies and CurrencyRates
      else if( broker = typeof( MP_ImportCurrenciesBroker ).ShortName() ) // general currency
      {
        currencies_o := binarydatas.Element( i );
      }
      // Import Priorities
      else if( broker = typeof( MP_ImportPrioritiesBroker ).ShortName() ) // general priority
      {
        priorities_o := binarydatas.Element( i );
      }
      // Import ShiftDays and ShiftPatterns
      else if( broker = typeof( MP_ImportShiftPatternsBroker ).ShortName() ) // general shift pattern
      {
        shiftpatterns_o := binarydatas.Element( i );
      }
      // Import GlobalParameters
      else if( broker = typeof( MP_ImportGlobalParametersBroker ).ShortName() )
      {
        globalparameter_o := binarydatas.Element( i );
      }
      // Import GroupsBroker
      else if( broker = typeof( MP_ImportGroupsBroker ).ShortName() ) // entities
      {
        groups_o := binarydatas.Element( i );
      }
      // Import UnitsBroker
      else if( broker = typeof( MP_ImportUnitsBroker ).ShortName() ) // entities
      {
        units_o := binarydatas.Element( i );
      }
      // Import StockingPoints
      else if( broker = typeof( MP_ImportStockingPointsBroker ).ShortName() )//entities
      {
        stockingpoints_o := binarydatas.Element( i );
      }
      // Import SalesSegments
      else if( broker = typeof( MP_ImportSalesSegmentsBroker ).ShortName() )//entities
      {
        salessegments_o := binarydatas.Element( i );
      }
      // Import Products
      else if( broker = typeof( MP_ImportProductsBroker ).ShortName() )
      {
        products_o := binarydatas.Element( i );
      }
      // Import SalesDemand
      else if( broker = typeof( MP_ImportForecastsBroker ).ShortName() )
      {
        salesdemand_o := binarydatas.Element( i );
      }
      // Import Lanes
      else if( broker = typeof( MP_ImportLanesBroker ).ShortName() )
      {
        lanes_o := binarydatas.Element( i );
      }
      // Import Routings
      else if( broker = typeof( MP_ImportRoutingsBroker ).ShortName() )
      {
        routings_o := binarydatas.Element( i );
      }
      // Import Campaigns
      else if( broker = typeof( MP_ImportCampaignsBroker ).ShortName() )
      {
        campaigns_o := binarydatas.Element( i );
      }
      // Import ServiceLevels
      else if( broker = typeof( MP_ImportServiceLevelsBroker ).ShortName() )
      {
        servicelevels_o := binarydatas.Element( i );
      }
      // Import InventorySpecifications
      else if( broker = typeof( MP_ImportInventorySpecificationsBroker ).ShortName() )
      {
        inventoryspecifications_o := binarydatas.Element( i );
      }
      // Import InventorySupplies
      else if( broker = typeof( MP_ImportInventorySuppliesBroker ).ShortName() )
      {
        inventorysupplies_o := binarydatas.Element( i );
      }
      // Import StockingPointCapacities
      else if( broker = typeof( MP_ImportStockingPointCapacitiesBroker ).ShortName() )
      {
        stockingpointcapacities_o := binarydatas.Element( i );
      }
      // Import SupplySpecifications
      else if( broker = typeof( MP_ImportSupplySpecificationsBroker ).ShortName() )
      {
        supplyspecifications_o := binarydatas.Element( i );
      }
      // Import Entity Costs (InventoryValueAndCost, LaneCost, LaneLegCost, OperationCost, ProductValueAndCost, StockingPointCost, UnitCost)
      else if( broker = typeof( MP_ImportEntityCostsBroker ).ShortName() )
      {
        entities_o := binarydatas.Element( i );
      }
      // Import UnitCapacities
      else if( broker = typeof(  MP_ImportUnitCapacitiesBroker ).ShortName() )
      {
        unitcapacities_o := binarydatas.Element( i );
      }
      // Import UnitAvailabilities
      else if( broker = typeof( MP_ImportUnitAvailabilitiesBroker ).ShortName() )
      {
        unitavailabilities_o := binarydatas.Element( i );
      }
      // Import TransportCapacities
      else if( broker = typeof( MP_ImportTransportCapacitiesBroker ).ShortName() )
      {
        transportcapacities_o := binarydatas.Element( i );
      }
      // Import TransportAvailabilities
      else if( broker = typeof( MP_ImportTransportAvailabilitiesBroker ).ShortName() )
      {
        transportavailabilities_o := binarydatas.Element( i );
      }
      // Import UnitCalendars
      else if( broker = typeof( Broker_LibCal_ImportCalendars ).ShortName() )
      {
        unitcalendars_o := binarydatas.Element( i );
      }
      // Import Recipes
      else if( broker = typeof( MP_ImportRecipesBroker ).ShortName() )
      {
        recipes_o := binarydatas.Element( i );
      }
      // Import Actuals
      else if( broker = typeof( MP_ImportActualPISPIPsBroker ).ShortName() )
      {
        actualpispips_o := binarydatas.Element( i );
      }
      else if( broker = typeof( MP_ImportActualUnitPeriodsBroker ).ShortName() )
      {
        actualunitperiods_o := binarydatas.Element( i );
      }
      // Import Feedbacks
      else if( broker = typeof( MP_ImportFeedbacksBroker ).ShortName() )
      {
        feedbacks_o :=  binarydatas.Element( i );
      }
      // Import Optimizer Puzzles
      else if( broker = typeof( MP_ImportOptimizerPuzzlesBroker ).ShortName() )
      {
        optimizerpuzzles_o :=  binarydatas.Element( i );
      }
      // Import Postponement spec and Fulfillment
      else if( broker = typeof( MP_ImportPostponementsAndFulfillmentsBroker ).ShortName() )
      {
        postponementspecandfulfillment_o :=  binarydatas.Element( i );
      }
      // Import customer order
      else if( broker = typeof( MP_ImportCustomerOrderBroker ).ShortName() )
      {
        customerorder_o :=  binarydatas.Element( i );
      }
     
      // Increase looping index by 1
      i := i + 1;
    }
  *]
}