Skip to content

Compiler issues: Periods/Period #64

Description

@folmate

@lenaRB
Issue is on PELAB main.

There is a command to generate all .mo files and export the CRMLtoModelica library.

make exp

Generated files are under: submodules/experiments/build/experiments and a test report under build (just the CRML to Modelica compilation).

Relevant folders are sri (or sri2), traffic, and pumps.

Related test code:

  • Tests: submodules/experiments/src/test/java/crml/experiments/*.java
  • Models: submodules/experiments/src/main/resources/models/*/*.crml
  • CRML to Modelica is loaded from submodules/test-resources/src/main/resources/modelica_libraries/CRMLtoModelica.mo

Notes: the library import is sometimes broken and imports libs two times therefore modelica will have some duplicate models. Temp fix is to just delete everything (except the first two lines) before the first end 'or'.

I will look into the minor stuff, but I want to get this out for the Periods even if there are a few other bugs.

List of errors:

SRI (and traffic lights)

This is the main issue.

I have errors like:

[4] 09:50:42 Translation Error
[ics_reqs: 99:1-99:34]: [Type mismatch in binding P = 'ensure49'.'check anytime48'.'checkover46'.P, expected subtype of CRMLtoModelica.Types.CRMLPeriod, got type CRMLtoModelica.Types.CRMLPeriods.](omeditmessagesbrowser:///ics_reqs?lineNumber=99)

Pumps

With this, it is fine if I just get back a few comments on how the generated code should look. (Or a few links on how sets work.)

model System
Pump{} [:]  pumps; // <---- This is a minor issue in generation
CRMLtoModelica.Types.Boolean4 inOperation;
end System; 
System system(pumps = {(ident = "PO1"), (ident = "PO2"), (ident = "PO3")}); // <----- Types are missing which is probably on me, and I also need a bit of help on what is the expected output in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions