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

Internal error in plug-in 'Initializer' at initialize #385

Open
gitting-around opened this issue May 11, 2022 · 1 comment
Open

Internal error in plug-in 'Initializer' at initialize #385

gitting-around opened this issue May 11, 2022 · 1 comment
Assignees

Comments

@gitting-around
Copy link

When trying to generate a spec for 2 fmus connected to each other, 2 outputs go from fmu1 to fmu2, and two outputs go from fmu2 to fmu1, it gives the following error:

23:39:04.047 [main] ERROR org.intocps.maestro.MablSpecificationGenerator - Internal error in plug-in 'Initializer' at   initialize. Message: Internal error: 
Error 0999: Internal error in plug-in 'Initializer' at initialize. Message: Internal error:  'initialize' at 89:23
Error 0997: Unfold failure in plugin Initializer for initialize null
java.lang.RuntimeException: Expansion not possible type errors: Error 0999: Internal error in plug-in 'Initializer' at initialize.         Message: Internal error:  'initialize' at 89:23
Error 0997: Unfold failure in plugin Initializer for initialize null

at org.intocps.maestro.MablSpecificationGenerator.expandExternals(MablSpecificationGenerator.java:140)
at org.intocps.maestro.MablSpecificationGenerator.expandExternals(MablSpecificationGenerator.java:221)
at org.intocps.maestro.MablSpecificationGenerator.expandExternals(MablSpecificationGenerator.java:114)
at org.intocps.maestro.MablSpecificationGenerator.generateFromDocuments(MablSpecificationGenerator.java:401)
at org.intocps.maestro.Mabl.expand(Mabl.java:279)
at org.intocps.maestro.cli.MablCliUtil.expand(MablCliUtil.java:82)
at org.intocps.maestro.cli.ImportCmd.call(ImportCmd.java:167)
at org.intocps.maestro.cli.ImportCmd.call(ImportCmd.java:24)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at org.intocps.maestro.Main.main(Main.java:19)

The multimodel file looks like:

{
  "fmus": {
    "{pressurepipe}": "./pressure_pipe.fmu",
    "{rabbitmq}": "./rabbitmq.fmu"
  },
  "connections": {
    "{pressurepipe}.pressurepipeInstance.h2s": [
      "{rabbitmq}.rabbitmqInstance.h2s"
    ],
    "{pressurepipe}.pressurepipeInstance.h2s_timestamp": [
      "{rabbitmq}.rabbitmqInstance.h2s_timestamp"
    ],
    "{rabbitmq}.rabbitmqInstance.flow": [
      "{pressurepipe}.pressurepipeInstance.flow"
    ],
    "{rabbitmq}.rabbitmqInstance.flow_timestamp": [
      "{pressurepipe}.pressurepipeInstance.flow_timestamp"
    ]
  },
  "parameters": {
    "{rabbitmq}.rabbitmqInstance.config.hostname": "localhost",
    "{rabbitmq}.rabbitmqInstance.config.port": 5672,
    "{rabbitmq}.rabbitmqInstance.config.username": "guest",
    "{rabbitmq}.rabbitmqInstance.config.password": "guest",
    "{rabbitmq}.rabbitmqInstance.config.routingkey": "to_cosim",
    "{rabbitmq}.rabbitmqInstance.config.communicationtimeout": 60,
    "{rabbitmq}.rabbitmqInstance.config.precision": 10,
    "{rabbitmq}.rabbitmqInstance.config.maxage": 1000,
    "{rabbitmq}.rabbitmqInstance.config.lookahead": 1,
    "{rabbitmq}.rabbitmqInstance.config.exchangename": "dt",
    "{rabbitmq}.rabbitmqInstance.config.exchangetype": "direct",
    "{rabbitmq}.rabbitmqInstance.config.healthdata.exchangename": "fmi_digital_twin_sh",
    "{rabbitmq}.rabbitmqInstance.config.healthdata.exchangetype": "direct",
    "{rabbitmq}.rabbitmqInstance.config.healthdata.routingkey.from_cosim": "from_cosim"
  }
}

The coe json looks like:

{
  "startTime": 0,
  "endTime": 10,
  "multimodel_path": "test.json",
  "liveGraphColumns": "1",
  "liveGraphVisibleRowCount": "1",
  "graphs": [
    {
      "title": "Graph",
      "livestream": {
        "{pressurepipe}.pressurepipeInstance": ["h2s", "h2s_timestamp"],
        "{rabbitmq}.rabbitmqInstance": ["flow", "flow_timestamp"]
      },
      "externalWindow": false
    }
  ],
  "livestreamInterval": 0,
  "logVariables": {},
  "visible": false,
  "loggingOn": true,
  "overrideLogLevel": null,
  "enableAllLogCategoriesPerInstance": false,
  "algorithm": { "type": "fixed-step", "size": 0.01 },
  "postProcessingScript": "",
  "multimodel_crc": "c152a564daa9766d3a1b96d9eb7b3d5b",
  "parallelSimulation": false,
  "stabalizationEnabled": false,
  "global_absolute_tolerance": 0,
  "global_relative_tolerance": 0.01,
  "simulationProgramDelay": false,
  "convergenceAttempts": 5
}

The command used to generate the spec:

java -jar maestro.jar import -v Sg1 test.json coe.json -output .

The two fmus are:
rabbitmq.zip
pressure_pipe.zip

Removing the two of the connections from one fmu to the other fixes the issue.

@lausdahl
Copy link
Contributor

I cannot reproduce this in release version 3.0.0. It generates a spec and can also run it until it hits a point where some python packages are missing (google).

Commands:

java -jar maestro-3.0.0-jar-with-dependencies.jar import -v Sg1 m.json c.json -output . --fmu-search-path . --interpret

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