// _inputNumber is invalid, but do not compute
// the value until all parameters have been set.
_inputNumberInvalid = true;
// Set the input consumption rate.
_inputRate.setToken(new IntToken(_inputNumber));
} else if (attribute == polynomialArray) {
ArrayToken maskToken = ((ArrayToken) polynomialArray.getToken());
_maskNumber = maskToken.length();
_mask = new int[_maskNumber];
_maxPolyValue = 0;
for (int i = 0; i < _maskNumber; i++) {
_mask[i] = ((IntToken) maskToken.getElement(i)).intValue();
if (_mask[i] <= 0) {
throw new IllegalActionException(this,
"Polynomial is required to be strictly positive.");
}
if (_mask[i] > _maxPolyValue) {
_maxPolyValue = _mask[i];
}
}
_inputNumberInvalid = true;
// Set the output production rate.
_outputRate.setToken(new IntToken(_maskNumber));
} else {
super.attributeChanged(attribute);
}
}