Closed jrising closed 2 months ago
Hi @jrising interesting, yes the Explorer is hard coded to write out the value if it recognizes it as a scalar, so it must be doing so for the Model
type. I can go look into telling it to display nothing if it sees the type is a Model
. I'm starting that in #1000 and can test out if it works, feel free to do the same!
@jrising my solution here is to limit the types that are displayed in the menu to the following. I think this is a better way to organize that making Model
the exception, since it will cover other unconventional types that might give us the same issues.
Note values are only displayed in the menu when there are no indexed dimensions for a Parameter or Variable, really meant to handle things like a text label or a number.
Symbol
String
Array
(Admittedly, this could cause issues if the Array is huge, but it is rare that an Array uses only anonymous (non-indexed) dimensions and current behavior allows Arrays so I'll leave as is for now to make minimal changes but we can always limit this further).Number
(The description here might sound esoteric, but I think it's going to be a common code structure until some other Mimi changes come along.)
I do understand this need! Happy to talk sometime about what we could do to give more access to what you need.
Thank you! This is great and will make it much easier for me to debug my model.
Let me know if I can improve it further for ya!
(The description here might sound esoteric, but I think it's going to be a common code structure until some other Mimi changes come along.)
I regularly find that that I need to include the model itself in a component's parameters, so that I can get access to information about the model during run-time. I do this by adding a parameter
model = Parameter{Model}()
and setting it when I create the component.This works fine, but when I
explore
the model, I see screens like this:As you can see, the "Variables" list looks empty. It's not empty, it's just that the variables list has gotten no real estate on screen. What's happening here is that the model parameter is written out in a long form over many lines, so any component that includes a model parameter has this problem.