~spidernet/PermutationFlowShopScheduling

29407c25f65db50f7ff8d572bf3f9688165cb4bc — Gabriele Venturato 1 year, 9 months ago d0a127f
[LocalSearch] add comment to helpers
2 files changed, 8 insertions(+), 1 deletions(-)

M LocalSearch/include/FP_Basics.hh
M LocalSearch/src/FP_Helpers.cc
M LocalSearch/include/FP_Basics.hh => LocalSearch/include/FP_Basics.hh +1 -1
@@ 24,7 24,7 @@ class FP_State {
  vector<vector<size_t>> end_times;
};

// Swap job i and job j.
// Swap job j1 and job j2.
class SwapJobs {
  friend bool operator==(const SwapJobs& m1, const SwapJobs& m2);
  friend bool operator!=(const SwapJobs& m1, const SwapJobs& m2);

M LocalSearch/src/FP_Helpers.cc => LocalSearch/src/FP_Helpers.cc +7 -0
@@ 88,6 88,8 @@ void Tardiness::PrintViolations(const FP_State& st, ostream& os) const {

/*****************************************************************************
 * DeltaCostHelper
 * helper class to compute delta costs. useful to have a shared function to
 * compute times, which is the same for every delta cost component.
 *****************************************************************************/

DeltaCostHelper::DeltaCostHelper(const FP_Input& in, const FP_State& st)


@@ 100,6 102,11 @@ DeltaCostHelper::DeltaCostHelper(const FP_Input& in, const FP_State& st)
  end_times.resize( in.getJobs(), vector<size_t>(in.getMachines()) );
}

/*!
 * @brief Given a job index it computes start/end times. Note that it doesn't
 * compute the whole matrix but only the sub matrix from the job_index's row.
 * @param[in] job_index
 */
void DeltaCostHelper::ComputeTimes(size_t job_index) {
  size_t j;