GenericResponse
Model ElementGenericResponse is just a layer over the standard MotionSolve Rv object. The additional layer connects the underlying Rv to plotting and optimization functionality.
Class Name
GenericResponse
Attribute Summary
Name | Property | Modifiable by Command? | Designable |
---|---|---|---|
label | Str () | ||
function | Function () | Yes | |
routine | Routine () | ||
scale | Double (1) | ||
useDeriv | Bool (False) | ||
plot | Bool () |
Usage
#1: GenericResponse specified as an expression
GenericResponse (function=expressionString, optional_attributes)
#2: Defined in a compiled user-subroutine
GenericResponse (function=userString, routine=string, optional_attributes)
#3: Defined in a Python function
GenericResponse (function=userString, routine=functionPointer, optional_attributes)
Attributes
- function
- String defining a valid MotionSolve expression.
- function
- String defining a valid user function MotionSolve expression.
- routine
- String
- function
- String defining a valid user function MotionSolve expression.
- routine
- Pointer to a callable function in Python.
- label
- String
- scale
- Double
- useDeriv
- Boolean
- plot
- Bool
Example:
#1: GenericResponse of type expression
energy = GenericResponse (label="Energy", function = "WZ(21,31)*FZ(21,31)", scale=10)
#2: GenericResponse of type interpreted user subroutine
energy = GenericResponse (label="Energy", function = myPowerFunction, scale=10)
#3: GenericResponse of type compiled user subroutine
energy = GenericResponse (label="Energy", function = "myPowerFunction", scale=10)
Comments
- See Properties for an explanation about what properties are, why they are used, and how you can extend these.