Package parasol :: Module ProbDesc
[hide private]
[frames] | no frames]

Source Code for Module parasol.ProbDesc

 1   
 2  from parasol_main import ParametricSoln 
 3  from parameters import POS_INF, NEG_INF  
 4   
5 -class ProblemDescription( object ):
6 - def __init__(self, subtaskName="", taskName='', 7 author="", constraintTolerance=0.0):
8 9 self.subtaskName = subtaskName 10 self.taskName = taskName 11 self.author = author 12 self.constraintTolerance = constraintTolerance 13 14 self.desVarL = [] #: list of design variable descriptions 15 self.resVarL = [] #: list of result variable descriptions 16 self.resVarLimitD = {} #: dictionary of result variable limits 17 18 self.controlRoutine = None #: control routine for problem 19 self.renderControlRoutine = None #: control routine for POV rendering
20
21 - def setControlRoutine(self, controlRoutine):
22 self.controlRoutine = controlRoutine
23
24 - def setRenderControlRoutine(self, renderControlRoutine):
25 self.renderControlRoutine = renderControlRoutine
26
27 - def addDesVars(self, *dvLists):
28 ''' add design variables to the system (these variables may be used to 29 optimize the system or to create plots) 30 design vars have: 31 name, value, minVal, maxVal, NSteps, units, description 32 ''' 33 for row in dvLists: 34 self.desVarL.append( row )
35
36 - def addResultVars(self, *rvLists):
37 ''' now add any Result Variables That might be plotted 38 result variables have: 39 name, units, description <,possibly loLimit, hiLimit> 40 ''' 41 for row in rvLists: 42 self.resVarL.append( row )
43
44 - def setResultVariableLimits(self, name="resultvar", loLimit=NEG_INF, hiLimit=POS_INF):
45 self.resVarLimitD[name] = [loLimit, hiLimit]
46