Recently exam Bo master relatively busy, first put the idea of simple to say, figure and code after the test to fill.
Staffing issues, that is, the collection of staff and work set, to find the most reasonable arrangements.
For the Employee collection p, the employee collection is given a certain order according to an F, which requires the work arrangement in that order P (i).
For working set J, you can sort by partial order and have a partial order to arrange the work.
For each employee corresponding to each work C (i,j), give the corresponding cost matrix, to indicate the required time/resource consumption (you can use the BOOL variable x (I,J) to indicate whether this arrangement is feasible, or can be directly in the input test C (i,j) =infinity)
First talk about the idea:
1. Construct the partial order of the work set J according to the requirements.
2. Construct solution tree According to the partial order of J, that is, the trees that represent all working sequences.
[3. The cost matrix is optimized to generate the reduced cost matrix. ]//This step is optional, reducing the size of the search tree
4. Based on the (reduced) cost matrix, search in the solution tree to build a search tree, generally using best first search.
Example: Pending additions
Code: Waiting to be added
Solving staffing problems with branch-bound method (personnel assignment problem)