コード例 #1
0
ファイル: ALNSSCSolver.java プロジェクト: vpillac/vroom
 /**
  * Returns the default set of destroy procedures
  *
  * @return the default set of destroy procedures
  */
 public static List<IDestroy<TRSPSolution>> newDestroySet(TRSPGlobalParameters params) {
   LinkedList<IDestroy<TRSPSolution>> destroys = new LinkedList<IDestroy<TRSPSolution>>();
   destroys.add(new DestroyRandom());
   destroys.add(new DestroyStaticRelated(params.get(TRSPGlobalParameters.ALNS_DES_P), 1, 1, 1));
   destroys.add(new DestroyTimeRelated(params.get(TRSPGlobalParameters.ALNS_DES_P)));
   destroys.add(new DestroyCritical(params.get(TRSPGlobalParameters.ALNS_DES_P)));
   return destroys;
 }
コード例 #2
0
ファイル: ALNSSCSolver.java プロジェクト: vpillac/vroom
  /**
   * Returns the default set of repair procedures
   *
   * @return the default set of repair procedures
   */
  public static List<IRepair<TRSPSolution>> newRepairSet(
      TourConstraintHandler constraintHandler, TRSPGlobalParameters params) {
    LinkedList<IRepair<TRSPSolution>> repairs = new LinkedList<IRepair<TRSPSolution>>();
    repairs.add(new RepairRegret(params, constraintHandler, 1, false));
    repairs.add(new RepairRegret(params, constraintHandler, 2, false));
    repairs.add(new RepairRegret(params, constraintHandler, 3, false));

    if (params.get(TRSPGlobalParameters.ALNS_REP_NOISE)) {
      repairs.add(new RepairRegret(params, constraintHandler, 1, true));
      repairs.add(new RepairRegret(params, constraintHandler, 2, true));
      repairs.add(new RepairRegret(params, constraintHandler, 3, true));
    }
    return repairs;
  }