[Ns-developers] Default Values
Joseph Kopena
tjkopena at cs.drexel.edu
Sat Jan 19 06:33:05 PST 2008
On Jan 19, 2008 4:09 AM, Mathieu Lacage <mathieu.lacage at sophia.inria.fr> wrote:
> On Fri, 2008-01-18 at 21:27 -0500, Joseph Kopena wrote:
> What sounds chaotic ? Craig's generic Set ("path", value) proposal was
> not related in any way to DefaultValues: it was related to an extension
> of the Parameter proposal.
But aren't the Set & Parameter discussions basically talking about
replacing the default values system? It sounds unfortunate to
maintain all of them---I would assume one (the simplest) will come to
be predominantly used for the functionality the others were intending
to provide, and there'll just be a real mix-match of each being used
in random places. My understanding was that they were proposing
schemes for parameterizing simulations that added naming and scope
structure, which the default value scheme does not currently have.
In any event, having objects continually reference the
parameterization scheme throughout their lifetime & be subject to
changes therein sounds chaotic.
> Sure. However, it seems pretty obvious to me that calling a Setter on a
> factory is not to going to influence in any way the behavior of an
> object which has already been created by that factory. Or are you
> referring to another problem ?
Right, and I think that could be made fairly obvious for default
values as well if the style were adopted that they are not referenced
after object creation. However, the factory get/set scheme seemed to
be being put forward to address the concern of objects created during
simulation runtime and not being subject to default value changes made
after the simulation was initialized. I'm saying it doesn't do that
anymore than the other schemes.
> > What if default values could be locked, either system wide or by
> > specific variables? If anything tries to change one afterward, the
> > sim bails and the user knows something's going on.
>
> I am not sure I understand what you are proposing here.
So, for example, you could write the following code:
main() {
set default values
process command line for default value overrides
lock default values
create simulation, loading modules, protocols, etc
run simulation
tear down
}
In this case, by locking the default values, you prevent non-user code
(i.e. some arbitrary protocol or mobility model I've loaded) from
changing the default values away from what I as the simulation coder
intended them to be. I thought that was a problem being put forward
for the simulation parameterization schemes to address.
--
- joe kopena
right here and now
More information about the Ns-developers
mailing list