Posted Sat, 17 Dec 2016 00:26:04 GMT by Sovanna Tik
Hi!

We are trying to extend the existing sewer models to be compatible with a new catagory (called PSVDM).
We basically copied the file “sewer.base.msl” into a "psvdm.sewer.base.msl" file and we changed adequately all the class names (adding the prefix psvdm) and parameters.
Even though we follow exactly the same structure, we encounter a problem with the CLASS “BaseUnit_SewerVolumeConversionModel” (see attachments)
At that point, the "check instance" gives the error attached.

We verified that there was no duplicate names in our manually added files and the file "PSVDM/PSVDM.VolumePSVDMConversionModel.body.msl" has been automatically generated when creating the new category.

Is there any other check we can perform?

Thank you for your help.
Posted Mon, 19 Dec 2016 22:16:05 GMT by Enrico Remigi WEST Product Owner
Hi Sovanna,
actually the error message is very clear in stating that [b]duplicate names are not allowed[/b].
This may be slightly cryptic but it basically means that you either have declared the [b]same quantity twice[/b] (in two different classes that now, in your new hierarchy are dependent, i.e. one inherits from the other one); or you have used the [b]same name for two different objects[/b] (interface variable, parameter or state variable).
If this should not ring a bell (you may have an idea of which quantity may be involved?) then the only was is to patiently debug your library, by including one class at a time, commenting out chunks of code, etc.

I am not entirely sure what you are trying to achieve though ... you say "a new Category, called PSVDM" but: is that truly a Conversion Model (a secondary CategoryRef in the scope on an existing Instance), or rather a new Instance? Why are you duplicating the "sewer.base.msl" file - is this really necessary?
Posted Mon, 19 Dec 2016 23:45:20 GMT by Sovanna Tik
Hi Enrico!

Thank you for your answer!
Actually, I did exactly what you recommend (including one class at the time), and the error appeared when the class  "psvdmBaseUnit_SewerVolumeConversionModel” is added. As you can see on the attached file called "class_pb.jpg" from the first post, this class only extends another one (for which the check instance does not reveal any problem) with
#include "PSVDM/PSVDM.VolumePSVDMConversionModel.body.msl", the latter file being automatically generated by the Model Editor.
That's why I don't know where to look for any quantity which could have been duplicated (I checked that all class names are unique)...

Yes, what we called PSVDM is a secondary CategoryRef in the scope of an existing instance (see attached picture). It has been created on the same structure as the Kosim1 category. It has additional particulate components (TSS0, TSS1... TSS10) each associated with its settling velocity.
I duplicated the "sewer.base.msl" file because we wanted to use some of the default sewer tank model and include in them the new TSS components...
Is there a more appropriate way to do this?

Thanks!
Posted Tue, 20 Dec 2016 08:16:19 GMT by Enrico Remigi WEST Product Owner
Hi Sovanna,
the other thing I can recommend you double-check is that you used the [b]Namespace[/b] property for your new category, both for the Category itself (i.e. for the Components vector) and for Conversion Model.

If this is should not fix the problem, then please send your library through to mike - I will take a look.
Posted Tue, 20 Dec 2016 16:48:31 GMT by Sovanna Tik
Hi Enrico,

I just checked the namespace at both places which were correctly filled...
I am sending you the model base through mike support.

Thank you!
Posted Wed, 21 Dec 2016 13:42:59 GMT by Enrico Remigi WEST Product Owner
Hi Sovanna,
I have just replied to your email: the [b]same identifier "C" is used[/b] both for the concentration vector (in a base class) and for a Real data type in the scope of your new Conversion Model - which derives from that base class.
Posted Thu, 22 Dec 2016 17:49:14 GMT by Sovanna Tik
Thanks Enrico!
That was indeed the problem. Sorry I couldn't find this silly mistake by myself...

Thank you for your time!

You must be signed in to post in this forum.