In this paper, we improve the previous work by considering that a control place can have multiple self loops. Then, two integer linear programming problems (ILPPs) are formulated. Based on the first ILPP, an iterative deadlock control policy is developed, where a control place is computed at each iteration to implement as many marking/transition separation instances (MTSIs) as possible. The second ILPP can find a set of control places to implement all MTSIs and the objective function is used to minimize the number of control places. It is a non-iterative deadlock control strategy since we need to solve the ILPP only once. Both ILPPs can make all legal markings reachable in the controlled system, i.e., the obtained supervisor is behaviorally optimal. Finally, we provide examples to illustrate the proposed approaches. (C) 2016 ISA. Published by Elsevier Ltd. All rights reserved.