Rstudio Error: OVERFLOW in CCbigguy_addmult (4), BIGGUY errors are fatal
Rstudio Error: OVERFLOW in CCbigguy_addmult (4), BIGGUY errors are fatal
我正在尝试 运行 协和式飞机在从距离矩阵生成的 TSP 上。这是我的代码
library("TSP")
concordePath = "E:/Concorde_Code/"
concorde_path(concordePath)
concorde_help()
num_rows=10
num_cols = 10
data_4 = matrix(sample.int(15, size = 9*100, replace = TRUE), nrow = num_rows, ncol = num_cols)
data_4[data_4<floor(mean(data_4))] = 1
data_4[data_4>=floor(mean(data_4))] = 2
diag(data_4)<-0
atsp <- ATSP(data_4)
tsp <- reformulate_ATSP_as_TSP(atsp)
o2 <- solve_TSP(tsp, method = "concorde",rep=10)
当我运行上面的代码时,我得到以下错误
Used control parameters:
clo =
exe = E:\Concorde_Code\/concorde
precision = 6
verbose = TRUE
keep_files = FALSE
TSP contains negative distances. Shifting distances by subtracting the minimum./Concorde_Code/concorde -x -o file1de86b0b1dba.sol file1de86b0b1dba.dat
Host: Pasha Current process id: 1032
Using random seed 1586875562
Problem Name: TSP
Generated by write_TSPLIB (R-package TSP)
Problem Type: TSP
Number of Nodes: 20
Explicit Lengths (CC_MATRIXNORM)
Set initial upperbound to 2000000000 (from tour)
ERROR: No dual change in basis finding code
Did not find a basic optimal solution
Fractional matching routine failed
Warning: restarting running timer Miscellaneous
No warmstart, stumbling on anyway
Basic dual change required, but no candidate edges
LP Value 1: 2000000000.000000 (0.00 seconds)
New lower bound: 2000000000.000000
Final lower bound 2000000000.000000, upper bound 2000000000.000000
OVERFLOW in CCbigguy_addmult (4)
BIGGUY errors are fatal
FATAL ERROR - received signal SIGABRT (6/6)
sleeping 1 more hours to permit debugger access
谁能告诉我我做错了什么?
协和飞机已正确安装。当我 运行 concorde_help() 时,我得到以下输出
The following options can be specified in solve_TSP with method "concorde" using clo in control:
/Concorde_Code/concorde
Usage: /Concorde_Code/concorde [-see below-] [dat_file]
-B do not branch
-C # maximum chunk size in localcuts (default 16)
-d use dfs branching instead of bfs
-D f edgegen file for initial edge set
-e f initial edge file
-E f full edge file (must contain initial edge set)
-f write optimal tour as edge file (default is tour file)
-F f read extra cuts from file
-g h be a grunt for boss h
-h be a boss for the branching
-i just solve the blossom polytope
-I just solve the subtour polytope
-J # number of tentative branches
-k # number of nodes for random problem
-K h use cut server h
-M f master file
-m use multiple passes of cutting loop
-n s problem location (just a name or host:name, not a file name)
-o f output file name (for optimal tour)
-P f cutpool file
-q do not cut the root lp
-r # use #x# grid for random points, no dups if #<0
-R f restart file
-s # random seed
-S f problem file
-t f tour file (in node node node format)
-u v initial upperbound
-U do not permit branching on subtour inequalities
-v verbose (turn on lots of messages)
-V just run fast cuts
-w just subtours and trivial blossoms
-x delete files on completion (sav pul mas)
-X f write the last root fractional solution to f
-y use simple cutting and branching in DFS
-z # dump the #-lowest reduced cost edges to file xxx.rcn
-N # norm (must specify if dat file is not a TSPLIB file)
0=MAX, 1=L1, 2=L2, 3=3D, 4=USER, 5=ATT, 6=GEO, 7=MATRIX,
8=DSJRAND, 9=CRYSTAL, 10=SPARSE, 11-15=RH-norm 1-5, 16=TOROIDAL
17=GEOM, 18=JOHNSON
这是会话信息
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] R.utils_2.9.2 R.oo_1.23.0 R.methodsS3_1.8.0 tspmeta_1.2 MASS_7.3-51.1
[6] ggplot2_3.1.1 TSP_1.1-9
loaded via a namespace (and not attached):
[1] modeltools_0.2-22 tidyselect_0.2.5 xfun_0.4 purrr_0.2.5 kernlab_0.9-27
[6] lattice_0.20-38 colorspace_1.4-1 stats4_3.5.2 mgcv_1.8-26 yaml_2.2.0
[11] rlang_0.3.4 pillar_1.4.1 glue_1.3.1 withr_2.1.2 prabclus_2.2-6
[16] sp_1.3-1 fpc_2.1-11.1 bindrcpp_0.2.2 foreach_1.4.4 bindr_0.1.1
[21] plyr_1.8.4 robustbase_0.93-3 stringr_1.4.0 munsell_0.5.0 gtable_0.3.0
[26] mvtnorm_1.0-8 codetools_0.2-15 knitr_1.21 permute_0.9-5 parallel_3.5.2
[31] flexmix_2.3-14 class_7.3-15 DEoptimR_1.0-8 trimcluster_0.1-2.1 Rcpp_1.0.1
[36] backports_1.1.4 scales_1.0.0 diptest_0.75-7 checkmate_1.9.0 vegan_2.5-6
[41] stringi_1.4.3 BBmisc_1.11 dplyr_0.7.8 splancs_2.01-40 grid_3.5.2
[46] tools_3.5.2 magrittr_1.5 lazyeval_0.2.2 tibble_2.1.3 cluster_2.0.7-1
[51] crayon_1.3.4 pkgconfig_2.0.2 Matrix_1.2-15 assertthat_0.2.1 rstudioapi_0.8
[56] iterators_1.0.10 R6_2.4.0 mclust_5.4.2 nlme_3.1-137 nnet_7.3-12
[61] compiler_3.5.2
你能告诉我我做错了什么吗?
从相似性(或邻接矩阵)s 到相异性 d 的标准转换是 d = 1/s - 1。以下是也适用于协和式飞机(在 TSP 1.1-10 或更高版本中)的完整代码:
set.seed(1234)
library("igraph")
num_rows <- 10
num_cols <- 10
data_4 <- matrix(sample.int(15, size = 9*100, replace = TRUE),
nrow = num_rows, ncol = num_cols)
adjacency_matrix <- data_4<floor(mean(data_4))
g <- graph_from_adjacency_matrix(adjacency_matrix)
plot(g)
d <- 1/adjacency_matrix - 1
atsp <- ATSP(d)
# the standard heuristic finds the optimal solution
o <- solve_TSP(atsp)
o
as.integer(o)
# Concord also finds an optimal solution.
o <- solve_TSP(tsp, method = "concorde")
o
as.integer(o)
我正在尝试 运行 协和式飞机在从距离矩阵生成的 TSP 上。这是我的代码
library("TSP")
concordePath = "E:/Concorde_Code/"
concorde_path(concordePath)
concorde_help()
num_rows=10
num_cols = 10
data_4 = matrix(sample.int(15, size = 9*100, replace = TRUE), nrow = num_rows, ncol = num_cols)
data_4[data_4<floor(mean(data_4))] = 1
data_4[data_4>=floor(mean(data_4))] = 2
diag(data_4)<-0
atsp <- ATSP(data_4)
tsp <- reformulate_ATSP_as_TSP(atsp)
o2 <- solve_TSP(tsp, method = "concorde",rep=10)
当我运行上面的代码时,我得到以下错误
Used control parameters:
clo =
exe = E:\Concorde_Code\/concorde
precision = 6
verbose = TRUE
keep_files = FALSE
TSP contains negative distances. Shifting distances by subtracting the minimum./Concorde_Code/concorde -x -o file1de86b0b1dba.sol file1de86b0b1dba.dat
Host: Pasha Current process id: 1032
Using random seed 1586875562
Problem Name: TSP
Generated by write_TSPLIB (R-package TSP)
Problem Type: TSP
Number of Nodes: 20
Explicit Lengths (CC_MATRIXNORM)
Set initial upperbound to 2000000000 (from tour)
ERROR: No dual change in basis finding code
Did not find a basic optimal solution
Fractional matching routine failed
Warning: restarting running timer Miscellaneous
No warmstart, stumbling on anyway
Basic dual change required, but no candidate edges
LP Value 1: 2000000000.000000 (0.00 seconds)
New lower bound: 2000000000.000000
Final lower bound 2000000000.000000, upper bound 2000000000.000000
OVERFLOW in CCbigguy_addmult (4)
BIGGUY errors are fatal
FATAL ERROR - received signal SIGABRT (6/6)
sleeping 1 more hours to permit debugger access
谁能告诉我我做错了什么?
协和飞机已正确安装。当我 运行 concorde_help() 时,我得到以下输出
The following options can be specified in solve_TSP with method "concorde" using clo in control:
/Concorde_Code/concorde
Usage: /Concorde_Code/concorde [-see below-] [dat_file]
-B do not branch
-C # maximum chunk size in localcuts (default 16)
-d use dfs branching instead of bfs
-D f edgegen file for initial edge set
-e f initial edge file
-E f full edge file (must contain initial edge set)
-f write optimal tour as edge file (default is tour file)
-F f read extra cuts from file
-g h be a grunt for boss h
-h be a boss for the branching
-i just solve the blossom polytope
-I just solve the subtour polytope
-J # number of tentative branches
-k # number of nodes for random problem
-K h use cut server h
-M f master file
-m use multiple passes of cutting loop
-n s problem location (just a name or host:name, not a file name)
-o f output file name (for optimal tour)
-P f cutpool file
-q do not cut the root lp
-r # use #x# grid for random points, no dups if #<0
-R f restart file
-s # random seed
-S f problem file
-t f tour file (in node node node format)
-u v initial upperbound
-U do not permit branching on subtour inequalities
-v verbose (turn on lots of messages)
-V just run fast cuts
-w just subtours and trivial blossoms
-x delete files on completion (sav pul mas)
-X f write the last root fractional solution to f
-y use simple cutting and branching in DFS
-z # dump the #-lowest reduced cost edges to file xxx.rcn
-N # norm (must specify if dat file is not a TSPLIB file)
0=MAX, 1=L1, 2=L2, 3=3D, 4=USER, 5=ATT, 6=GEO, 7=MATRIX,
8=DSJRAND, 9=CRYSTAL, 10=SPARSE, 11-15=RH-norm 1-5, 16=TOROIDAL
17=GEOM, 18=JOHNSON
这是会话信息
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] R.utils_2.9.2 R.oo_1.23.0 R.methodsS3_1.8.0 tspmeta_1.2 MASS_7.3-51.1
[6] ggplot2_3.1.1 TSP_1.1-9
loaded via a namespace (and not attached):
[1] modeltools_0.2-22 tidyselect_0.2.5 xfun_0.4 purrr_0.2.5 kernlab_0.9-27
[6] lattice_0.20-38 colorspace_1.4-1 stats4_3.5.2 mgcv_1.8-26 yaml_2.2.0
[11] rlang_0.3.4 pillar_1.4.1 glue_1.3.1 withr_2.1.2 prabclus_2.2-6
[16] sp_1.3-1 fpc_2.1-11.1 bindrcpp_0.2.2 foreach_1.4.4 bindr_0.1.1
[21] plyr_1.8.4 robustbase_0.93-3 stringr_1.4.0 munsell_0.5.0 gtable_0.3.0
[26] mvtnorm_1.0-8 codetools_0.2-15 knitr_1.21 permute_0.9-5 parallel_3.5.2
[31] flexmix_2.3-14 class_7.3-15 DEoptimR_1.0-8 trimcluster_0.1-2.1 Rcpp_1.0.1
[36] backports_1.1.4 scales_1.0.0 diptest_0.75-7 checkmate_1.9.0 vegan_2.5-6
[41] stringi_1.4.3 BBmisc_1.11 dplyr_0.7.8 splancs_2.01-40 grid_3.5.2
[46] tools_3.5.2 magrittr_1.5 lazyeval_0.2.2 tibble_2.1.3 cluster_2.0.7-1
[51] crayon_1.3.4 pkgconfig_2.0.2 Matrix_1.2-15 assertthat_0.2.1 rstudioapi_0.8
[56] iterators_1.0.10 R6_2.4.0 mclust_5.4.2 nlme_3.1-137 nnet_7.3-12
[61] compiler_3.5.2
你能告诉我我做错了什么吗?
从相似性(或邻接矩阵)s 到相异性 d 的标准转换是 d = 1/s - 1。以下是也适用于协和式飞机(在 TSP 1.1-10 或更高版本中)的完整代码:
set.seed(1234)
library("igraph")
num_rows <- 10
num_cols <- 10
data_4 <- matrix(sample.int(15, size = 9*100, replace = TRUE),
nrow = num_rows, ncol = num_cols)
adjacency_matrix <- data_4<floor(mean(data_4))
g <- graph_from_adjacency_matrix(adjacency_matrix)
plot(g)
d <- 1/adjacency_matrix - 1
atsp <- ATSP(d)
# the standard heuristic finds the optimal solution
o <- solve_TSP(atsp)
o
as.integer(o)
# Concord also finds an optimal solution.
o <- solve_TSP(tsp, method = "concorde")
o
as.integer(o)