Thank you, but my problem is a bit different I try to explain better:
I have 2 types of material to be processed: first one metal, second wood.
Then we have 2 types of machines: 1 for only metal (4 machines) and 2 (universal) for metal and wood.
The total number of machines available is fixed (10), but every universal machine at the beginning can be only for wood or only for metal.
Depending on the request we have to set up the machines available and metal has the precedence to wood, so we have to process all metals and then we can use the remaining one for wood, but we have to set up the machines before to start to process all the tasks.
for example if at the beginning of the hour we have 100 metale request and 50 wood request, and the first type as 20 of capacity times number of machines 4 we have max 80 with type 1 and the universal has 10 capacity, so 2 universal for the left metal and 5 for wood.
I hope it is clear now