Loading pyehub/energy_hub/ehub_model.py +11 −5 Original line number Diff line number Diff line Loading @@ -76,7 +76,10 @@ class EHubModel: else: raise RuntimeError("Can't create a hub with no data.") def solve(self, solver_settings: dict = None, is_verbose: bool = False): def solve(self, solver_settings: dict = None, is_verbose: bool = False ): """ Solve the model. Loading @@ -89,22 +92,25 @@ class EHubModel: """ if solver_settings is None: solver_settings = DEFAULT_SOLVER_SETTINGS print(solver_settings) solver = solver_settings["name"] options = solver_settings["options"] print(solver) print(options) if options is None: options = {} if not self._compiled: self.compile() if "solver_path" in solver_settings: solver_path = solver_settings["solver_path"] else: solver_path = None # try: # Use of the solver path is optional, however, # needed when doing cluster submission. solver_path = solver_settings["solver_path"] print(solver_path) status = pylp.solve(objective=self.objective, Loading Loading
pyehub/energy_hub/ehub_model.py +11 −5 Original line number Diff line number Diff line Loading @@ -76,7 +76,10 @@ class EHubModel: else: raise RuntimeError("Can't create a hub with no data.") def solve(self, solver_settings: dict = None, is_verbose: bool = False): def solve(self, solver_settings: dict = None, is_verbose: bool = False ): """ Solve the model. Loading @@ -89,22 +92,25 @@ class EHubModel: """ if solver_settings is None: solver_settings = DEFAULT_SOLVER_SETTINGS print(solver_settings) solver = solver_settings["name"] options = solver_settings["options"] print(solver) print(options) if options is None: options = {} if not self._compiled: self.compile() if "solver_path" in solver_settings: solver_path = solver_settings["solver_path"] else: solver_path = None # try: # Use of the solver path is optional, however, # needed when doing cluster submission. solver_path = solver_settings["solver_path"] print(solver_path) status = pylp.solve(objective=self.objective, Loading