Mentions légales du service

Skip to content
Snippets Groups Projects
Commit f11e96d9 authored by Denis Merigoux's avatar Denis Merigoux
Browse files

Fixed bug

parent 96734aff
No related branches found
No related tags found
No related merge requests found
......@@ -257,7 +257,7 @@ class DichotomicSearch(ABC):
class TauxMarginal(DichotomicSearch):
def __init__(self, augmentation: Augmentation):
self.augmentation = augmentation
self.transform_: Augmentation = augmentation
def search_constraint(
self,
......@@ -266,7 +266,7 @@ class TauxMarginal(DichotomicSearch):
current_search_param_value: int
) -> Any:
self.deltai = rev2 - rev1
augmentation_mensuelle_m = Montant.euros(self.augmentation.augmentation_mensuelle, s)
augmentation_mensuelle_m = Montant.euros(self.transform_.augmentation_mensuelle, s)
if current_search_param_value >= 0 and current_search_param_value <= 100:
deltai_max = (augmentation_mensuelle_m * 12) % Taux.pourcent(100 - current_search_param_value)
elif current_search_param_value >= 100:
......@@ -283,8 +283,8 @@ class TauxMarginal(DichotomicSearch):
deltai_m = self.deltai // 12
deltai_m_print = deltai_m.evaluate(s)
ratio: float = ((deltai_m_print.to_float() / # type:ignore
(self.augmentation.augmentation_mensuelle))
if self.augmentation.augmentation_mensuelle != 0 else float("inf"))
(self.transform_.augmentation_mensuelle))
if self.transform_.augmentation_mensuelle != 0 else float("inf"))
if ratio == float("inf"):
marginal_tax_rate_found: float = float("inf")
else:
......@@ -437,7 +437,7 @@ class TauxMarginalMaximalApresAugmentation(Question):
self.precision_ = precision
def result_found_lines(self, s: Solver, marginal_tax_rate_found: float) -> List[Tuple[str, Any]]:
augmentation_mensuelle_m = Montant.euros(self.search_.augmentation.augmentation_mensuelle, s)
augmentation_mensuelle_m = Montant.euros(self.search_.transform_.augmentation_mensuelle, s)
if self.search_.deltai is None:
raise TypeError("deltai is None !")
deltai_m = self.search_.deltai // 12
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment