برنامه جستجوی لیست پیوندی چند مقداری با الگوریتمBFS-BB

samadehghan

عضو جدید
سلام
دارم روی مقاله ی Intelligent test case generation based on branch and bound کار می کنم
یه سری شبه کد داره که بدجور توش گیر کردم :58: لطفا بهم کمک کنید
خیلی خیلی مهم برام
ممنونم از کمکتون

Input p : the path to be traversed
Output result < Variable 􀀶 Value > : a test case making p feasible
Stage 1: Initialization
1: result←null;
2: call Algorithm 2 variable permutation;
3: x1←head(Q1);
4: V11←select(D11);
5: initial state←(null, x1, D11, V11, active, Q1);
6: Scur←initial state;
Stage 2: State space search
Begin
7: for (Pre, xi, Dij, Vij, active, Qi)(i→1:n)
8: successful←false;
9: call Algorithm 3 interval computation;
10: if (successful=false)
11: if (|Dij|=1||j≥ m)
12: Scur←(Pre, xi, Dij, Vij, inactive, Qi);
13: Pre←Scur;
14: Scur←(Pre, xi, Di, Vi, active, Qi);
15: PV←PV-{xi};
16: else j++;
17: if (distance<0)
18: Dij←[Vij+1, Vij+|distance|];
19: else Dij←[Vij − |distance|,Vij − 1];
20: Vij←select(Dij);
21: Scur←(Pre, xi, Dij, Vij, active, Qi);
22: else Scur←(Pre, xi, Dij, Vij, extensive, Qi);
23: result ← result +{< xi 􀀶Vij >} ;
24: FV←FV − {xi};
25: PV←PV+{xi};
26: call Algorithm 2 variable permutation;
27: if (null)
28: Scur←final state;
29: else xi←head(Qi);
30: Vi1←select(Di1);
31: Pre←Scur;
32: Scur←(Pre, xi, Di1, Vi1, active, Qi);
33: return result;
End​

یاعلی
 

Similar threads

بالا