model.param() and model.result().param()
Add, define, and remove global parameters. For parameters in results and postprocessing, model.result().param() works in the same way as model.param().
Syntax
model.param().set(<param>,<expr>);
model.param().set(<param>,<expr>,<descr>);
model.param().descr(<param>,<descr>);
model.param().remove(<param>);
model.param().clear();
 
model.param().varnames();
model.param().get(<param>);
model.param().descr(<param>);
model.param().evaluate(<param>);
model.param().evaluateComplex(<param>);
model.param().evaluateUnit(<param>);
model.param().loadFile(tempFile, ...);
model.param().saveFile(tempFile, ...);
 
model.param(<ptag>).setShowInParamSel(true|false);
model.param(<ptag>).paramCase().create(<pctag>);
model.param(<ptag>).paramCase(<pctag>).set(<param>,<expr>);
model.param(<ptag>).setFromCase(<param>,<pctag>);
 
The last four syntaxes above are only applicable for global parameters and not for parameters in the results.
Description
model.param() is a collection of global model parameters. Likewise, model.result().param() is a collection of model parameters for results and postprocessing.
model.param().set(<param>,<expr>) defines the parameter <param> as <expr>.
model.param().set(<param>,<expr>,<descr>) defines the parameter <param> as <expr> and assigns it the description <descr>.
model.param().descr(<param>,<descr>) sets the description for the parameter <param>.
model.param().remove(<param>) removes the parameter <param>.  model.param().clear() removes all parameters.
  model.param().varnames() returns the names of all parameters as a string array.
model.param().get(<param>) returns the parameter value as a string.
model.param().descr(<param>) returns the parameter description as a string.
model.param().evaluate(<param>) evaluates the value of the parameter <param> as a double real-valued floating-point value. For complex-valued parameters, use the evaluateComplex method instead.
model.param().evaluateComplex(<param>) evaluates the value of the parameter <param> as a double floating-point array with the real and imaginary part of a complex-valued parameter.
model.param().evaluateUnit(<param>) returns the unit of the parameter <param> if defined. It returns null if the parameter has no unit defined, or if the model does not use any unit system.
For model.param().loadFile() and model.param().saveFile(), see The loadFile and saveFile Methods.
Use model.param(<ptag>).setShowInParamSel(false); to exclude the parameters in the global parameter set in <ptag> in parameter selections. The default is that setShowInParamSel is true; that is, all the parameters are included in parameter selections.
model.param(<ptag>).paramCase().create(<pctag>) creates a parameter case for a set of global parameters <ptag>. You can create several parameter cases, where you can use the .set(<param>,<expr>); syntax to specify another expression for any existing parameter <param>. Then use model.param(<ptag>).setFromCase(<param>,<pctag>); to specify the parameter case <pctag> as the source for the value of the parameter <param>.
Example
Define the parameter c in terms of another parameter a and then remove c.
Code for Use with Java
Model model = ModelUtil.create("Model");
model.param().set("c","1+a");
model.param().remove("c");
Code for Use with MATLAB
model = ModelUtil.create('Model');
model.param.set('c','1+a');
model.param.remove('c');
See Also
model.variable()