[go: up one dir, main page]

Menu

[52b7f0]: / mct / NSSeqCpp.tpl  Maximize  Restore  History

Download this file

54 lines (34 with data), 1.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "NSSeq$neighborhood.h"
using namespace $project;
// ============ Move$neighborhood ==============
bool Move$neighborhood::canBeApplied(const Rep$project& rep, const MY_ADS&)
{
return true;
}
Move< Rep$project , MY_ADS $commadproject >& Move$neighborhood::apply(Rep$project& rep, MY_ADS&)
{
// apply this move to 'rep'
// rep. (...) = (...)
// return reverse move
return * new Move$neighborhood;
}
MoveCost* Move$neighborhood::cost(const Evaluation< $deltaproject >&, const Rep$project& rep, const MY_ADS& ads)
{
return NULL;
// Implement if a more efficient evaluation of the move is available
//double move_cost = ...;
//double move_cost_infeasible = ...;
//return new MoveCost(move_cost, move_cost_infeasible);
}
// ============ NSIterator$neighborhood ==============
void NSIterator$neighborhood::first(){};
void NSIterator$neighborhood::next(){};
bool NSIterator$neighborhood::isDone(){};
Move< Rep$project , MY_ADS $commadproject >& NSIterator$neighborhood::current(){};
// ============ NSSeq$neighborhood ==============
Move<Rep$project , MY_ADS $commadproject>& NSSeq$neighborhood::move(const Rep$project& rep, const MY_ADS&)
{
// return a random move (that is, a move operator that generates a neighbor solution of 'rep')
// you may need to use the random number generator 'rg'
return * new Move$neighborhood;
}