Skip to content

Commit

Permalink
fix indents
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbailey committed Dec 9, 2019
1 parent d34eaa2 commit 5de7040
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions rail/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ def __init__(self) -> None:
self.data = {}

def new(self, name: str, cost: float, reduction: float) -> Control:
"""
A method to add a new controls to the Controls class
"""
"""
A method to add a new controls to the Controls class
"""
self.data[name] = Control(name, cost, reduction)
return self.data[name]

def costs(self):
"""
A method to compute the deterministic costs of implemented controls in a Controls class
"""
"""
A method to compute the deterministic costs of implemented controls in a Controls class
"""
return np.sum(list(map(lambda x: x['cost'] if x['implemented'] is True else 0, self.data.values())))

def costs_lognormal(self):
"""
A method to compute the stochastic costs of implemented controls in a Controls class
"""
"""
A method to compute the stochastic costs of implemented controls in a Controls class
"""
return np.sum(list(map(lambda x: x.evaluate_lognormal().data['cost'] if x.data['implemented'] is True else 0, self)))

0 comments on commit 5de7040

Please sign in to comment.