@@ -1862,6 +1862,16 @@ HighsStatus Highs::getRangingInterface() {
18621862 return getRangingData (this ->ranging_ , solver_object);
18631863}
18641864
1865+ HighsStatus Highs::getIisInterfaceReturn (const HighsStatus return_status) {
1866+ if (return_status != HighsStatus::kError ) {
1867+ // Construct the ISS LP
1868+ this ->iis_ .getLp (model_.lp_ );
1869+ // Construct the ISS status vectors
1870+ this ->iis_ .getStatus (model_.lp_ );
1871+ }
1872+ return return_status;
1873+ }
1874+
18651875HighsStatus Highs::getIisInterface () {
18661876 if (this ->model_status_ == HighsModelStatus::kOptimal ||
18671877 this ->model_status_ == HighsModelStatus::kUnbounded ) {
@@ -1872,7 +1882,7 @@ HighsStatus Highs::getIisInterface() {
18721882 this ->iis_ .invalidate ();
18731883 // No IIS exists, so validate the empty HighsIis instance
18741884 this ->iis_ .valid_ = true ;
1875- return HighsStatus::kOk ;
1885+ return this -> getIisInterfaceReturn ( HighsStatus::kOk ) ;
18761886 }
18771887 HighsStatus return_status = HighsStatus::kOk ;
18781888 if (this ->model_status_ != HighsModelStatus::kNotset &&
@@ -1882,30 +1892,30 @@ HighsStatus Highs::getIisInterface() {
18821892 " Calling Highs::getIis for a model with status %s\n " ,
18831893 this ->modelStatusToString (this ->model_status_ ).c_str ());
18841894 }
1885- if (this ->iis_ .valid_ ) return HighsStatus::kOk ;
1895+ if (this ->iis_ .valid_ ) return this -> getIisInterfaceReturn ( HighsStatus::kOk ) ;
18861896 this ->iis_ .invalidate ();
18871897 const HighsLp& lp = model_.lp_ ;
18881898 // Check for trivial IIS: empty infeasible row or inconsistent bounds
18891899 if (this ->iis_ .trivial (lp, options_)) {
18901900 this ->model_status_ = HighsModelStatus::kInfeasible ;
1891- return HighsStatus::kOk ;
1901+ return this -> getIisInterfaceReturn ( HighsStatus::kOk ) ;
18921902 }
18931903 HighsInt num_row = lp.num_row_ ;
18941904 if (num_row == 0 ) {
18951905 // For an LP with no rows, the only scope for infeasibility is
18961906 // inconsistent columns bounds - which has already been assessed,
18971907 // so validate the empty HighsIis instance
18981908 this ->iis_ .valid_ = true ;
1899- return HighsStatus::kOk ;
1909+ return this -> getIisInterfaceReturn ( HighsStatus::kOk ) ;
19001910 }
19011911 // Look for infeasible rows based on row value bounds
19021912 if (this ->iis_ .rowValueBounds (lp, options_)) {
19031913 this ->model_status_ = HighsModelStatus::kInfeasible ;
1904- return HighsStatus::kOk ;
1914+ return this -> getIisInterfaceReturn ( HighsStatus::kOk ) ;
19051915 }
19061916 // Don't continue with more expensive techniques if using the IIS
19071917 // light strategy
1908- if (options_.iis_strategy == kIisStrategyLight ) return HighsStatus::kOk ;
1918+ if (options_.iis_strategy == kIisStrategyLight ) return this -> getIisInterfaceReturn ( HighsStatus::kOk ) ;
19091919 const bool ray_option = false ;
19101920 // options_.iis_strategy == kIisStrategyFromRayRowPriority ||
19111921 // options_.iis_strategy == kIisStrategyFromRayColPriority;
@@ -2015,9 +2025,7 @@ HighsStatus Highs::getIisInterface() {
20152025 int (max_iterations), min_time,
20162026 num_lp_solved > 0 ? sum_time / num_lp_solved : 0 , max_time);
20172027 }
2018- // Construct the ISS LP
2019- this ->iis_ .getLp (lp);
2020- return return_status;
2028+ return this ->getIisInterfaceReturn (return_status);
20212029}
20222030
20232031HighsStatus Highs::elasticityFilterReturn (
0 commit comments