Package parasol :: Module parameters :: Class FeasiblePair
[hide private]
[frames] | no frames]

Class FeasiblePair

source code


A FeasiblePair is a paired InputParam and OutputParam where the val property of the InputParam is found such that the val property of the OutputParam is equal to the desired feasibleVal for the mathematical model under consideration (i.e. as modeled by the function call, functionToCall).


Notes:
Instance Methods [hide private]
 
__init__(self, inpParam=None, outParam=None, functionToCall=None, feasibleVal=0.0, tolerance=1e-006, maxLoops=40, failValue=None)
Initialize parameter properties
source code
 
feasibleFunc(self, val) source code
 
reCalc(self)
calculate the value of inpParam.val that gives feasibleVal==outParam.val
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variables [hide private]
  inpParam
InputParam object
  outParam
OutputParam object
  functionToCall
function using InputParam to calc OutputParam
  feasibleVal
feasable value of OutputParam.val
  tolerance
allowable error of OutputParam.val
  maxLoops
maximum loops in root solver
  failValue
returned value if solution attempt fails
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, inpParam=None, outParam=None, functionToCall=None, feasibleVal=0.0, tolerance=1e-006, maxLoops=40, failValue=None)
(Constructor)

source code 

Initialize parameter properties

Parameters:
  • inpParam - input parameter object (InputParam)
  • outParam - output parameter object (OutputParam)
  • functionToCall - function using InputParam to calc OutputParam (callable)
  • feasibleVal - feasible value that OutputParam Must have (float)
  • tolerance - allowable error of OutputParam.val (float)
  • maxLoops - maximum loops in root solver
  • failValue - returned value if solution attempt fails, (if not input use inpParam.minVal)
Overrides: object.__init__