model.param() and model.result().param()
Add, define, and remove global parameters. For parameters in results, 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().rename(<oldpname>,<newpname>);
 
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>,...);
The following syntaxes are only applicable for global parameters and not for parameters in results:
model.param().create(<ptag>);
model.param().group().create(<ptag>);
model.param(<ptag>);
model.param().group(<ptag>);
 
model.param(<ptag>).paramCase().create(<pctag>);
model.param(<ptag>).create(<pctag>);
model.param(<ptag>).paramCase(<pctag>).set(<param>,<expr>);
model.param(<ptag>).setFromCase(<param>,<pctag>);
model.param(<ptag>).setFromCase(<params>,<pctag>);
model.param(<ptag>).setFromCase(<pctag>);
 
model.param(<ptag>).setShowInParamSel(true|false);
model.param(<ptag>).showInParamSel();
 
model.param().move(<param>,<ptag>);
model.param().group(<ptag>).move(param>);
Description
model.param() is a collection of global model parameters. Likewise, model.result().param() is a collection of model parameters in results.
model.param().create(<ptag>) or model.param().group().create(<ptag>) creates a global model parameters node named <ptag>.
model.param().group() lists all global parameters nodes. The default parameters node belongs to a group with the fixed named default.
model.param(<ptag>) and  model.param().group(<ptag>) both return the parameters node <ptag>.
The following methods apply equally for model.param(), model.param(<ptag>), and model.result().param():
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().rename(<oldpname>,<newpname>) renames the parameter <oldpname> to <newpname>.
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.
The following methods are available only for global model parameters nodes:
model.param(<ptag>).paramCase().create(<pctag>) or model.param(<ptag>).create(<pctag>) creates a parameter case for the parameters node <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>. You can set more than one parameter value in this way by using an array of parameters names as the first argument. Use model.param(<ptag>).setFromCase(<pctag>) to use the case <pctag> as the source for all parameters in the <ptag> node.
Use model.param(<ptag>).setShowInParamSel(false) to exclude the parameters in the parameters node in <ptag> in parameter selections. The default is that setShowInParamSel is true; that is, all the parameters are included in parameter selections. Use model.param(<ptag>).showInParamSel() to get the current state.
model.param().move(<param>,<ptag>) or model.param(<ptag>).move(<param>) moves the parameter <param> to the parameters node <ptag>.
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()