Optimization of Selvedge Mechanism on Shuttleless Looms