Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

ModelicaML code-sync bugs?

ModelicaML code-sync bugs?

After the Modelica code is synchronized using ModelicaML, every variables will have a blank entry in Array Subscript property tag. Whenever I want to make copy of the model and regenerated the code. Extra brackets will be generated which causes syntax error. For example for this model http://www.ida.liu.se/~pelab/modelica/O … aML/temp/. The following type of code will be generated.

//This code is generated from a ModelicaML model.

within ModelicaMLModel.Structure;

class SamplingClock 

    parameter Modelica.SIunits.Time first[]= 0;
    parameter Modelica.SIunits.Time interval[]= 1;
    Boolean clock[];
    Real x[](start = 1);
    equation
        clock = sample(first, interval);
        when clock then
          x = -pre(x);

        end when;
   
end SamplingClock;

The extra brackets will be removed if I delete that blank arraySize entry.


Thanks,
Yuchen

Edited by: yzh89 - Mar-28-12 18:05:53

Re: ModelicaML code-sync bugs?

Hi,

thanks for pointing out...
Please update ModelicaML and synchronized your model again.

Wladimir

There are 0 guests and 0 other users also viewing this topic