MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / passRowName

Method passRowName

highs/lp_data/Highs.cpp:764–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

762}
763
764HighsStatus Highs::passRowName(const HighsInt row, const std::string& name) {
765 const HighsInt num_row = this->model_.lp_.num_row_;
766 if (row < 0 || row >= num_row) {
767 highsLogUser(
768 options_.log_options, HighsLogType::kError,
769 "Index %d for row name %s is outside the range [0, num_row = %d)\n",
770 int(row), name.c_str(), int(num_row));
771 return HighsStatus::kError;
772 }
773 if (int(name.length()) <= 0) {
774 highsLogUser(options_.log_options, HighsLogType::kError,
775 "Cannot define empty row names\n");
776 return HighsStatus::kError;
777 }
778 this->model_.lp_.row_names_.resize(num_row);
779 this->model_.lp_.row_hash_.update(row, this->model_.lp_.row_names_[row],
780 name);
781 this->model_.lp_.row_names_[row] = name;
782 return HighsStatus::kOk;
783}
784
785HighsStatus Highs::passModelName(const std::string& name) {
786 this->model_.lp_.model_name_ = name;

Callers 8

elasticityFilterMethod · 0.95
test_basicsMethod · 0.45
addConstrMethod · 0.45
addConstrsMethod · 0.45
nameMethod · 0.45
TestFilereader.cppFile · 0.45
TestNames.cppFile · 0.45

Calls 4

highsLogUserFunction · 0.85
c_strMethod · 0.80
resizeMethod · 0.45
updateMethod · 0.45

Tested by 1

test_basicsMethod · 0.36