Originally posted by: PhilippeLaborie
So I'll then formalize the problem myself. Let me know if I get it well:
Let A denote your main tool and A1,..., AN denote your available sub-tools
Here are the known parameters of the problem:
- Number of available sub-tools: N=25
- For main tool A you know:
o A set of time-windows W were you can perform the maintenance activity W = { [Sj,Ej] } where Sj (resp Ej) is the start (resp. end) time of the jth time window
o The duration D of the maintenance activity
- For each sub-tool Ai, you know similar information as for main tool:
o A set of time-windows Wi were you can perform the maintenance activity Wi = { [Sij,Eij] } where Sij (resp Eij) is the start (resp. end) time of the jth time window for maintenance of subtool Ai
o The duration Di of the maintenance activity
- The number M of subtools Ai that needs to be installed on main tool A (M=20)
The decision variables of your problem are:
1- A Boolean decision variable bi for each sub-tool Ai, bi==1 if and only if you decide to install sub-tool Ai on main tool A
2- A set of time variables t, t1, ... ti ...,tN where t (resp. ti) denotes the time you start the maintenance task for the main tool (resp. for sub-tool i in case sub-tool i is installed on the main tool)
The constraints of your problem are:
1- You need to select M subtools so: sum_i b_i == M
2- If a subtool is selected, the date of its maintenance should be in a time window of the subtool:
( b_i == 1 ) => there exists a time window j in Wi such that : Sij <= ti and ti+Di <= Eij
The objective is:
minimize the non-availability of the main tool which can be formalized as:
D + 0.05 * sum_i { (b_i==1) * outside( [ti,ti+Di], [t,t+D] ) }
Where outside(U, V) is the length of interval U outside of interval V, that is :
outside(U,V) = card ( U \ V )
Do I get it right ?
#CPOptimizer#DecisionOptimization