-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
Hi Luan,
The network changes you made in the converter have introduced some bugs, and additionally, a few of the latest changes in Hyst now cause some errors in some of the models that previously worked.
I have commented out the failing cases in the script file, and put all the failing cases up front:
https://github.com/ttj/hyst/blob/master/src/matlab/paper_script_ifm2016ha2slsf.m
The two main ones to look at are the cruise control, five dim switch, (which are both non-networked and fails now) and the buck_hysteresis_dcm, which is also not networked but is failing. There are a few other failing models now, but partly due to new features (e.g., time triggered transition support specified in the continization examples, etc.). The errors are:
Undefined function 'children' for input arguments of type 'com.verivital.hyst.ir.base.BaseComponent'.
Error in translateAutomaton (line 15)
componentsMap = config.root.template.children;
Error in SpaceExToStateflow (line 139)
translateAutomaton(m, config, options);
Error in paper_script_ifm2016ha2slsf (line 121)
[out_slsf_model, out_slsf_model_path, out_config] = SpaceExToStateflow(xml_file, cfg_file, '-s');```
A couple had failed due to some expression changes, don't worry about these (the comments indicate for each one how it failed).
Additionally, I had modified a bit the network call as far as I gather what it's doing to handle base vs. network components differently, not sure that was the right way to go (it resolves the runtime crash, but some of the models appear to not be translated correctly with this change):
https://github.com/ttj/hyst/blob/master/src/matlab/translateAutomaton.m#L25
This allowed the models to not cause a runtime error, but seems to have broken the translation results for some models. If you comment out the ifs for whether base/network, you'll see all the models that crash.
Could you please look into this and resolve? I debugged some yesterday, but don't have much time today to fix this.
Note that all the changes mentioned are on my fork, but this should be up-to-date with the latest merges made by Stan this morning.