Cplex Error: 1: AttValue: ' expected when writing results

Cplex Error: 1: AttValue: ' expected when writing results

我在包 PHONEMeS

中使用 IBM Cplex 作为求解器

但是,Cplexreturns出现如下错误:

CPLEX> Overwrite 'results1.txt' ['y' or 'n']: CPLEX> AttValue: ' expected
attributes construct error
Couldn't find end of Start Tag variable line 1278192
EndTag: '</' not found
Error: 1: AttValue: ' expected
2: attributes construct error
3: Couldn't find end of Start Tag variable line 1278192
4: EndTag: '</' not found

从日志看,Cplex好像运行没问题,但是写不出结果。你可以在这里看到完整的日志:

Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer 20.1.0.0
  with Simplex, Mixed Integer & Barrier Optimizers
5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21
Copyright IBM Corp. 1988, 2020.  All Rights Reserved.

Type 'help' for a list of available commands.
Type 'help' followed by a command name for more
information on commands.

CPLEX> Problem 'testFile.lp' read.
Read time = 0.01 sec. (0.21 ticks)
CPLEX> New value for mixed integer optimality gap tolerance: 0
CPLEX> New value for relative objective gap: 0
CPLEX> New value for solution pool replacement strategy: 2
CPLEX> New value for solutions limit for each populate call: 5000
CPLEX> New value for capacity of solution pool: 1
CPLEX> New value for intensity for populating the MIP solution pool: 4
CPLEX> New value for time limit in seconds: 3600
CPLEX> Version identifier: 20.1.0.0 | 2020-11-10 | 9bedb6d68
CPXPARAM_MIP_Pool_Capacity                       1
CPXPARAM_MIP_Pool_Replace                        2
CPXPARAM_MIP_Pool_Intensity                      4
CPXPARAM_MIP_Limits_Populate                     5000
CPXPARAM_TimeLimit                               3600
CPXPARAM_MIP_Tolerances_MIPGap                   0
CPXPARAM_MIP_Pool_RelGap                         0

Populate: phase I 
Tried aggregator 2 times.
MIP Presolve eliminated 1105 rows and 357 columns.
MIP Presolve modified 49 coefficients.
Aggregator did 432 substitutions.
Reduced MIP has 1117 rows, 532 columns, and 3073 nonzeros.
Reduced MIP has 293 binaries, 0 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.02 sec. (5.62 ticks)
Found incumbent of value -276.135414 after 0.03 sec. (8.75 ticks)
Probing time = 0.01 sec. (2.10 ticks)
Cover probing fixed 0 vars, tightened 1 bounds.
Tried aggregator 1 time.
MIP Presolve eliminated 7 rows and 3 columns.
MIP Presolve modified 1 coefficients.
Reduced MIP has 1110 rows, 529 columns, and 3056 nonzeros.
Reduced MIP has 290 binaries, 0 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.01 sec. (2.19 ticks)
Probing time = 0.00 sec. (1.89 ticks)
Clique table members: 908.
MIP emphasis: balance optimality and feasibility.
MIP search method: dynamic search.
Parallel mode: deterministic, using up to 8 threads.
Root relaxation solution time = 0.01 sec. (2.13 ticks)

        Nodes                                         Cuts/
   Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap

*     0+    0                         -276.1354     -687.6838           149.04%
*     0+    0                         -516.0181     -687.6838            33.27%
      0     0     -687.6825    23     -516.0181     -687.6825       60   33.27%
*     0+    0                         -648.8307     -687.6825             5.99%
      0     0     -687.6821    16     -648.8307      Cuts: 57      105    5.99%
*     0+    0                         -687.6821     -687.6821             0.00%

Clique cuts applied:  5
Cover cuts applied:  4
Implied bound cuts applied:  14
Flow cuts applied:  1
Mixed integer rounding cuts applied:  11
Gomory fractional cuts applied:  2

Root node processing (before b&c):
  Real time             =    0.07 sec. (24.51 ticks)
Parallel b&c, 8 threads:
  Real time             =    0.00 sec. (0.00 ticks)
  Sync time (average)   =    0.00 sec.
  Wait time (average)   =    0.00 sec.
                          ------------
Total (root+branch&cut) =    0.07 sec. (24.51 ticks)

Populate: phase II 
MIP emphasis: balance optimality and feasibility.
MIP search method: dynamic search.
Parallel mode: deterministic, using up to 8 threads.

        Nodes                                         Cuts/
   Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap

      0     2     -687.6821    16     -687.6821     -687.6821      105    0.00%
Elapsed time = 0.12 sec. (37.83 ticks, tree = 0.02 MB, solutions = 1)
*    49    33      integral     0     -687.6821     -687.6821      229    0.00%
   4351  2637     -687.6821     1     -687.6821     -687.6821    23682    0.00%

Clique cuts applied:  5
Cover cuts applied:  4
Implied bound cuts applied:  14
Flow cuts applied:  1
Mixed integer rounding cuts applied:  11
Gomory fractional cuts applied:  2

Root node processing (before b&c):
  Real time             =    0.04 sec. (12.94 ticks)
Parallel b&c, 8 threads:
  Real time             =    0.99 sec. (444.09 ticks)
  Sync time (average)   =    0.27 sec.
  Wait time (average)   =    0.00 sec.
                          ------------
Total (root+branch&cut) =    1.02 sec. (457.04 ticks)

Solution pool: 1 solution saved (27 replaced).

Populate - All reachable solutions enumerated, pool tolerance (0/1e+75), integer optimal:  Objective = -6.8768211123e+02
Current MIP best bound = -6.8768210923e+02 (gap = -2e-06, -0.00%)
Solution time =    1.10 sec.  Iterations = 50045  Nodes = 7837 (5079)
Deterministic time = 481.56 ticks  (437.78 ticks/sec)

CPLEX> Overwrite 'results1.txt' ['y' or 'n']: CPLEX> AttValue: ' expected
attributes construct error
Couldn't find end of Start Tag variable line 1278192
EndTag: '</' not found
Error: 1: AttValue: ' expected
2: attributes construct error
3: Couldn't find end of Start Tag variable line 1278192
4: EndTag: '</' not found

这个错误是什么意思?提前致谢!

能否在调用程序包之前删除文件 results1.txt?

脚本会更好地运行,因为“覆盖 'results1.txt' ['y' 或 'n']”问题将消失