Originally posted by: PhilHz
Hi all,
i am currently implementing a heuristic that helps me to generate a production plan for multiple products k and multiple periods t. As the complexity of the problem is rather high, i separate the problem in several subproblems.
Specifically, one possibility is to subdivide the total problem in k subproblems. In the first subproblem I generate an optimal production plan for the first product and fixate the results. In the next subproblem I generate the production plan for the 2nd product, given the results of the first subproblem (c.p.). That way the complexity can be reduced dramatically, even though the quality of the solution might not be that good.
Now, I would like to set a time limit for the solution time of the total problem to 1800 seconds. My first Idea was to calculate an equal time limit for every subproblem that sums up to 1800 seconds. As some instances can be solved in less time than others, that approach is not satisficing. For Example: the solution timfor the first subproblem usually takes just a few seconds, but the required time rises with every product that i add. With an equal time limit for every subproblem, the total solution time would be < 1800 seconds.
What I want to to now is to calculate an equal time limit for every subproblem that adds up to 1800 like I did before. In the second step I would like to calculate the remaining time after solving a subproblem and calculate a new time limit for the remaining subproblems.
Has anyone of you ever had to do with a similar problem and could help me with that problem, or is there maybe a much easier solution?
Thanks in advance and best regards,
Phil
var K = thisOplModel.K;
var T = thisOplModel.T
var TimeLimitSec = thisOplModel.TimeLimitSec ;
var Timelimit = TimeLimitSec / K;
var mod, k,t, bestObjValue;
cplex.tilim = Timelimit;
var before = new Date();
var temp = before.getTime();
#DecisionOptimization#OPLusingCPLEXOptimizer