Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify/Allow use of ExternalObjects in records #2399

Open
beutlich opened this issue Jul 30, 2019 · 1 comment
Open

Clarify/Allow use of ExternalObjects in records #2399

beutlich opened this issue Jul 30, 2019 · 1 comment

Comments

@beutlich
Copy link
Member

It would be very convenient if external objects are considered as legal components of records. Currently, this is not yet clarified by the specification.

As an example, the below model runs in Dymola or SimulationX, but fails in Wolfram SystemModeler, for instance.

model M
  import Modelica.Utilities.Files;
  record R "Record with external object"
    import Modelica.Blocks.Types;
    parameter String tableName "Table name";
    parameter String fileName "File name";
    constant Boolean verbose = true "Print message during creation of external table object";
    // Create and assign the external object once
    final parameter Types.ExternalCombiTimeTable table = Types.ExternalCombiTimeTable(tableName, fileName, fill(0, 0, 2), 0, {2}, Types.Smoothness.LinearSegments, Types.Extrapolation.LastTwoPoints, 0, Types.TimeEvents.Always, verbose) "External table object";
  end R;
  parameter R r = R("tab0", Files.loadResource("modelica://Modelica/Resources/Data/Tables/test.txt"));
  annotation(uses(Modelica(version="3.2.3")));
end M;

This goes along wih #1669 to make libraries like ExternData or Modelica_DeviceDrivers Modelica-compliant. The topic was already presented to the MAP-Lang in the article Towards a Standard-Conform, Platform-Generic and Feature-Rich Modelica Device Drivers Library, section 3.3.

@beutlich beutlich added this to the ModelicaSpec3.5 milestone Jul 30, 2019
@HansOlsson
Copy link
Collaborator

This should be considered together with #2757

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants