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

Method changeIntegralityInterface

highs/lp_data/HighsInterface.cpp:883–906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

881}
882
883HighsStatus Highs::changeIntegralityInterface(
884 HighsIndexCollection& index_collection, const HighsVarType* integrality) {
885 HighsInt num_integrality = dataSize(index_collection);
886 // If a non-positive number of integrality (may) need changing nothing needs
887 // to be done
888 if (num_integrality <= 0) return HighsStatus::kOk;
889 if (highsVarTypeUserDataNotNull(options_.log_options, integrality,
890 "column integrality"))
891 return HighsStatus::kError;
892 // Take a copy of the integrality that can be normalised
893 std::vector<HighsVarType> local_integrality{integrality,
894 integrality + num_integrality};
895 // If changing the integrality for a set of columns, verify that the
896 // set entries are in ascending order
897 if (index_collection.is_set_)
898 assert(increasingSetOk(index_collection.set_, 0,
899 index_collection.dimension_, true));
900 HighsStatus return_status = changeLpIntegrality(model_.lp_, index_collection,
901 local_integrality, options_);
902 assert(return_status != HighsStatus::kError);
903 // Deduce the consequences of new integrality
904 invalidateModelStatus();
905 return return_status;
906}
907
908HighsStatus Highs::changeCostsInterface(HighsIndexCollection& index_collection,
909 const double* cost) {

Callers

nothing calls this directly

Calls 4

dataSizeFunction · 0.85
increasingSetOkFunction · 0.85
changeLpIntegralityFunction · 0.85

Tested by

no test coverage detected