-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
solution: introduce modification neighbourhood iterator
- Loading branch information
1 parent
98f9fdb
commit 324dc6a
Showing
31 changed files
with
386 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,17 @@ | ||
#include "problem.h" | ||
#include "customer.h" | ||
#include "problem.h" | ||
#include "solution.h" | ||
|
||
#include "core/fiber.h" | ||
#include "core/memory.h" | ||
|
||
static int | ||
test_fiber_f(va_list ap) | ||
{ | ||
int n = va_arg(ap, int); | ||
for (int i = 0; i < n; i++) { | ||
printf("test_fiber_f\n"); | ||
fflush(stdout); | ||
fiber_yield(); | ||
} | ||
return 0; | ||
} | ||
|
||
int | ||
main(int argc, char **argv) | ||
{ | ||
global_problem_init(); | ||
solution_init(); | ||
|
||
memory_init(); | ||
fiber_init(fiber_c_invoke); | ||
struct fiber *f = fiber_new(test_fiber_f); | ||
fiber_start(f, 2); | ||
while(!fiber_is_dead(f)) { | ||
printf("main\n"); | ||
fflush(stdout); | ||
fiber_call(f); | ||
} | ||
memory_free(); | ||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,4 +144,4 @@ modification_delta(struct modification m, double alpha, double beta) | |
default: | ||
unreachable(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
struct problem p; | ||
|
||
void | ||
global_problem_init() | ||
global_problem_init(void) | ||
{ | ||
p.vc = 100.; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
#ifndef EAMA_ROUTES_MINIMIZATION_HEURISTIC_RANDOM_UTILS_H | ||
#define EAMA_ROUTES_MINIMIZATION_HEURISTIC_RANDOM_UTILS_H | ||
|
||
#include "customer.h" | ||
|
||
#if defined(__cplusplus) | ||
extern "C" { | ||
#endif /* defined(__cplusplus) */ | ||
|
||
void | ||
random_subset(int *arr, int n, int k); | ||
random_subset(struct customer **arr, int n, int k); | ||
|
||
void | ||
random_shuffle(int *arr, int n); | ||
random_shuffle(struct customer **arr, int n); | ||
|
||
#if defined(__cplusplus) | ||
} | ||
#endif /* defined(__cplusplus) */ | ||
|
||
#endif //EAMA_ROUTES_MINIMIZATION_HEURISTIC_RANDOM_UTILS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.