or-tools/examples/cpp/tsp.cc File Reference
#include "base/callback.h"
#include "base/commandlineflags.h"
#include "base/integral_types.h"
#include "base/scoped_ptr.h"
#include "base/join.h"
#include "constraint_solver/routing.h"
#include "base/random.h"
Go to the source code of this file.
|
Classes |
class | RandomMatrix |
| Random matrix. More...
|
Functions |
| DEFINE_int32 (tsp_size, 10,"Size of Traveling Salesman Problem instance.") |
| DEFINE_bool (tsp_use_random_matrix, true,"Use random cost matrix.") |
| DEFINE_int32 (tsp_random_forbidden_connections, 0,"Number of random forbidden connections.") |
| DEFINE_bool (tsp_use_deterministic_random_seed, false,"Use deterministic random seeds.") |
int32 | GetSeed () |
| Random seed generator.
|
int64 | MyDistance (RoutingModel::NodeIndex from, RoutingModel::NodeIndex to) |
| Cost/distance functions.
|
int | main (int argc, char **argv) |
Function Documentation
DEFINE_bool |
( |
tsp_use_deterministic_random_seed |
, |
|
|
false |
, |
|
|
"Use deterministic random seeds." |
| |
|
) |
| | |
DEFINE_bool |
( |
tsp_use_random_matrix |
, |
|
|
true |
, |
|
|
"Use random cost matrix." |
| |
|
) |
| | |
DEFINE_int32 |
( |
tsp_random_forbidden_connections |
, |
|
|
0 |
, |
|
|
"Number of random forbidden connections." |
| |
|
) |
| | |
DEFINE_int32 |
( |
tsp_size |
, |
|
|
10 |
, |
|
|
"Size of Traveling Salesman Problem instance." |
| |
|
) |
| | |
Random seed generator.
Definition at line 51 of file tsp.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv | |
|
) |
| | |
int64 MyDistance |
( |
RoutingModel::NodeIndex |
from, |
|
|
RoutingModel::NodeIndex |
to | |
|
) |
| | |
Cost/distance functions.
Sample function.
Definition at line 62 of file tsp.cc.