@@ -143,21 +143,30 @@ def get(self, name, ifmissing=None):
143143 def checker (self ):
144144 """Verify that options *selected* make sense with respect to each other
145145 """
146- def _bad_rho_setters (msg ):
147- raise ValueError ("Rho setter options do not make sense together:\n "
146+ def _bad_options (msg ):
147+ raise ValueError ("Options do not make sense together:\n "
148148 f"{ msg } " )
149-
150- if self .get ("grad_rho" ) and self .get ("sensi_rho" ):
151- _bad_rho_setters ("Only one rho setter can be active." )
149+
150+ # remember that True is 1 and False is 0
151+ if (self .get ("grad_rho" ) + self .get ("sensi_rho" ) + self .get ("coeff_rho" ) + self .get ("reduced_costs_rho" ) + self .get ("sep_rho" )) > 1 :
152+ _bad_options ("Only one rho setter can be active." )
152153 if not (self .get ("grad_rho" )
153154 or self .get ("sensi_rho" )
154155 or self .get ("sep_rho" )
155156 or self .get ("reduced_costs_rho" )):
156157 if self .get ("dynamic_rho_primal_crit" ) or self .get ("dynamic_rho_dual_crit" ):
157- _bad_rho_setters ("dynamic rho only works with grad-, sensi-, and sep-rho" )
158+ _bad_options ("dynamic rho only works with an automated rho setter" )
159+ if self .get ("grad_rho" ) and self .get ("bundles_per_rank" ) != 0 :
160+ _bad_options ("Grad rho does not work with loose bundling (--bundles-per-rank).\n "
161+ "Also note that loose bundling is being deprecated in favor of proper bundles." )
162+
163+ if self .get ("ph_primal_hub" )\
164+ and not (self .get ("ph_dual" ) or self .get ("relaxed_ph" )):
165+ _bad_options ("--ph-primal-hub is used only when there is a cylinder that provideds Ws "
166+ "such as --ph-dual or --relaxed-ph" )
167+
158168 if self .get ("rc_fixer" ) and not self .get ("reduced_costs" ):
159- _bad_rho_setters ("--rc-fixer requires --reduced-costs" )
160-
169+ _bad_options ("--rc-fixer requires --reduced-costs" )
161170
162171 def add_solver_specs (self , prefix = "" ):
163172 sstr = f"{ prefix } _solver" if prefix != "" else "solver"
@@ -732,7 +741,8 @@ def subgradient_bounder_args(self):
732741
733742
734743 def ph_ob_args (self ):
735- raise RuntimeError ("ph_ob (the --ph-ob option) and ph_ob_args were deprecated and replaced with ph_dual August 2025" )
744+ raise RuntimeError ("ph_ob (the --ph-ob option) and ph_ob_args were deprecated and replaced with ph_dual August 2025\n "
745+ "To get the same effect as ph_ob, use --ph-dual with --ph-dual-grad-rho" )
736746
737747 def relaxed_ph_args (self ):
738748
@@ -753,9 +763,19 @@ def ph_dual_args(self):
753763 domain = bool ,
754764 default = False )
755765 self .add_to_config ("ph_dual_rescale_rho_factor" ,
756- description = "Used to rescale rho initially (default=1.0)" ,
766+ description = "Used to rescale rho initially (default=0.1)" ,
767+ domain = float ,
768+ default = 0.1 )
769+ self .add_to_config ("ph_dual_rho_multiplier" ,
770+ description = "Rescale factor for dynamic updates in ph_dual if ph_dual and a rho setter are chosen;"
771+ " note that it is not cummulative (default=1.0)" ,
757772 domain = float ,
758773 default = 1.0 )
774+ self .add_to_config ("ph_dual_grad_order_stat" ,
775+ description = "Order stat for selecting rho if ph_dual and ph_dual_grad_rho are chosen;"
776+ " note that this is impacted by the multiplier (default=0.0)" ,
777+ domain = float ,
778+ default = 0.0 )
759779
760780
761781 def xhatlooper_args (self ):
0 commit comments