How to optimize knowledge sharing in a factory network