Skip to main content
. 2022 Aug 29;14(17):3551. doi: 10.3390/polym14173551
Algorithm 1: Grid search
INPUT: The current machine parameters M, the current machine run time r, the vector E for ambient sensor data, allowed machine parameters ranges, and a preference function f which rates the desirability of a prediction goal and new machine parameters.
OUTPUT: New machine settings M’best
FOR each machine parameters vector M so that each element is within the defined range DO
|   Compute the predicted surface quality s = Q1(M’, r, E)
|   Compute the predicted weight w = Q2(M’, r, E)
|   Compute the predicted dimensions d = Q3(M’, r, E)
|   IF the current loop iteration is the first or if f(s, w, d, M’, M) > f(sbest, wbest, |    dbest, M’best, M) THEN
|   |   Set M’best = M’.
|   |   Set sbest = s.
|   |   Set wbest = w.
|_    |_   Set dbest = d.
return M’best