Exemplo n.º 1
0
 private List<Preference> FindFeaturesForAllJobs(Schedule jssp, GurobiJspModel gurobiModel)
 {
     Preference[] prefs = new Preference[jssp.ReadyJobs.Count];
     for (int r = 0; r < jssp.ReadyJobs.Count; r++)
     {
         Schedule lookahead = jssp.Clone();
         Features phi = lookahead.Dispatch1(jssp.ReadyJobs[r], FeatureMode, null); // commit the lookahead
         prefs[r] = new Preference(lookahead.Sequence[lookahead.Sequence.Count - 1], phi);
         // need to optimize to label featuers correctly -- this is computationally intensive
         gurobiModel.Lookahead(prefs[r].Dispatch, out prefs[r].ResultingOptMakespan);
         prefs[r].SimplexIterations = gurobiModel.SimplexIterations;
     }
     return prefs.ToList();
 }