704 virtual void _setColCoeffs(int i, LpColIterator b, LpColIterator e) = 0; |
704 virtual void _setColCoeffs(int i, LpColIterator b, LpColIterator e) = 0; |
705 virtual void _setCoeff(int row, int col, Value value) = 0; |
705 virtual void _setCoeff(int row, int col, Value value) = 0; |
706 virtual Value _getCoeff(int row, int col) = 0; |
706 virtual Value _getCoeff(int row, int col) = 0; |
707 |
707 |
708 virtual void _setColLowerBound(int i, Value value) = 0; |
708 virtual void _setColLowerBound(int i, Value value) = 0; |
|
709 virtual Value _getColLowerBound(int i) = 0; |
709 virtual void _setColUpperBound(int i, Value value) = 0; |
710 virtual void _setColUpperBound(int i, Value value) = 0; |
|
711 virtual Value _getColUpperBound(int i) = 0; |
710 // virtual void _setRowLowerBound(int i, Value value) = 0; |
712 // virtual void _setRowLowerBound(int i, Value value) = 0; |
711 // virtual void _setRowUpperBound(int i, Value value) = 0; |
713 // virtual void _setRowUpperBound(int i, Value value) = 0; |
712 virtual void _setRowBounds(int i, Value lower, Value upper) = 0; |
714 virtual void _setRowBounds(int i, Value lower, Value upper) = 0; |
|
715 virtual void _getRowBounds(int i, Value &lower, Value &upper)=0; |
|
716 |
713 virtual void _setObjCoeff(int i, Value obj_coef) = 0; |
717 virtual void _setObjCoeff(int i, Value obj_coef) = 0; |
714 virtual Value _getObjCoeff(int i) = 0; |
718 virtual Value _getObjCoeff(int i) = 0; |
715 virtual void _clearObj()=0; |
719 virtual void _clearObj()=0; |
716 |
720 |
717 virtual SolveExitStatus _solve() = 0; |
721 virtual SolveExitStatus _solve() = 0; |
1022 /// extended number of type Value, i.e. a finite number of type |
1026 /// extended number of type Value, i.e. a finite number of type |
1023 /// Value or -\ref INF. |
1027 /// Value or -\ref INF. |
1024 void colLowerBound(Col c, Value value) { |
1028 void colLowerBound(Col c, Value value) { |
1025 _setColLowerBound(_lpId(c),value); |
1029 _setColLowerBound(_lpId(c),value); |
1026 } |
1030 } |
|
1031 |
|
1032 /// Get the lower bound of a column (i.e a variable) |
|
1033 |
|
1034 /// This function returns the lower bound for column (variable) \t c |
|
1035 /// (this might be -\ref INF as well). |
|
1036 ///\return The lower bound for coloumn \t c |
|
1037 Value colLowerBound(Col c) { |
|
1038 return _getColLowerBound(_lpId(c)); |
|
1039 } |
1027 |
1040 |
1028 ///\brief Set the lower bound of several columns |
1041 ///\brief Set the lower bound of several columns |
1029 ///(i.e a variables) at once |
1042 ///(i.e a variables) at once |
1030 /// |
1043 /// |
1031 ///This magic function takes a container as its argument |
1044 ///This magic function takes a container as its argument |
1069 /// Value or \ref INF. |
1082 /// Value or \ref INF. |
1070 void colUpperBound(Col c, Value value) { |
1083 void colUpperBound(Col c, Value value) { |
1071 _setColUpperBound(_lpId(c),value); |
1084 _setColUpperBound(_lpId(c),value); |
1072 }; |
1085 }; |
1073 |
1086 |
1074 ///\brief Set the lower bound of several columns |
1087 /// Get the upper bound of a column (i.e a variable) |
|
1088 |
|
1089 /// This function returns the upper bound for column (variable) \t c |
|
1090 /// (this might be \ref INF as well). |
|
1091 ///\return The upper bound for coloumn \t c |
|
1092 Value colUpperBound(Col c) { |
|
1093 return _getColUpperBound(_lpId(c)); |
|
1094 } |
|
1095 |
|
1096 ///\brief Set the upper bound of several columns |
1075 ///(i.e a variables) at once |
1097 ///(i.e a variables) at once |
1076 /// |
1098 /// |
1077 ///This magic function takes a container as its argument |
1099 ///This magic function takes a container as its argument |
1078 ///and applies the function on all of its elements. |
1100 ///and applies the function on all of its elements. |
1079 /// The upper bound of a variable (column) has to be given by an |
1101 /// The upper bound of a variable (column) has to be given by an |
1174 // _setRowUpperBound(_lpId(r),value); |
1196 // _setRowUpperBound(_lpId(r),value); |
1175 // }; |
1197 // }; |
1176 |
1198 |
1177 /// Set the lower and the upper bounds of a row (i.e a constraint) |
1199 /// Set the lower and the upper bounds of a row (i.e a constraint) |
1178 |
1200 |
1179 /// The lower and the upper bounds of |
1201 /// The lower and the upper bound of |
1180 /// a constraint (row) have to be given by an |
1202 /// a constraint (row) have to be given by an |
1181 /// extended number of type Value, i.e. a finite number of type |
1203 /// extended number of type Value, i.e. a finite number of type |
1182 /// Value, -\ref INF or \ref INF. |
1204 /// Value, -\ref INF or \ref INF. There is no separate function for the |
|
1205 /// lower and the upper bound because that would have been hard to implement |
|
1206 /// for CPLEX. |
1183 void rowBounds(Row c, Value lower, Value upper) { |
1207 void rowBounds(Row c, Value lower, Value upper) { |
1184 _setRowBounds(_lpId(c),lower, upper); |
1208 _setRowBounds(_lpId(c),lower, upper); |
1185 // _setRowUpperBound(_lpId(c),upper); |
1209 } |
1186 } |
1210 |
1187 |
1211 /// Get the lower and the upper bounds of a row (i.e a constraint) |
|
1212 |
|
1213 /// The lower and the upper bound of |
|
1214 /// a constraint (row) are |
|
1215 /// extended numbers of type Value, i.e. finite numbers of type |
|
1216 /// Value, -\ref INF or \ref INF. |
|
1217 /// \todo There is no separate function for the |
|
1218 /// lower and the upper bound because we had problems with the |
|
1219 /// implementation of the setting functions for CPLEX: |
|
1220 /// check out whether this can be done for these functions. |
|
1221 void getRowBounds(Row c, Value &lower, Value &upper) { |
|
1222 _getRowBounds(_lpId(c),lower, upper); |
|
1223 } |
|
1224 |
1188 ///Set an element of the objective function |
1225 ///Set an element of the objective function |
1189 void objCoeff(Col c, Value v) {_setObjCoeff(_lpId(c),v); }; |
1226 void objCoeff(Col c, Value v) {_setObjCoeff(_lpId(c),v); }; |
1190 |
1227 |
1191 ///Get an element of the objective function |
1228 ///Get an element of the objective function |
1192 Value objCoeff(Col c) {return _getObjCoeff(_lpId(c)); }; |
1229 Value objCoeff(Col c) {return _getObjCoeff(_lpId(c)); }; |