## 2 Proposed Methodology
### Cost Function  
Significant consideration must be given while assessing the cost function for an AM process. The selection criteria of an AM technology largely depend on machines, location, materials, post-processing operations, and many other factors that are deployed in an AM production line. This must also be considered while deriving a cost function for an AM technology. This will determine the most viable AM technology to build a product. The calculation of a cost function will vary significantly in different AM technologies that are currently available in the market. This is because, depending on the AM technology deployed, the values of these factors will vary. For example, the cost factors of a material extrusion process are different when compared with the ones associated with a powder bed fusion process. This could be in the form of energy consumption, labour, overheads, materials cost, capital investment for an AM machine, support volume generated for a build, which in particular can affect the material cost depending on the chosen orientation, or it could be in the form of necessary post-processing operations required for a finished product.  
The cost per order is calculated by each Machine Agent for every machine and process profile by considering process material and time requirements as well as shipping cost elements [62, 63]. Equation (1) shows a generic cost function used for estimating the overall cost. This equation is derived based on existing techno-economical models used for conventional manufacturing processes [63].  
\[C_{sc}=Q.\{A_{sc}\cdot[\text{1-}d(Q,W_{sc})]\cdot T_{sc}+M_{sc}\cdot W_{sc}+P_{ sc}+K_{s}\cdot W_{sc}\cdot D_{s}\}+F.\ [\text{1-}d(Q,W_{sc})] \tag{1}\]  
where:  
* \(s\) denotes the Machine Agent representing a specific machine of a service provider,
* \(c\) denotes the process configuration index,
* \(C_{sc}\) is the overall cost for agent s and configuration \(c\),
* \(Q\) is the order quantity,
* \(A_{sc}\) is the cost rate (\(\xi\)/h) for configuration \(c\) of the machine represented by agent \(s\),
* \(T_{sc}\) represents the processing time per piece if configuration \(c\) of the machine represented by agent \(s\) is selected,
* \(M_{sc}\) is the total material cost (\(\xi\)/kg) for building the part using configuration \(c\) of the machine represented by agent \(s\),
* \(W_{sc}\) is the overall weight (kg) of the piece if configuration \(c\) of the machine represented by agent \(s\) is used, including support material,
* \(P_{sc}\) represents the set-up and post-processing operations cost per part,  
Figure 6: UML Class diagram of main platform components.  
* \(K_{s}\) is the average shipping cost rate from the service provider represented by agent \(s\) [F/(km.kg)],
* \(D_{s}\) is the distance between the service provider represented by agent \(s\) and the Designer's location and
* \(F\) is the fixed cost per order,
* \(d(Q,W_{\text{sc}})\) is the discount rate applied, based on the overall cost, excluding material costs, which is in turn a function of the part weight and ordered quantity.  
Since the cost function is generic enough so that it can be applied across multiple machine profiles and configurations irrespective of the AM technology or machine used, machine and build plate utilisation were assumed to be at their maximum of 100%. Furthermore, the costs regarding labour or energy consumption would be categorized under the cost rate (\(A_{sc}\)). Fixed cost (\(F\)) includes overheads and the initial cost of the machines and infrastructure required for the production facility.