I have a diagnosis for you…
The first problem is that you need to load the model by it’s full name which is, ‘SGBIM_BAWSCA_DEMO.sip’, including the extension. I noticed you were using Interface Builder. The model name is entered in the simulation in the file “index.html”. You can change this by editing the file directly.
- Click the Interface tab
- Click index.html
- Click Edit
- Look for the attribute “data-f-model” in the “body” tag and make sure it has the correct model name.
However, even if the model name is corrected, your model is still not going to load. There are some different rules for the Powersim Engine, as opposed to the Powersim Studio. In order to have access to a variable’s history of values over time, something we’re definitely interested in, we need to tell the engine to load each of those variables before we do anything else. This tells the engine to track the history from then on. Something I don’t think the desktop-based studio needs to do internally, but I know the engine does. There are 2 ways we could handle this. The first is to make you list each variable you’ll want access to in a separate configuration file, what we call a model ‘context’ file, which would have the name SGBIM_BAWSCA_DEMO.ctx. Then we could know which specific variables to pre-load in the engine. We do not currently do this. Instead, we ask the engine for the name of every variable in your model and pre-load all of them for you so you have access to everything. This is easier for most people and acceptable because the model sizes are not huge and the number of variables has been in the hundreds at most. Your model has 900,000 objects to load, and by the time the engine can manage this it’s taken so long that the front end has decided something has gone wrong that could not be reported and times out the operation. That’s usually the right thing to do since most people are not going to wait longer then the timeout period in any case. You can, again via the model context file, provide for a longer timeout for models which you know are going to take a while to load. Your model takes several minutes, and may fall within the longest time we allow, but doing that may not provide the client experience you’re looking for.
What’s probably best is to allow a ‘switch’ that tells our system to either load all variables (the default), or load only the variables listed, which would allow you to control that behavior and have the system pre-load only those variables you’re going to display in your web application (via model context file again). Hopefully that number would be small enough to allow for quick loading of your model. If the number was in the hundreds your model should load in seconds. However, to provide for this capability does mean a bit of work on our side. We’ll need to create that capability, test it, put it through QA, schedule it for release, and push it live. I’m willing to do that work if you think this is a solution for you, but it’s probably going to take a couple of weeks to get this out on our systems where you can use it.