Skip to main content
. 2023 Sep 20;23(18):7980. doi: 10.3390/s23187980
Algorithm 1 Single-target Insertion Method
Input: Pi, Tj
Output: BPij, mdcij
1 Let  n=len(Pi) , mdcij =104
2 Ui calculates the cost ci according to Pi by Equation (9)
3 For k in range (0, n) do
4   CoPi=copy (Pi)
5   Ui  insert Tj  into CoPi  at the position k
6   Ui  calculates the new cost according to CoPi  by Equation (9), denoted as nci
7   dc=nci −ci
8   If dc<mdcij
9     BPij = CoPi
10     mdcij=dc
11   End if
12 End for