예제 #1
0
 def get_input_strings(self):
     inputs = ['Name: ' + rp.property_to_string(self, 'name'),
               'Duration (hr): ' + rp.float_to_string(self.duration, 2),
               'Interval (hr): ' + rp.float_to_string(self.interval, 3),
               'Rainfall (in): ' + rp.float_to_string(self.rainfall, 2),
               'Distribution: ' + rp.property_to_string(self.distribution, 'name')]
     return inputs
예제 #2
0
 def get_input_strings(self):
     inputs = [
         'Name: ' + rp.property_to_string(self, 'name'),
         'Duration (hr): ' + rp.float_to_string(self.duration, 2),
         'Interval (hr): ' + rp.float_to_string(self.interval, 3),
         'Rainfall (in): ' + rp.float_to_string(self.rainfall, 2),
         'Distribution: ' + rp.property_to_string(self.distribution, 'name')
     ]
     return inputs
예제 #3
0
파일: basin.py 프로젝트: benjiyamin/nimbus
 def get_input_strings(self):
     area = self.get_total_area()
     cn = self.get_weighted_cn()
     inputs = ['Name: ' + rp.property_to_string(self, 'name'),
               'Area (ac): ' + rp.float_to_string(area, 3),
               'Curve Number: ' + rp.float_to_string(cn, 2),
               'Time of Conc (min): ' + rp.float_to_string(self.tc, 2),
               'Unit Hydrograph: ' + rp.property_to_string(self.uh, 'name'),
               'Peak Factor: ' + rp.property_to_string(self.uh, 'peak_factor')]
     return inputs
예제 #4
0
 def get_input_strings(self):
     if self.section:
         shape_type = rp.property_to_string(self.section.__class__, '__name__')
         shape_span = rp.float_to_string(self.section.span, 3)
         shape_rise = rp.float_to_string(self.section.rise, 3)
     else:
         shape_type = 'Undefined'
         shape_span = 'Undefined'
         shape_rise = 'Undefined'
     inputs = ['Name: ' + rp.property_to_string(self, 'name'),
               'Shape Type: ' + shape_type,
               'Span (in): ' + shape_span,
               'Rise (in): ' + shape_rise,
               'Orifice Coef.: ' + rp.float_to_string(self.orif_coef, 3),
               'Weir. Coef: ' + rp.float_to_string(self.weir_coef, 3),
               'Invert: ' + rp.float_to_string(self.invert, 3)]
     return inputs
예제 #5
0
파일: result.py 프로젝트: benjiyamin/nimbus
 def link_maximums(self):
     report = rp.Report()
     report.add_blank_line()
     report.add_to_columns(['Name', 'Max',  'Max',   'Max',     'Max',     'Max',     'Max'])
     report.add_to_columns(['',     'Flow', 'Flow',  'Stage 1', 'Stage 1', 'Stage 2', 'Stage 2'])
     report.add_to_columns(['',     'Time', '',      'Time',    '',        'Time',    ''])
     report.add_to_columns(['',     '(hr)', '(cfs)', '(hr)',    '(ft)',    '(hr)',    '(ft)'])
     report.add_break_line(length=16 * 7)
     for link in self.parent.links:
         max_flow = max(link.results,        key=op.itemgetter(1))[1]
         max_flow_time = max(link.results,   key=op.itemgetter(1))[0]
         max_stage1 = max(link.results,      key=op.itemgetter(2))[2]
         max_stage1_time = max(link.results, key=op.itemgetter(2))[0]
         max_stage2 = max(link.results,      key=op.itemgetter(3))[3]
         max_stage2_time = max(link.results, key=op.itemgetter(3))[0]
         report.add_to_columns([link.name,
                                rp.float_to_string(max_flow_time,   2),
                                rp.float_to_string(max_flow,        3),
                                rp.float_to_string(max_stage1_time, 2),
                                rp.float_to_string(max_stage1,      3),
                                rp.float_to_string(max_stage2_time, 2),
                                rp.float_to_string(max_stage2,      3)])
     report.add_blank_line()
     report.output()
     return
예제 #6
0
파일: result.py 프로젝트: benjiyamin/nimbus
 def node_maximums(self):
     report = rp.Report()
     report.add_blank_line()
     report.add_to_columns(['Name', 'Max',   'Max',   'Max',    'Max',    'Max',     'Max'])
     report.add_to_columns(['',     'Stage', 'Stage', 'Inflow', 'Inflow', 'Outflow', 'Outflow'])
     report.add_to_columns(['',     'Time',  '',      'Time',   '',       'Time',    ''])
     report.add_to_columns(['',     '(hr)',  '(ft)',  '(hr)',   '(cfs)',  '(hr)',    '(cfs)'])
     report.add_break_line(length=16 * 7)
     for node in self.parent.nodes:
         max_stage = max(node.results,        key=op.itemgetter(1))[1]
         max_stage_time = max(node.results,   key=op.itemgetter(1))[0]
         max_inflow = max(node.results,       key=op.itemgetter(2))[2]
         max_inflow_time = max(node.results,  key=op.itemgetter(2))[0]
         max_outflow = max(node.results,      key=op.itemgetter(3))[3]
         max_outflow_time = max(node.results, key=op.itemgetter(3))[0]
         report.add_to_columns([node.name,
                                rp.float_to_string(max_stage_time,   2),
                                rp.float_to_string(max_stage,        3),
                                rp.float_to_string(max_inflow_time,  2),
                                rp.float_to_string(max_inflow,       3),
                                rp.float_to_string(max_outflow_time, 2),
                                rp.float_to_string(max_outflow,      3)])
     report.add_blank_line()
     report.output()
     return
예제 #7
0
파일: pipe.py 프로젝트: benjiyamin/nimbus
 def get_input_strings(self):
     if self.section:
         shape_type = rp.property_to_string(self.section.__class__, '__name__')
         shape_span = rp.float_to_string(self.section.span, 3)
         shape_rise = rp.float_to_string(self.section.rise, 3)
     else:
         shape_type = shape_span = shape_rise = 'Undefined'
     inputs = ['Name: ' + rp.property_to_string(self, 'name'),
               'Node 1: ' + rp.property_to_string(self.node1, 'name'),
               'Node 2: ' + rp.property_to_string(self.node2, 'name'),
               'Shape Type: ' + shape_type,
               'Span (in): ' + shape_span,
               'Rise (in): ' + shape_rise,
               'Mannings: ' + rp.float_to_string(self.mannings, 3),
               'Length (ft): ' + rp.float_to_string(self.length, 3),
               'Invert 1 (ft): ' + rp.float_to_string(self.invert1, 3),
               'Invert 2 (ft): ' + rp.float_to_string(self.invert2, 3)]
     return inputs
예제 #8
0
 def get_input_strings(self):
     if self.section:
         shape_type = rp.property_to_string(self.section.__class__,
                                            '__name__')
         shape_span = rp.float_to_string(self.section.span, 3)
         shape_rise = rp.float_to_string(self.section.rise, 3)
     else:
         shape_type = shape_span = shape_rise = 'Undefined'
     inputs = [
         'Name: ' + rp.property_to_string(self, 'name'),
         'Node 1: ' + rp.property_to_string(self.node1, 'name'),
         'Node 2: ' + rp.property_to_string(self.node2, 'name'),
         'Shape Type: ' + shape_type, 'Span (in): ' + shape_span,
         'Rise (in): ' + shape_rise,
         'Mannings: ' + rp.float_to_string(self.mannings, 3),
         'Length (ft): ' + rp.float_to_string(self.length, 3),
         'Invert 1 (ft): ' + rp.float_to_string(self.invert1, 3),
         'Invert 2 (ft): ' + rp.float_to_string(self.invert2, 3)
     ]
     return inputs
예제 #9
0
파일: node.py 프로젝트: benjiyamin/nimbus
 def get_input_strings(self):
     inputs = ['Name: ' + rp.property_to_string(self, 'name'),
               'Starting Stage (ft): ' + rp.float_to_string(self.start_stage, 3)]
     return inputs
예제 #10
0
 def get_input_strings(self):
     inputs = [
         'Name: ' + rp.property_to_string(self, 'name'),
         'Starting Stage (ft): ' + rp.float_to_string(self.start_stage, 3)
     ]
     return inputs
예제 #11
0
파일: uh.py 프로젝트: benjiyamin/nimbus
 def get_input_strings(self):
     inputs = ['Name: ' + rp.property_to_string(self, 'name'),
               'Peak Factor: ' + rp.float_to_string(self.peak_factor, 3)]
     return inputs