Please take a look at the attached Activate mode, SpringMass_1.scm, in which the MoCustomComponent block has the same Modelica code as original Spring component, except removing all annotations. It issued the error below:
Error: Error, (in MapleSim:-Modelica:-Flatten) cannot resolve `Translational.Interfaces.PartialCompliant` in model `vss_SpringMass_1_im.vss_SpringMass_1_container.vss_SpringMass_1.__MoCustomComponent__.Spring_1`; there is no `Translational` visible
( 99 )
Model: SpringMass_1
I replaced the following code in the model, SpringMass_1.scm:
extends Translational.Interfaces.PartialCompliant;
by
extends Modelica.Mechanics.Translational.Interfaces.PartialCompliant;
and the error gone, but another error came as follows:
Error: Error, (in MapleSim:-Modelica:-Flatten) cannot resolve type `SI.TranslationalSpringConstant` of parameter `vss_SpringMass_2_im.vss_SpringMass_2_container.vss_SpringMass_2.__MoCustomComponent__.Spring_1.c` in model `vss_SpringMass_2_im.vss_SpringMass_2_container.vss_SpringMass_2.__MoCustomComponent__.Spring_1`; there is no `SI` visible
( 99 )
Model: SpringMass_2
Then, I added the following import statement:
import SI = Modelica.SIunits;
and the simulation went without any error messages.
Please let me know why the Modelica code in the first model doesn't work.
Regards,
Minoru Yubuchi