I am trying to come up with nice solution for a specific RCPSP.
Context
There is a small factory which can produce P kinds of products on N machines each machine is universal but can only create one kind of product in one setting. The machine needs some significant time to change the setting to other kind of product. Then there are C contracts which the factory must meet. A product might have dependency on another product. (for product C it is necessary to have 3 products A and 1 product B)
Most optimal solution is the one with minimal number of settings changes.
My solution
I translated the requirements in contracts to time which a machine must spent producing the product. Then split time to timespans between expedition dates of contracts.
Variables a,b,c - products a11 - time spent producing product a on machine one in timespan before first contract)
Constants A1 - time which must be spent producing product A in the first timespan E1 - first timespan (time from now to the expedition date of the first contract)
Minimize:
f(x) = sgn a11 + sgn b11 + sgn c11 + sgn a12 + sgn b12 + sgn c12 + sgn a21 + sgn b21 + sgn c21 + sgn a22 + sgn b22 + sgn c22
Constraints:
a11 + a12 >= A1
b11 + b12 >= B1
c11 + c12 >= C1
a11 + a12 + a21 + a22 = A2
b11 + b12 + b21 + b22 = B2
c11 + c12 + c21 + c22 = C2
a11 + b11 + c11 <= E1
a12 + b12 + c12 <= E1
a21 + b21 + c21 <= E2
a22 + b22 + c22 <= E2
I don't know how to find optimal solution when my "cost" function is not linear and also I don't take into account dependencies between products.
Could you please advise me or point to relevant literature/algorithms?