Modelica function, remove input via conversion script

32 views Asked by At

I have a function with two inputs, the second one has a default value

function myfun
  input Real ione;
  input Real itwo=2.0;
  output Real othree;
algorithm
  othree := ione * 3;
end myfun;

The function is then used / called in models, sometime the optional input is given, sometimes not.

model myModel
  Real a = myfun(1);
  Real b = myfun(1,2);
  Real c = myfun(ione=1.3);
end myModel;

But as the second input is not helpful, I would like to remove it, from the function and all places where the function is called, using a conversion script. Is that possible, or do I have to keep the input forever?

0

There are 0 answers