@@ -2166,24 +2166,27 @@ def read_parameters(self, model: Model) -> None:
21662166 model .logger .info (f'complete { __class__ !s} : { sys ._getframe ().f_code .co_name } ' )
21672167
21682168 def sync_interest_rate (self , model ):
2169+ def discount_rate_display () -> str :
2170+ return str (self .discountrate .quantity ()).replace (' dimensionless' , '' )
2171+
21692172 if self .discountrate .Provided ^ self .FixedInternalRate .Provided :
21702173 if self .discountrate .Provided :
21712174 self .FixedInternalRate .value = self .discountrate .quantity ().to (
21722175 convertible_unit (self .FixedInternalRate .CurrentUnits )).magnitude
21732176 model .logger .info (f'Set { self .FixedInternalRate .Name } to { self .FixedInternalRate .quantity ()} '
2174- f'because { self .discountrate .Name } was provided ({ self . discountrate . value } )' )
2177+ f'because { self .discountrate .Name } was provided ({ discount_rate_display () } )' )
21752178 else :
21762179 self .discountrate .value = self .FixedInternalRate .quantity ().to (
21772180 convertible_unit (self .discountrate .CurrentUnits )).magnitude
21782181 model .logger .info (
2179- f'Set { self .discountrate .Name } to { self . discountrate . value } because '
2182+ f'Set { self .discountrate .Name } to { discount_rate_display () } because '
21802183 f'{ self .FixedInternalRate .Name } was provided ({ self .FixedInternalRate .quantity ()} )' )
21812184
21822185 if self .discountrate .Provided and self .FixedInternalRate .Provided \
21832186 and self .discountrate .quantity ().to (convertible_unit (self .FixedInternalRate .CurrentUnits )).magnitude \
21842187 != self .FixedInternalRate .value :
21852188 model .logger .warning (f'{ self .discountrate .Name } and { self .FixedInternalRate .Name } provided with different '
2186- f'values ({ self . discountrate . value } ; { self .FixedInternalRate .quantity ()} ). '
2189+ f'values ({ discount_rate_display () } ; { self .FixedInternalRate .quantity ()} ). '
21872190 f'It is recommended to only provide one of these values.' )
21882191
21892192 self .interest_rate .value = self .discountrate .quantity ().to (convertible_unit (self .interest_rate .CurrentUnits )).magnitude
0 commit comments