Two variable names consisting of an attribute, a dataset-qualified attribute, or a fully-qualified attribute are of course equal if the component strings are equal.
Two expressions are equal if their defining strings are identical, ignoring spaces. Thus these two expressions are equivalent:
urbansim.gridcell.population+1 urbansim.gridcell.population + 1
However, two textually different expressions are not equivalent,
even if they are algebraically equal. For example,
1 + urbansim.gridcell.population is different from the previous
expressions. In many cases this doesn't matter. Reasons it may matter
are: (1) if the resulting value uses a lot of memory or takes a long time
to compute, having a second copy of the value will waste memory or
computation time; and (2) if the variable defined by the expression is used
in a specification, you could inadvertently end up with two variables. For
this reason, good practice is to put each expression that you'll need for a
given package and dataset, along with an alias for that expression, in an
aliases.py file. (See Section 6.4.4.) Elsewhere use
the alias.