| 3865 | } |
| 3866 | |
| 3867 | bool Highs::validLinearObjective(const HighsLinearObjective& linear_objective, |
| 3868 | const HighsInt iObj) const { |
| 3869 | HighsInt linear_objective_coefficients_size = |
| 3870 | linear_objective.coefficients.size(); |
| 3871 | if (linear_objective_coefficients_size != this->model_.lp_.num_col_) { |
| 3872 | highsLogUser( |
| 3873 | options_.log_options, HighsLogType::kError, |
| 3874 | "Coefficient vector for linear objective %s has size %d != %d = " |
| 3875 | "lp.num_col_\n", |
| 3876 | iObj >= 0 ? std::to_string(iObj).c_str() : "", |
| 3877 | int(linear_objective_coefficients_size), |
| 3878 | int(this->model_.lp_.num_col_)); |
| 3879 | return false; |
| 3880 | } |
| 3881 | if (!options_.blend_multi_objectives && |
| 3882 | hasRepeatedLinearObjectivePriorities(&linear_objective)) { |
| 3883 | highsLogUser( |
| 3884 | options_.log_options, HighsLogType::kError, |
| 3885 | "Repeated priorities for lexicographic optimization is illegal\n"); |
| 3886 | return false; |
| 3887 | } |
| 3888 | return true; |
| 3889 | } |
| 3890 | |
| 3891 | bool Highs::hasRepeatedLinearObjectivePriorities( |
| 3892 | const HighsLinearObjective* linear_objective) const { |
no test coverage detected