118 | | if (lb == -INF) { |
119 | | const char s = 'L'; |
120 | | CPXnewrows(cplexEnv(), _prob, 1, &ub, &s, 0, 0); |
121 | | } else if (ub == INF) { |
122 | | const char s = 'G'; |
123 | | CPXnewrows(cplexEnv(), _prob, 1, &lb, &s, 0, 0); |
124 | | } else if (lb == ub){ |
125 | | const char s = 'E'; |
126 | | CPXnewrows(cplexEnv(), _prob, 1, &lb, &s, 0, 0); |
127 | | } else { |
128 | | const char s = 'R'; |
129 | | double len = ub - lb; |
130 | | CPXnewrows(cplexEnv(), _prob, 1, &lb, &s, &len, 0); |
131 | | } |
143 | | CPXchgcoeflist(cplexEnv(), _prob, values.size(), |
144 | | &rowlist.front(), &indices.front(), &values.front()); |
145 | | |
| 129 | if (lb == -INF) { |
| 130 | const char s = 'L'; |
| 131 | CPXaddrows(cplexEnv(), _prob, 0, 1, values.size(), &ub, &s, |
| 132 | &rmatbeg, &indices.front(), &values.front(), 0, 0); |
| 133 | } else if (ub == INF) { |
| 134 | const char s = 'G'; |
| 135 | CPXaddrows(cplexEnv(), _prob, 0, 1, values.size(), &lb, &s, |
| 136 | &rmatbeg, &indices.front(), &values.front(), 0, 0); |
| 137 | } else if (lb == ub){ |
| 138 | const char s = 'E'; |
| 139 | CPXaddrows(cplexEnv(), _prob, 0, 1, values.size(), &lb, &s, |
| 140 | &rmatbeg, &indices.front(), &values.front(), 0, 0); |
| 141 | } else { |
| 142 | const char s = 'R'; |
| 143 | double len = ub - lb; |
| 144 | CPXaddrows(cplexEnv(), _prob, 0, 1, values.size(), &ub, &s, |
| 145 | &rmatbeg, &indices.front(), &values.front(), 0, 0); |
| 146 | CPXchgrngval(cplexEnv(), _prob, 1, &i, &len); |
| 147 | } |
| 148 | |