Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions highs/interfaces/highs_c_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1320,32 +1320,34 @@ HighsInt Highs_getIis(void* highs, HighsInt* iis_num_col, HighsInt* iis_num_row,
*iis_num_col = iis.col_index_.size();
*iis_num_row = iis.row_index_.size();
if (col_index != nullptr) {
for (size_t i = 0; i < *iis_num_col; i++) {
for (size_t i = 0; i < static_cast<size_t>(*iis_num_col); i++) {
col_index[i] = iis.col_index_[i];
}
}
if (row_index != nullptr) {
for (size_t i = 0; i < *iis_num_row; i++) {
for (size_t i = 0; i < static_cast<size_t>(*iis_num_row); i++) {
row_index[i] = iis.row_index_[i];
}
}
if (col_bound != nullptr) {
for (size_t i = 0; i < *iis_num_col; i++) {
for (size_t i = 0; i < static_cast<size_t>(*iis_num_col); i++) {
col_bound[i] = iis.col_bound_[i];
}
}
if (row_bound != nullptr) {
for (size_t i = 0; i < *iis_num_row; i++) {
for (size_t i = 0; i < static_cast<size_t>(*iis_num_row); i++) {
row_bound[i] = iis.row_bound_[i];
}
}
if (col_status != nullptr) {
for (size_t i = 0; i < ((Highs*)highs)->getLp().num_col_; i++) {
for (size_t i = 0;
i < static_cast<size_t>(((Highs*)highs)->getLp().num_col_); i++) {
col_status[i] = iis.col_status_[i];
}
}
if (row_status != nullptr) {
for (size_t i = 0; i < ((Highs*)highs)->getLp().num_row_; i++) {
for (size_t i = 0;
i < static_cast<size_t>(((Highs*)highs)->getLp().num_row_); i++) {
row_status[i] = iis.row_status_[i];
}
}
Expand Down
4 changes: 2 additions & 2 deletions highs/lp_data/HighsLp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
bool HighsLp::isMip() const {
size_t integrality_size = this->integrality_.size();
if (integrality_size) {
assert(integrality_size == this->num_col_);
assert(static_cast<HighsInt>(integrality_size) == this->num_col_);
for (HighsInt iCol = 0; iCol < this->num_col_; iCol++)
if (this->integrality_[iCol] != HighsVarType::kContinuous) return true;
}
Expand All @@ -36,7 +36,7 @@ bool HighsLp::hasInfiniteCost(const double infinite_cost) const {
bool HighsLp::hasSemiVariables() const {
size_t integrality_size = this->integrality_.size();
if (integrality_size) {
assert(integrality_size == this->num_col_);
assert(static_cast<HighsInt>(integrality_size) == this->num_col_);
for (HighsInt iCol = 0; iCol < this->num_col_; iCol++)
if (this->integrality_[iCol] == HighsVarType::kSemiContinuous ||
this->integrality_[iCol] == HighsVarType::kSemiInteger)
Expand Down
3 changes: 2 additions & 1 deletion highs/lp_data/HighsLpUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2564,7 +2564,8 @@ HighsStatus assessLpPrimalSolution(const std::string message,
HighsStatus return_status =
calculateRowValuesQuad(lp, solution.col_value, row_value);
if (return_status != HighsStatus::kOk) return return_status;
const bool have_row_names = lp.row_names_.size() >= lp.num_row_;
const bool have_row_names =
lp.row_names_.size() >= static_cast<size_t>(lp.num_row_);
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
const double primal = solution.row_value[iRow];
const double lower = lp.row_lower_[iRow];
Expand Down
Loading