Skip to content

Commit

Permalink
Make some internal methods private
Browse files Browse the repository at this point in the history
  • Loading branch information
schmoelder committed Mar 11, 2024
1 parent 2a6fe38 commit a3e6c69
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CADETProcess/modelBuilder/carouselBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ def build_flow_sheet(self):

flow_sheet = FlowSheet(self.component_system, self.name)

self.add_units(flow_sheet)
self.add_inter_zone_connections(flow_sheet)
self.add_intra_zone_connections(flow_sheet)
self._add_units(flow_sheet)
self._add_inter_zone_connections(flow_sheet)
self._add_intra_zone_connections(flow_sheet)

return flow_sheet

def add_units(self, flow_sheet):
def _add_units(self, flow_sheet):
"""Add units to flow_sheet"""
col_index = 0
for unit in self.flow_sheet.units:
Expand All @@ -118,7 +118,7 @@ def add_units(self, flow_sheet):
flow_sheet.add_unit(col)
col_index += 1

def add_inter_zone_connections(self, flow_sheet):
def _add_inter_zone_connections(self, flow_sheet):
"""Add connections between zones."""
for unit, connections in self.flow_sheet.connections.items():
if isinstance(unit, ZoneBaseClass):
Expand All @@ -139,7 +139,7 @@ def add_inter_zone_connections(self, flow_sheet):

zone_flow_flow_rate = flow_rates[zone.name].total_out

def add_intra_zone_connections(self, flow_sheet):
def _add_intra_zone_connections(self, flow_sheet):
"""Add connections within zones."""
for zone in self.zones:
for col_index in range(self.n_columns):
Expand All @@ -161,7 +161,7 @@ def build_process(self):
flow_sheet = self.build_flow_sheet()
process = Process(flow_sheet, self.name)

self.add_events(process)
self._add_events(process)

return process

Expand All @@ -170,7 +170,7 @@ def cycle_time(self):
"""float: cycle time of the process."""
return self.n_columns * self.switch_time

def add_events(self, process):
def _add_events(self, process):
"""Add events to process."""
process.cycle_time = self.n_columns * self.switch_time
process.add_duration('switch_time', self.switch_time)
Expand Down

0 comments on commit a3e6c69

Please sign in to comment.