• Re: CoupledModelType: coupling of vector parameters

    Hi Enrico

    Thanks for the idea of coupling elements of a vector. Unfortunately it seems that it does not work. The following two tests resulted in a parse error at the specific line:

    Try 1:
    sub_models.DWF.parameters.Mean_S[1].value := parameters.Mean_S[1].value
    Try2:
    sub_models.DWF.parameters.Mean_S[XTSS].value := parameters.Mean_S[XTSS].value

    But there is a solution to it, that seems to work, even tough it is not a "nice" one. You create an additional parameter (here: Conc_TSS) in the sub-model and use it to feed the one vector element that you want to change in the initial condition of that sub-model. The new simple parameter can then be coupled with your main model.

      parameters <-
      {
        OBJ Mean_S "Vector containing the mean concentration in (mg/l=g/m3) for DWF" : Kosim1ConcentrationVector :=
        [{:value <-1000000 :}, {:value <- 30 :}, {:value <- 10 :}, {:value <- 100 :}, {:value <- 200 :}, {:value <-150 :};];
        OBJ Conc_TSS (* hidden = "0" *) "TSS concentrations of DWF" : Concentration  := {: group <- "General" :};

      initial <-
      {
        parameters.Mean_S[XTSS] = parameters.Conc_TSS;

    This seems to be a work-around solution. If you figure out a more elegant way to do it - let me know, I'd certainly be interested.

    Thanks again,
    Julia
  • Re: CoupledModelType: coupling of vector parameters

    Hi Enrico,

    Thank you very much for this idea - I will certainly try it and keep you up to date!

    Julia

  • CoupledModelType: coupling of vector parameters

    Dear forum users

    I am working on a coupled model. Currently I am trying to add a parameter to the coupled model, that already exist as a vector in one of the sub-models. So far, I have only been coupling parameters of the "real" or "integer" and I am wondering, whether it is also possible to couple vectors (e.g. Kosim1ConcentrationVector).

    I added the following part:

    parameters:
    OBJ Mean_S (* hidden = "0" *) "Vector containing the mean concentration in (mg/l=g/m3) for DWF by PE only" : Kosim1ConcentrationVector := [{:value <-1000000 :}, {:value <- 30 :}, {:value <- 10 :}, {:value <- 100 :}, {:value <- 200 :}, {:value <-150 :};];

    coupling:
    sub_models.DWF.parameters.Mean_S.value := parameters.Mean_S.value,

    But the model won't run. I get the following error:
    Error E2451 _v170807_bordquant_sample_.c 55985: Undefined symbol 'AB1_parameters_DWF_parameters_Mean_S' in function ComputeInitial

    Does anyone have an idea what could be the problem?

    Thank you very much,
    Julia