I have variables in system dynamic in NetLogo and I am trying a nested if else as follows
Md * (( ifelse n_porg = 0 [ 0 ] [ ifelse ( ( SDIa * Total_norg ) / n_porg ) > 1
[ 1 ] [ ( SDIa * Total_norg ) / n_porg ] ] ) / delay )
I am getting an error "Expected reporter
" please help
ifelse
is a command; you can't drop a command into the middle of a reporter expression, because a command doesn't report a value.Instead of
ifelse
, useifelse-value
, which is a reporter.You may find you need to add parentheses, e.g.
ifelse (n_porg = 0) ...