3.6.11 SetDAEOptions
Command structure of SetDAEOptions.
Besides the equation system and the list of variables, a DAEObject contains a list of arbitrary options. Use SetDAEOptions to store or to update options in a DAEObject: SetDAEOptions[dae, name -> val] stores the value val of the option name in dae and returns the new list of options. If the second argument is a list of option rules, the value for each option rule is stored. Previously stored values for the given options are replaced by the new values and new options are appended to the list of options. Note that SetDAEOptions alters the given DAEObject rather than returning a new object. Instead it returns the updated option list.
In contrast to the Mathematica function SetOptions, the function SetDAEOptions does not check whether a given option is a valid DAEObject option. Any option is a valid DAEObject option and can be stored in the object (there is no Options[DAEObject]).
To alter the DesignPoint option of a DAEObject it is recommended to use the function UpdateDesignPoint.
See also: GetDAEOptions, GetEquations, GetMatrix, GetVariables, GetRHS, GetDesignPoint, UpdateDesignPoint.
Examples
Load Analog Insydes.
In[1]:= <<AnalogInsydes`
Define netlist description of a simple diode rectifier circuit.
In[2]:= cir = Circuit[ Netlist[ {V0, {1, 0}, Symbolic -> V0, Value -> 2. Sin[10^6 Time]}, {R1, {2, 0}, Symbolic -> R1, Value -> 100.}, {C1, {2, 0}, Symbolic -> C1, Value -> 1.*^-7}, {D1, {1 -> A, 2 -> C}, Model -> "Diode", Selector -> "Spice"} ] ]
Out[2]=
Set up DAE system.
In[3]:= dae = CircuitEquations[cir, AnalysisMode -> Transient, ElementValues -> Symbolic]
Out[3]=
Inspect the value of the InitialTime option in dae.
In[4]:= GetDAEOptions[dae, InitialTime]
Out[4]=
Alter the value of the InitialTime option.
In[5]:= SetDAEOptions[dae, InitialTime -> 0.5]
Out[5]=
Note that dae was altered by SetDAEOptions.
In[6]:= GetDAEOptions[dae, InitialTime]
Out[6]=
You can set arbitrary options with arbitrary values.
In[7]:= SetDAEOptions[dae, Comment -> "This object describes a rectifier circuit"]
Out[7]=
|