2023-02-05 07:34:23 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2022 NHR@FAU, University Erlangen-Nuremberg.
|
|
|
|
* All rights reserved.
|
|
|
|
* Use of this source code is governed by a MIT-style
|
|
|
|
* license that can be found in the LICENSE file.
|
|
|
|
*/
|
2023-06-18 10:08:56 +02:00
|
|
|
#include <float.h>
|
|
|
|
#include <limits.h>
|
2023-02-05 07:34:23 +01:00
|
|
|
#include <stdio.h>
|
2023-06-18 10:08:56 +02:00
|
|
|
#include <stdlib.h>
|
2023-02-05 07:34:23 +01:00
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include "parameter.h"
|
|
|
|
#include "solver.h"
|
2023-06-18 10:08:56 +02:00
|
|
|
#include "timing.h"
|
2023-02-05 07:34:23 +01:00
|
|
|
|
2023-06-18 10:08:56 +02:00
|
|
|
int main(int argc, char** argv)
|
2023-02-05 07:34:23 +01:00
|
|
|
{
|
2023-06-18 10:08:56 +02:00
|
|
|
double startTime, endTime;
|
2023-02-05 07:34:23 +01:00
|
|
|
Parameter params;
|
|
|
|
Solver solver;
|
|
|
|
initParameter(¶ms);
|
|
|
|
|
2023-06-18 10:08:56 +02:00
|
|
|
if (argc != 2) {
|
|
|
|
printf("Usage: %s <configFile>\n", argv[0]);
|
2023-02-05 07:34:23 +01:00
|
|
|
exit(EXIT_SUCCESS);
|
|
|
|
}
|
|
|
|
|
|
|
|
readParameter(¶ms, argv[1]);
|
|
|
|
printParameter(¶ms);
|
|
|
|
|
|
|
|
initSolver(&solver, ¶ms, 2);
|
2023-06-18 10:08:56 +02:00
|
|
|
startTime = getTimeStamp();
|
2023-02-05 07:34:23 +01:00
|
|
|
solve(&solver);
|
2023-06-18 10:08:56 +02:00
|
|
|
endTime = getTimeStamp();
|
|
|
|
printf("Solution took %.2fs\n", endTime - startTime);
|
2023-02-05 07:34:23 +01:00
|
|
|
writeResult(&solver);
|
|
|
|
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|