跳至主内容
框架 无框架

IloSameCommonSubsequence

public 'IloConstraint'IloSameCommonSubsequence(const 'IloEnv'环境, const 'IloIntervalSequenceVar'seq1, const 'IloIntervalSequenceVar'seq2, const char * '名字=0' )
定义文件: ilconcert/ilosmodel.h
返回同源子序列约束。

该函数在序列变量 "seq1和 "seq2之间创建一个同源子序列约束,并使其成为环境变量 "env的一部分。 这两个序列的区间变量之间的映射是由序列定义中使用的数组 a1a2 中区间变量顺序来确定。 The constraint states that the sub-sequences defined by seq1 and seq2 by only considering the pairs of present intervals (a1[i],a2[i]) are identical modulo the mapping between intervals a1[i] and a2[i]. 默认情况下,约束的名称是空字符串,但也可以指定一个 "name

注意:逻辑约束中不能使用此约束。

有关同共次序约束的更多信息,请参阅CP 优化器中的区间变量排序概念。


IloSameCommonSubsequence

public 'IloConstraint'IloSameCommonSubsequence(const 'IloEnv'环境, const 'IloIntervalSequenceVar'seq1, const 'IloIntervalSequenceVar'seq2, const 'IloIntervalVarArray'a1, const 'IloIntervalVarArray'a2, const char * '名字=0)
定义文件: ilconcert/ilosmodel.h
返回同序列约束。

该函数在序列变量 "seq1和 "seq2之间创建一个同源子序列约束,并使其成为环境变量 "env的一部分。 两个序列的区间变量之间的映射由数组 "a1和 "a2指定,这两个数组的大小应该相同。 数组'a1必须只包含序列'seq1的区间变量,不得有任何重复;数组'a2必须只包含序列'seq2的区间变量,不得有任何重复。 The constraint states that the sub-sequences defined by seq1 and seq2 by only considering the pairs of present intervals (a1[i],a2[i]) are identical modulo the mapping between intervals a1[i] and a2[i]. 默认情况下,约束的名称是空字符串,但也可以指定一个 "name

注意:逻辑约束中不能使用此约束。

有关同共次序约束的更多信息,请参阅CP 优化器中的区间变量排序概念。