配置运行后CPLEX多比特错误



我是OPL和CPLEX的新手。每当我尝试运行我的配置(由简单的。mod和。dat组成)时,它都会失败并显示错误":多字节错误,错误编码?干净。我认为问题是与我的OPL项目编码,但切换到UTF-8没有改变。我怎样才能解决这个问题呢?代码都是拉丁文,文件的路径也是拉丁文.dat文件如下所示:

students = { Carwyn, Aidan, Lerato, Dinesh, Harun,Vasu, Bartolomeu, Frigyes, Minato, Helen,Maura, Bertha, Marcelin, Elmira, Vijay };
local = [0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1];
score = [75, 55, 34, 62, 52, 47, 85,78, 74, 61, 93, 89, 84, 29, 65];
ngroups = 5;

和。mod是

{string} students = ...;
int local[students] = ...;
int score[students] = ...;
int ngroups = ...;
dvar boolean x[students][1..ngroups];
dvar float beta;
maximize beta;
subject to{

// three students per group
forall(i in 1..ngroups) sum(s in students) x[s][i] == 3;

// at most one group per student
forall(s in students) sum(i in 1..ngroups) x[s][i] == 1;

// one local per group
forall(i in 1..ngroups) sum(s in students) local[s]*x[s][i] >= 1;

// beta is the max-min of group scores
forall(i in 1..ngroups)
sum(s in students) score[s]*x[s][i] >= beta;
}
the names for both files are ses2
[File names][1]

[1]: https://i.stack.imgur.com/AzCgd.png

在文档IDE和OPL>起动套件>全球化

你可以读

CPLEX Studio不支持:

•决策变量的多字节名称,如CPLEX日志文件可以

•从一个系统转码到另一个系统。

每个操作系统处理自己的字符编码,所以字符串相关函数的行为(例如,字符串长度)可能因机器而异。在相同的模型上执行Windows和Unix可能产生不同的结果。例如,字符串长度的函数可以返回不同的数字不确保编码匹配。

•包含非ascii字符的标识符

例如,法语口音是不允许的。OPL标识符是

,我运行了你的模型,得到

beta = 196;
x = [[0 0 0 0 1]
[1 0 0 0 0]
[0 0 1 0 0]
[0 1 0 0 0]
[1 0 0 0 0]
[0 0 0 1 0]
[0 0 0 1 0]
[0 0 1 0 0]
[0 1 0 0 0]
[0 1 0 0 0]
[0 0 0 0 1]
[1 0 0 0 0]
[0 0 1 0 0]
[0 0 0 0 1]
[0 0 0 1 0]];

您确定在运行配置的名称或其他地方没有一些俄语字母吗?