A non-transitory computer program product for use with a stored program computer, the computer program product comprising a non-transitory computer readable medium having a computer readable program code embodied therein for generating an optimized solution for a process in a manufacturing unit, the computer readable program code performing:
- a. evaluating at least one solution comprising a plurality of solution elements associated with the process based on a set of constraints, wherein the set of constraints corresponds to any number of constraints taken collectively, the at least one solution representing a sequence of the plurality of solution elements, each solution element having one or more attributes, the at least one solution being generated using a pre-defined algorithm, wherein at least one solution element of the plurality of solution elements is evaluated based on a corresponding at least one attribute of the at least one solution element of the plurality of solution elements;
- b. generating a first violation metric and a first state for each solution element of the plurality of solution elements, the first state and the first violation metric being generated corresponding to at least one constraint based on a first pre-defined criterion, wherein the first state is generated based on a first state of a solution element positioned prior to the solution element of the plurality of solution elements in sequence for at least one constraint;
- c. generating a candidate solution by modifying at least one sequence position of one or more solution elements in the at least one solution;
- d. evaluating the candidate solution at:
- i. each change point of a plurality of change points, each change point corresponding to a sequence position at which each solution element of the plurality of solution elements is modified, a solution element at each change point being evaluated for the at least one constraint of all the constraints based on a first state of a solution element positioned prior to the solution element in the sequence, and the corresponding at least one attribute, wherein a new state and a new violation metric corresponding to all the constraints for the solution element at the corresponding each change point of the plurality of change points is generated;
- ii. one or more solution elements positioned subsequent to each change point of the plurality of change points corresponding to the at least one constraint, wherein the evaluation at the one or more solution elements is performed until at least one solution element of the one or more solution elements has a new state different from the corresponding first state, wherein each solution element is evaluated based on the corresponding at least one attribute and a violation metric is generated for each of evaluated solution element;
- e. testing the candidate solution based on an acceptance criterion;
- f. updating the first violation metric and the first state associated with each solution element corresponding to each change point and the at least one solution element of the one or more subsequent solution elements when the candidate solution is selected after testing;
- g. repeating steps c, d, e and f for a pre-defined number of times, wherein the at least one solution is replaced with the selected candidate solution;
- and
- h. outputting an optimized solution, wherein the optimized solution is the selected candidate solution after a pre-defined number of iterations.