Environment environment = (Environment)_environment;\r
// Double old = (Double)environment.getValue(variable.name + variable.subscriptKey());\r
Double old = (Double)environment.getValue(variable.base.index(_environment, subscripts));\r
+ // FIXME: should not be fixed like this\r
+ if(old == null) old = 0.0;\r
return old+environment.step*(Double)e.evaluate(environment);\r
}\r
\r
for (int i = 0; i < model.derivativeArray.length; i++) {\r
Variable v = model.derivativeArray[i].target;\r
if(!used.add(v.base.name)) continue;\r
- for(int index=0;index<v.base.dimension();index++)\r
- valueArray[offset++] = (Double)getValue(v.base.index(this, null)+index);\r
+ for(int index=0;index<v.base.dimension();index++) {\r
+ Double value = (Double)getValue(v.base.index(this, null)+index);\r
+ // FIXME: should not be fixed like this\r
+ if(value == null) value = 0.0;\r
+ valueArray[offset++] = value;\r
+ }\r
}\r
\r
// NOTE: there is room for optimization as parameter values that do not\r