NetLogo / LevelSpace

This is the LevelSpace extension repository. LevelSpace allows you to run NetLogo models |: from inside NetLogo models :|
Other
19 stars 8 forks source link

gui and headless kind of suck as names. Let's change them #84

Closed qiemem closed 8 years ago

qiemem commented 8 years ago

Some suggestions:

GUI:

Headless:

qiemem commented 8 years ago

Also, change load-* to create-* for consistency.

arthurhjorth commented 8 years ago

create-* to me is definitely the better solution. We want to think of models as agents, and this would extend how we create models.

One thing we haven't considered is having a 'default' version, and then special casing the other. It would mean that we could have ls:create-model (potentially with ls:crt too) and ls:create-x-model where x is the special model. If that seems like a not entirely crazy idea, we'd have to decide which is the default. My take, I think, would be to make GUI models the default since they are almost as fast as headless, but offer more functionality. In that case, I would probably prefer ls:create-light-model since that very clearly indicates why someone would want to use it.

qiemem commented 8 years ago

That's actually a really good idea. What would we call the models in documentation to differentiate them?

arthurhjorth commented 8 years ago

You sound so surprised :p

If we do this, I think we should simply talk about models and talk about light models as a special case that you really only want/need for very large systems.

Before we decide on this though: I know that speed wise they're practically the same. What's the difference in memory use for each of them? do you know off the top of your head?

arthurhjorth commented 8 years ago

We should put those numbers in the documentation too btw, so people can make informed decisions.

qiemem commented 8 years ago

If we do this, I think we should simply talk about models and talk about light models as a special case that you really only want/need for very large systems.

I disagree with this. When you get above, say, a half dozen models, you should probably think about switching, in part just because you have more models than you can practically keep track of.

Before we decide on this though: I know that speed wise they're practically the same. What's the difference in memory use for each of them? do you know off the top of your head?

So, speedwise, they're only close if the GUI model is hidden (naturally). Memory wise: the bigger problem is actually that there seems to be a fairly hard cap on models that have Swing components, at around 500 (if I remember correctly); though I determined that number when I had stripped almost everything out of GUI models, so it could be less.

Here's the bump and then steady state with 200 (blank) headless models:

image

so on the order of 50MB. Took around 2.5 seconds.

Here it is with GUI:

image

so on the order of 300MB, with all models hidden. Took 67 seconds.

That actually a much bigger difference than I would have guessed.

arthurhjorth commented 8 years ago

That is a lot more than I thought too. So I guess the question is whether it is so much that we want to not make GUI models the default. I still think it can work, as long as people are made aware of these differences, and don't entirely underemphasize light models in the documentation.

What do you think?

qiemem commented 8 years ago

Ya, it might be too much. You can get in trouble really fast if you open too many gui models.

What about just ls:create-full-model and ls:create-headless-model?

Oh, also, should we take in a number of models to create, as with create-turtles? Unfortunately, it seems like it would be good for ls:create-headless-model and not good for ls:create-full-model.

arthurhjorth commented 8 years ago

What about just ls:create-full-model and ls:create-headless-model?

I don't know. Wouldn't we rather document our way out of this and just explain people that gui models are much more demanding, and encourage people to use light models or whatever unless they really need widget access? I really like brevity of ls:create-model. Either way, headless is a weird, CSy term, so let's at least call it light or something.

Oh, also, should we take in a number of models to create, as with create-turtles? Unfortunately, it seems like it would be good for ls:create-headless-model and not good for ls:create-full-model.

Good point. I think that if we go with ls:create- we should stick with the convention that the first argument is the number of the thing you're creating (nw does this too.) I think we should allow people to make too make too many models, similarly to how we allow people to make a billion turtles.

arthurhjorth commented 8 years ago

If we do this, we should pluralize model, by the way. Like we do with turtles, even though it sometimes ends up being a bit ungrammatical, e.g. create-turtles 1.

qiemem commented 8 years ago

oh I totally meant to write light, not headless.

qiemem commented 8 years ago

Currently proposal: