@@ -951,17 +951,16 @@ HighsStatus Highs::run() {
951951 if (this ->userScaleModel (user_scale_data) == HighsStatus::kError )
952952 return HighsStatus::kError ;
953953 this ->userScaleSolution (user_scale_data);
954+ // Indicate that the scaling has been applied
955+ user_scale_data.applied = true ;
954956 // Zero the user scale values to prevent further scaling
955957 this ->options_ .user_cost_scale = 0 ;
956958 this ->options_ .user_bound_scale = 0 ;
957959 }
958960
959961 // Assess whether to warn the user about excessive bounds and costs
960- assessCostBoundScaling (this ->options_ .log_options , this ->model_ ,
961- kExcessivelySmallCostValue ,
962- kExcessivelyLargeCostValue ,
963- kExcessivelySmallBoundValue ,
964- kExcessivelyLargeBoundValue ,
962+ assessCostBoundScaling (this ->options_ .log_options ,
963+ this ->model_ ,
965964 user_scale_data);
966965
967966 HighsStatus status;
@@ -1002,6 +1001,8 @@ HighsStatus Highs::run() {
10021001 // negated to undo user scaling
10031002 this ->options_ .user_cost_scale = -user_scale_data.user_cost_scale ;
10041003 this ->options_ .user_bound_scale = -user_scale_data.user_bound_scale ;
1004+ // Indicate that the scaling has not been applied
1005+ user_scale_data.applied = false ;
10051006 highsLogUser (this ->options_ .log_options , HighsLogType::kInfo ,
10061007 " After solving the user-scaled model, the unscaled solution "
10071008 " has objective value %.12g\n " ,
@@ -2009,6 +2010,20 @@ HighsStatus Highs::getIllConditioning(HighsIllConditioning& ill_conditioning,
20092010 ill_conditioning_bound);
20102011}
20112012
2013+ HighsStatus Highs::getCostBoundScaling (HighsInt& suggested_cost_scale,
2014+ HighsInt& suggested_bound_scale) {
2015+ this ->logHeader ();
2016+ HighsUserScaleData data;
2017+ initialiseUserScaleData (this ->options_ , data);
2018+ assessCostBoundScaling (this ->options_ .log_options , this ->model_ ,
2019+ data, false );
2020+ suggested_cost_scale = data.suggested_user_cost_scale ;
2021+ suggested_bound_scale = data.suggested_user_bound_scale ;
2022+ printf (" Highs::getCostBoundScaling suggested cost / bound scale values of %d / %d\n " ,
2023+ int (suggested_cost_scale), int (suggested_bound_scale));
2024+ return HighsStatus::kOk ;
2025+ }
2026+
20122027HighsStatus Highs::getIis (HighsIis& iis) {
20132028 HighsStatus return_status = this ->getIisInterface ();
20142029 if (return_status != HighsStatus::kError ) iis = this ->iis_ ;
0 commit comments