• Re: Error while creating Instances

    Hi,
    it means that the Components vector is not known to your new Instance.
    This can be due to a couple of reasons: you may have forgotten to #include the definitions.msl file for the new Instance; or used a 'Namespace' for your Instance (in fact: for the Conversion Model that is referenced to by the new Instance) which results in a string being prepended to Components (hence, <Namespace>Components); or forgotten to use an #ifdef statement for the new Instance where it's expected; ...
  • Re: Create new block with top level parameters (WEST16)

    Hi Giacomo,
    not sure what you mean by "every single cell": but you should be able to just tic the specific parameter's check box in the top-level parameter's [b]Links[/b] drop-down, for the newly added block.
  • Re: Cardinality of From and To does not match: 24, 26: Link583660

    Hi Giacomo,
    [quote author=giacomo.bellandi link=topic=20591.msg26587#msg26587 date=1501074226]
    .. from ASM2dChemTemp to ASMG2d ..
    .. the connection with the block downstream from the influent (is a sensor measuring the flow rate) disappeared ..
    [/quote]

    It seems as if the model associated with the sensor in ASM2dChemTemp is not defined for or is incompatible with ASMG2d.
    Did you regenerate the Influent Model? This is necessary to create an output vector that is compatible with the new Instance (i.e. has the correct cardinality).

    If the problem persists, then there may be an issue with the model code for the sensor.
    Using the Model Editor, you should make sure that the In- (and Out) terminal uses the right Component vector.

  • Re: Cardinality of From and To does not match: 24, 26: Link583660

    Hi Giacomo,
    the problem seems to be that you are attempting to link a vector with 24 elements (from the Influent block) to one with 26.
    You probably need to check that the data type of the "in" terminal of the block downstream to the Influent uses the correct state vector, i.e. the Components vector of the selected Instance.
  • Re: Tracer tutorial YT video

    [quote author=rarnaunot link=topic=20581.msg26573#msg26573 date=1500556940]
    I found some differences from the West videos's version to version 2017 like the absense of auto code generation or the absence of some buttons in the view (Check Instances for example).
    [/quote]
    Both Code Generation and Check Instance are available in 2017, just like in 2016: a blue downward arrow and a green check symbol respectively.

    No, you should not open the Palette in the Block Editor: you simply need to copy the PaletteLib property (a string) from the ASM1Temp Instance to your new Instance - in the Model Editor / Properties pane.

    In any case, both the Palette and Icon Libs are stored in the WEST data/blocks/WESTforOPTIMIZATION/Icons folder.
  • Re: Tracer tutorial YT video

    Hi,

    [quote author=rarnaunot link=topic=20581.msg26568#msg26568 date=1500383699]
    I have found some differences in 17 version
    [/quote]
    what do you mean?

    [quote author=rarnaunot link=topic=20581.msg26568#msg26568 date=1500383699]
    Logging window error: Cannot open Palette Library: C:\Users\Public\Documents\DHI\WEST\data\blocks\MSL\WEST.IUWS.PaletteLib.xml
    [/quote]
    That is some kind of 'signpost' that WEST uses for the PaletteLib property a newly created Instance.
    A WEST.IUWS.PaletteLib.xml palette does not exist though and you are supposed to replace it with the appropriate palette: you could use the ASM1 palette, since you derived your new Instance from ASM1.

    [quote author=rarnaunot link=topic=20581.msg26568#msg26568 date=1500383699]
    One of the main differences between my procedure and video procedure was that I had to add the code of my new model (ASM1TempTracer) to the wwtp.base.mdl (see attached picture) because no code was generated automatically as explain in the video (tracer video or Add component video tutorial). Is this code ok?
    [/quote]
    You're right: that part is not (cannot be) automatically generated.
    Yes, your code looks correct
  • Re: Oxygen transfer rate

    You should be able to see the underlying expressions in the Models Guide (F1 from WEST).
  • Re: Oxygen transfer rate

    I would use a [b]Calculator Variable[/b]. Or, better, in 2017, a top-level state variable.
    Have you tried?
  • Re: Calculating an integral in calculator variables

    Hi Youri,
    yes, I immediately thought of calculator block, sorry.

    No, I don't think it's possible through a [b]calculator variable[/b].
    It is certainly possible though using the new (in 2017) [b]Top-level Quantities[/b] where you can write the usual MSL code - including what you have just suggested.
  • Re: Calculating an integral in calculator variables

    Yes of course but it requires some coding: there's no out-of-the-box model in the current library.
    I have recently written one: I will send it to you via email. If it should not be exactly what you need, you could at least use it as a base for your own development.
    It would be great, if we could eventually come to a sufficiently generic version that can then be incorporated in the standard library.