Design of Optimal Petri-net Controllers for A Class of Flexible Manufacturing Systems with Key Resources