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

Class MinMaxPair

source code


A MinMaxPair is a paired InputParam and OutputParam where the val property of the InputParam is found such that the val property of the OutputParam is minimized or maximized 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, findmin=0, tolerance=1e-006, maxLoops=400, failValue=None)
Initialize parameter properties
source code
 
optFunc(self, val) source code
 
reCalc(self)
calculate the value of inpParam.val that optimizes outParam.val Show non-convergence notification messages if applicable.
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
  findmin
flag to minimize or maximize 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, findmin=0, tolerance=1e-006, maxLoops=400, 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)
  • findmin - findmin is a logic flag (1=minimize, 0=maximize) (int)
  • 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__