This repository has been archived by the owner. It is now read-only.

Exception with VDM FMU frequency between 21e8 and 215e7 #158

Closed
richardpayne opened this Issue Sep 9, 2016 · 15 comments

Comments

Projects
None yet
4 participants
@richardpayne
Contributor

richardpayne commented Sep 9, 2016

Experimenting with different thread frequencies has resulted in getting an exception when the frequency is somewhere between 21e8 and 215e7. When the stepwise is too high, I get the following exception in the COE:

screenshot 2016-09-09 15 24 00

@ldcouto

This comment has been minimized.

Show comment
Hide comment
@ldcouto

ldcouto Sep 21, 2016

Contributor

I'm sorry Richard, but can you elaborate on what you mean by "experimenting with different thread frequencies" ?

Contributor

ldcouto commented Sep 21, 2016

I'm sorry Richard, but can you elaborate on what you mean by "experimenting with different thread frequencies" ?

@ldcouto ldcouto modified the milestone: MS6 Sep 21, 2016

@richardpayne

This comment has been minimized.

Show comment
Hide comment
@richardpayne

richardpayne Sep 22, 2016

Contributor

In the VDM controller model, we have a thread:

thread
    -- execute the control loop
    periodic((getFrequency())/*ms*/,0,0,0)(PIDcalculate);

We vary the frequency as a design parameter in the App (this is with the FCU model in GitHub). There appears to be an issue with the frequency somewhere between these values: 21e8 and 215e7.

Contributor

richardpayne commented Sep 22, 2016

In the VDM controller model, we have a thread:

thread
    -- execute the control loop
    periodic((getFrequency())/*ms*/,0,0,0)(PIDcalculate);

We vary the frequency as a design parameter in the App (this is with the FCU model in GitHub). There appears to be an issue with the frequency somewhere between these values: 21e8 and 215e7.

@ldcouto ldcouto modified the milestones: MS6, MS7 Oct 10, 2016

@lausdahl

This comment has been minimized.

Show comment
Hide comment
@lausdahl

lausdahl Oct 24, 2016

Contributor

please include a full trace log for this. I would like to see the log4j.properties inside the VDM fmu changed to TRACE and past the section where it start failing as text.

Also based on the part of the output I can see from above this is not an APP or COE bug but a https://github.com/overturetool/overture-fmu bug so better report it there.

Contributor

lausdahl commented Oct 24, 2016

please include a full trace log for this. I would like to see the log4j.properties inside the VDM fmu changed to TRACE and past the section where it start failing as text.

Also based on the part of the output I can see from above this is not an APP or COE bug but a https://github.com/overturetool/overture-fmu bug so better report it there.

@lausdahl lausdahl added the bug label Oct 24, 2016

@richardpayne

This comment has been minimized.

Show comment
Hide comment
@richardpayne

richardpayne Oct 25, 2016

Contributor

Can you give me more details on how to do this?

Contributor

richardpayne commented Oct 25, 2016

Can you give me more details on how to do this?

@ldcouto

This comment has been minimized.

Show comment
Hide comment
@ldcouto

ldcouto Oct 25, 2016

Contributor

Open the FMU zip.
Open the fmi-interpreter... jar with an archive editor (7zip, etc.).
Edit the log4j.properties file. In the first line (log4j.rootLogger=ERROR, stdout, R) replace ERROR with TRACE.
Save the file and jar and zip.

You can do the same thing to increase the log detail of the coe jar.

Contributor

ldcouto commented Oct 25, 2016

Open the FMU zip.
Open the fmi-interpreter... jar with an archive editor (7zip, etc.).
Edit the log4j.properties file. In the first line (log4j.rootLogger=ERROR, stdout, R) replace ERROR with TRACE.
Save the file and jar and zip.

You can do the same thing to increase the log detail of the coe jar.

@lausdahl

This comment has been minimized.

Show comment
Hide comment
@lausdahl

lausdahl Oct 31, 2016

Contributor

If you run with the new RC then you should be able to increase the global COE log level from the co-sim config.

Btw: the image seems to say something about BasicInitializer and setRaw is there any special initial values. Either the crash is random or is must be related to the initial values specified for the ports and not the frequency.

What version is the FMU generated with and what version is the COE?

Contributor

lausdahl commented Oct 31, 2016

If you run with the new RC then you should be able to increase the global COE log level from the co-sim config.

Btw: the image seems to say something about BasicInitializer and setRaw is there any special initial values. Either the crash is random or is must be related to the initial values specified for the ports and not the frequency.

What version is the FMU generated with and what version is the COE?

@ldcouto ldcouto modified the milestones: MS7, MS8 Nov 14, 2016

@ldcouto ldcouto modified the milestones: MS8 , M25 Dec 13, 2016

@ldcouto

This comment has been minimized.

Show comment
Hide comment
@ldcouto

ldcouto Jan 6, 2017

Contributor

Hi @richardpayne

I've been playing around with the FCU model. I can't reproduce this. I've tried a few values between the ranges you mentioned but they all work. I'm happy to try a DSE, if you can quickly tell me how to run it manually.

With regards to the exception, in our own case study, certain controller frequencies would drive the plant FMU to inconsistent states which would crash the FMU and, subsequently, the Co-simulation. Could be something similar at play here. Once we find the specific frequency that crashes it, it will help.

Contributor

ldcouto commented Jan 6, 2017

Hi @richardpayne

I've been playing around with the FCU model. I can't reproduce this. I've tried a few values between the ranges you mentioned but they all work. I'm happy to try a DSE, if you can quickly tell me how to run it manually.

With regards to the exception, in our own case study, certain controller frequencies would drive the plant FMU to inconsistent states which would crash the FMU and, subsequently, the Co-simulation. Could be something similar at play here. Once we find the specific frequency that crashes it, it will help.

@richardpayne

This comment has been minimized.

Show comment
Hide comment
@richardpayne

richardpayne Jan 9, 2017

Contributor

I can still replicate this - specifically with the controllerFrequency set to 215e7. Used the most recent COE (0.1.10)

Contributor

richardpayne commented Jan 9, 2017

I can still replicate this - specifically with the controllerFrequency set to 215e7. Used the most recent COE (0.1.10)

@ldcouto

This comment has been minimized.

Show comment
Hide comment
@ldcouto

ldcouto Jan 9, 2017

Contributor

Yep. That one crashes it. Richard, do you know which version of the exporter was used to generate the FMU in the example?

I've also added the log below.

Version: 0.1.10
Now running on port 8082
 INFO [NanoHttpd Request Processor (#1)] (RequestProcessors.java:160) - Using Fixed-step size calculator with size = 1.0
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:44) - loading fmus
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:261) - Outputs from: {controllerFMU}.controller = Set(valveOpen, fanSpeed)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:261) - Outputs from: {roomheatingFMU}.room = Set(RAT)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:261) - Outputs from: {environmentFMU}.env = Set(RAT_OUT, OAT_OUT)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:267) - Inputs for: {controllerFMU}.controller
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {environmentFMU}.env.RAT_OUT --> RATSP
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {roomheatingFMU}.room.RAT --> RAT
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:267) - Inputs for: {roomheatingFMU}.room
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {environmentFMU}.env.OAT_OUT --> OAT
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {controllerFMU}.controller.valveOpen --> valveopen
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {controllerFMU}.controller.fanSpeed --> fanspeed
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:384) - Instantiating FMU. ModelName: 'FCUController_Limited', GUID: '{633ac75e-4ddd-4428-b66f-fc2de49f7a4f}', Vendor tool: 'Overture', Generated by: 'Overture Tool FMI Exporter', at: 2016-09-09T11:38:22 Execution tool required: true
 WARN [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:388) - Make sure the execution tool: 'Overture' is available during this simulation.
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: Called instantiate with instance controller and guid {633ac75e-4ddd-4428-b66f-fc2de49f7a4f}
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: Launching Tool Wrapper memory key: '{633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller'  and resource location C:/Users/CoutoLD/AppData/Local/Temp/FCUController_Limited5567139821222994814/resources/
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: Launching with shared memory key: '{633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller'
Starting IPC server with key: Local\{633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: FMU Server client create, hosting SHM with raw key: {633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller
Launching process: 'java' with arguments: 'java -cp * org.crescendo.fmi.ShmServer -p {633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller' in folder 'C:/Users/CoutoLD/AppData/Local/Temp/FCUController_Limited5567139821222994814/resources/'
Process launched continuing main thread.
Starting Crescendo ShmServer with key: '{633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller'
DEBUG [main] (SharedMemory.java:27) - Loading library: lib/Windows-amd64/sharedmemory.dll
DEBUG [main] (NativeLibraryLoader.java:38) - Extracting library from: lib/Windows-amd64/sharedmemory.dll
DEBUG [main] (NativeLibraryLoader.java:40) - Extracted library: C:\Users\CoutoLD\AppData\Local\Temp\jnifmuapi5009067949864102244\fmi-shm-Windows-amd64\sharedmemory.dll
DEBUG [main] (SharedMemory.java:32) - Loaded Library file: C:\Users\CoutoLD\AppData\Local\Temp\jnifmuapi5009067949864102244\fmi-shm-Windows-amd64\sharedmemory.dll
Starting shared memory with key: {633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller
{633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller
Instantiating {633ac75e-4ddd-4428-b66f-fc2de49f7a4f}.controller with loggingOn = true, resource location='file:/C:/Users/CoutoLD/AppData/Local/Temp/FCUController_Limited5567139821222994814/resources/'
Source root: C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited5567139821222994814\resources\model
Parsed 16 classes in 0.172 secs.
No syntax errors


Warning 5017: Pure operation call may not be referentially transparent in 'Controller' (C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited5567139821222994814\resources\model\Controller.vdmrt) at line 80:23

Warning 5017: Pure operation call may not be referentially transparent in 'Controller' (C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited5567139821222994814\resources\model\Controller.vdmrt) at line 85:12

Type checked 18 classes in 0.109 secs.
No type errors
 and 2 warnings

 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:384) - Instantiating FMU. ModelName: 'RoomHeating', GUID: '{c2d275e0-33c1-48ef-88e0-66c4daa921d0}', Vendor tool: '', Generated by: '20-sim', at:  Execution tool required: false
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:384) - Instantiating FMU. ModelName: 'Environment', GUID: '{69387efb-46a9-47b0-86dd-cd23e13586f9}', Vendor tool: '', Generated by: '20-sim', at:  Execution tool required: false
ERROR [NanoHttpd Request Processor (#1)] (RequestProcessors.java:324) - Error in simulation
java.lang.ArrayStoreException
        at java.lang.System.arraycopy(Native Method)
        at java.util.Arrays.copyOf(Unknown Source)
        at java.util.ArrayList.toArray(Unknown Source)
        at org.intocps.orchestration.coe.util.Util.setRaw(Util.java:103)
        at org.intocps.orchestration.coe.util.Util.setRaw(Util.java:85)
        at org.intocps.orchestration.coe.BasicInitializer$FmiStateCache.synchroniseInstances(BasicInitializer.java:88)
        at org.intocps.orchestration.coe.BasicInitializer.initialize(BasicInitializer.java:169)
        at org.intocps.orchestration.coe.scala.CoeSimulator$.simulate(CoeSimulator.scala:62)
        at org.intocps.orchestration.coe.scala.Coe.simulate(Coe.scala:79)
        at org.intocps.orchestration.coe.httpserver.RequestProcessors.processSimulate(RequestProcessors.java:320)
        at org.intocps.orchestration.coe.httpserver.RequestHandler.simulate(RequestHandler.java:282)
        at org.intocps.orchestration.coe.httpserver.RequestHandler.handleRequest(RequestHandler.java:181)
        at org.intocps.orchestration.coe.httpserver.NanoWSDImpl.serveHttp(NanoWSDImpl.java:36)
        at fi.iki.elonen.NanoWSD.serve(NanoWSD.java:861)
        at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:925)
        at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
        at java.lang.Thread.run(Unknown Source)
Contributor

ldcouto commented Jan 9, 2017

Yep. That one crashes it. Richard, do you know which version of the exporter was used to generate the FMU in the example?

I've also added the log below.

Version: 0.1.10
Now running on port 8082
 INFO [NanoHttpd Request Processor (#1)] (RequestProcessors.java:160) - Using Fixed-step size calculator with size = 1.0
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:44) - loading fmus
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:261) - Outputs from: {controllerFMU}.controller = Set(valveOpen, fanSpeed)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:261) - Outputs from: {roomheatingFMU}.room = Set(RAT)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:261) - Outputs from: {environmentFMU}.env = Set(RAT_OUT, OAT_OUT)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:267) - Inputs for: {controllerFMU}.controller
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {environmentFMU}.env.RAT_OUT --> RATSP
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {roomheatingFMU}.room.RAT --> RAT
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:267) - Inputs for: {roomheatingFMU}.room
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {environmentFMU}.env.OAT_OUT --> OAT
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {controllerFMU}.controller.valveOpen --> valveopen
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {controllerFMU}.controller.fanSpeed --> fanspeed
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:384) - Instantiating FMU. ModelName: 'FCUController_Limited', GUID: '{633ac75e-4ddd-4428-b66f-fc2de49f7a4f}', Vendor tool: 'Overture', Generated by: 'Overture Tool FMI Exporter', at: 2016-09-09T11:38:22 Execution tool required: true
 WARN [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:388) - Make sure the execution tool: 'Overture' is available during this simulation.
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: Called instantiate with instance controller and guid {633ac75e-4ddd-4428-b66f-fc2de49f7a4f}
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: Launching Tool Wrapper memory key: '{633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller'  and resource location C:/Users/CoutoLD/AppData/Local/Temp/FCUController_Limited5567139821222994814/resources/
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: Launching with shared memory key: '{633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller'
Starting IPC server with key: Local\{633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: FMU Server client create, hosting SHM with raw key: {633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller
Launching process: 'java' with arguments: 'java -cp * org.crescendo.fmi.ShmServer -p {633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller' in folder 'C:/Users/CoutoLD/AppData/Local/Temp/FCUController_Limited5567139821222994814/resources/'
Process launched continuing main thread.
Starting Crescendo ShmServer with key: '{633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller'
DEBUG [main] (SharedMemory.java:27) - Loading library: lib/Windows-amd64/sharedmemory.dll
DEBUG [main] (NativeLibraryLoader.java:38) - Extracting library from: lib/Windows-amd64/sharedmemory.dll
DEBUG [main] (NativeLibraryLoader.java:40) - Extracted library: C:\Users\CoutoLD\AppData\Local\Temp\jnifmuapi5009067949864102244\fmi-shm-Windows-amd64\sharedmemory.dll
DEBUG [main] (SharedMemory.java:32) - Loaded Library file: C:\Users\CoutoLD\AppData\Local\Temp\jnifmuapi5009067949864102244\fmi-shm-Windows-amd64\sharedmemory.dll
Starting shared memory with key: {633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller
{633ac75e-4ddd-4428-b66f-fc2de49f7a4f}controller
Instantiating {633ac75e-4ddd-4428-b66f-fc2de49f7a4f}.controller with loggingOn = true, resource location='file:/C:/Users/CoutoLD/AppData/Local/Temp/FCUController_Limited5567139821222994814/resources/'
Source root: C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited5567139821222994814\resources\model
Parsed 16 classes in 0.172 secs.
No syntax errors


Warning 5017: Pure operation call may not be referentially transparent in 'Controller' (C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited5567139821222994814\resources\model\Controller.vdmrt) at line 80:23

Warning 5017: Pure operation call may not be referentially transparent in 'Controller' (C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited5567139821222994814\resources\model\Controller.vdmrt) at line 85:12

Type checked 18 classes in 0.109 secs.
No type errors
 and 2 warnings

 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:384) - Instantiating FMU. ModelName: 'RoomHeating', GUID: '{c2d275e0-33c1-48ef-88e0-66c4daa921d0}', Vendor tool: '', Generated by: '20-sim', at:  Execution tool required: false
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:384) - Instantiating FMU. ModelName: 'Environment', GUID: '{69387efb-46a9-47b0-86dd-cd23e13586f9}', Vendor tool: '', Generated by: '20-sim', at:  Execution tool required: false
ERROR [NanoHttpd Request Processor (#1)] (RequestProcessors.java:324) - Error in simulation
java.lang.ArrayStoreException
        at java.lang.System.arraycopy(Native Method)
        at java.util.Arrays.copyOf(Unknown Source)
        at java.util.ArrayList.toArray(Unknown Source)
        at org.intocps.orchestration.coe.util.Util.setRaw(Util.java:103)
        at org.intocps.orchestration.coe.util.Util.setRaw(Util.java:85)
        at org.intocps.orchestration.coe.BasicInitializer$FmiStateCache.synchroniseInstances(BasicInitializer.java:88)
        at org.intocps.orchestration.coe.BasicInitializer.initialize(BasicInitializer.java:169)
        at org.intocps.orchestration.coe.scala.CoeSimulator$.simulate(CoeSimulator.scala:62)
        at org.intocps.orchestration.coe.scala.Coe.simulate(Coe.scala:79)
        at org.intocps.orchestration.coe.httpserver.RequestProcessors.processSimulate(RequestProcessors.java:320)
        at org.intocps.orchestration.coe.httpserver.RequestHandler.simulate(RequestHandler.java:282)
        at org.intocps.orchestration.coe.httpserver.RequestHandler.handleRequest(RequestHandler.java:181)
        at org.intocps.orchestration.coe.httpserver.NanoWSDImpl.serveHttp(NanoWSDImpl.java:36)
        at fi.iki.elonen.NanoWSD.serve(NanoWSD.java:861)
        at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:925)
        at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
        at java.lang.Thread.run(Unknown Source)
@richardpayne

This comment has been minimized.

Show comment
Hide comment
@richardpayne

richardpayne Jan 9, 2017

Contributor

I'm afraid I don't know. I could try exporting with the most recent version though...

Contributor

richardpayne commented Jan 9, 2017

I'm afraid I don't know. I could try exporting with the most recent version though...

@ldcouto

This comment has been minimized.

Show comment
Hide comment
@ldcouto

ldcouto Jan 9, 2017

Contributor

I just gave it a try with Release 0.1.6 (It's the Controller_Limited FMU, right?)

Same error. Log below. I think we've gotten all the info we can for now. Let's see what AU says.

COE(Command line options: [port]

Version: 0.1.10
Now running on port 8082
 INFO [NanoHttpd Request Processor (#1)] (RequestProcessors.java:160) - Using Fixed-step size calculator with size = 1.0
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:44) - loading fmus
TRACE [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:257) - Set({environmentFMU}.env, {controllerFMU}.controller, {roomheatingFMU}.room)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:261) - Outputs from: {controllerFMU}.controller = Set(valveOpen, fanSpeed)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:261) - Outputs from: {roomheatingFMU}.room = Set(RAT)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:261) - Outputs from: {environmentFMU}.env = Set(RAT_OUT, OAT_OUT)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:267) - Inputs for: {controllerFMU}.controller
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {environmentFMU}.env.RAT_OUT --> RATSP
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {roomheatingFMU}.room.RAT --> RAT
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:267) - Inputs for: {roomheatingFMU}.room
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {environmentFMU}.env.OAT_OUT --> OAT
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {controllerFMU}.controller.valveOpen --> valveopen
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {controllerFMU}.controller.fanSpeed --> fanspeed
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:121) - Load FMU C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\FCUController_Limited.fmu
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:77) - trying to extract:
C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\FCUController_Limited.fmu
C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited6572344332242623889
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:80) - Extracted 'C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\FCUController_Limited.fmu' to 'C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited6572344332242623889'
DEBUG [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:123) - Loading FMU library: C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited6572344332242623889\binaries\win64\FCUController_Limited.dll
DEBUG [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:133) - Dll pointer: 5163680
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:121) - Load FMU C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\RoomHeating.fmu
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:77) - trying to extract:
C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\RoomHeating.fmu
C:\Users\CoutoLD\AppData\Local\Temp\RoomHeating5868494986785774495
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:80) - Extracted 'C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\RoomHeating.fmu' to 'C:\Users\CoutoLD\AppData\Local\Temp\RoomHeating5868494986785774495'
DEBUG [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:123) - Loading FMU library: C:\Users\CoutoLD\AppData\Local\Temp\RoomHeating5868494986785774495\binaries\win64\RoomHeating.dll
DEBUG [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:133) - Dll pointer: 5168528
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:121) - Load FMU C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\Environment.fmu
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:77) - trying to extract:
C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\Environment.fmu
C:\Users\CoutoLD\AppData\Local\Temp\Environment8037122478739039895
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:80) - Extracted 'C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\Environment.fmu' to 'C:\Users\CoutoLD\AppData\Local\Temp\Environment8037122478739039895'
DEBUG [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:123) - Loading FMU library: C:\Users\CoutoLD\AppData\Local\Temp\Environment8037122478739039895\binaries\win64\Environment.dll
DEBUG [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:133) - Dll pointer: 5701584
DEBUG [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:380) - Loading native FMU. GUID: {0af25cf6-a468-4cbe-8e60-ee584652db38}, NAME: controller
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:384) - Instantiating FMU. ModelName: 'FCUController_Limited', GUID: '{0af25cf6-a468-4cbe-8e60-ee584652db38}', Vendor tool: 'Overture', Generated by: 'Overture Tool FMI Exporter - v0.1.6', at: 2017-01-09T17:24:19 Execution tool required: true
 WARN [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:388) - Make sure the execution tool: 'Overture' is available during this simulation.
TRACE [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:176) - resourceLocationURI is: 'file:/C:/Users/CoutoLD/AppData/Local/Temp/FCUController_Limited6572344332242623889/resources/'
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: Called instantiate with instance controller and GUID {0af25cf6-a468-4cbe-8e60-ee584652db38}
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: Launching Tool Wrapper memory key: 'b918fa27-f048-4fff-9cc1-e89a6ca2c6fc' and resource location C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited6572344332242623889\resources\
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: Launching with shared memory key: 'b918fa27-f048-4fff-9cc1-e89a6ca2c6fc'
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: FMU Server create, hosting SHM with raw key: b918fa27-f048-4fff-9cc1-e89a6ca2c6fc
DEBUG [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:380) - Loading native FMU. GUID: {c2d275e0-33c1-48ef-88e0-66c4daa921d0}, NAME: room
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:384) - Instantiating FMU. ModelName: 'RoomHeating', GUID: '{c2d275e0-33c1-48ef-88e0-66c4daa921d0}', Vendor tool: '', Generated by: '20-sim', at:  Execution tool required: false
TRACE [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:176) - resourceLocationURI is: 'file:/C:/Users/CoutoLD/AppData/Local/Temp/RoomHeating5868494986785774495/resources/'
DEBUG [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:380) - Loading native FMU. GUID: {69387efb-46a9-47b0-86dd-cd23e13586f9}, NAME: env
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:384) - Instantiating FMU. ModelName: 'Environment', GUID: '{69387efb-46a9-47b0-86dd-cd23e13586f9}', Vendor tool: '', Generated by: '20-sim', at:  Execution tool required: false
TRACE [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:176) - resourceLocationURI is: 'file:/C:/Users/CoutoLD/AppData/Local/Temp/Environment8037122478739039895/resources/'
TRACE [NanoHttpd Request Processor (#1)] (BasicFixedStepSizeCalculator.scala:16) - Initializing the fixed step size calculator
TRACE [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:99) - Obtaining logging categories from the modelDescirption.xml files
TRACE [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:105) - Initialization done
TRACE [NanoHttpd Request Processor (#1)] (RequestProcessors.java:270) - Initialization completed obtained the following logging categories: {{controllerFMU}.controller=[logAll, logError, logFmiCall, Protocol, VdmOut, VdmErr], {roomheatingFMU}.room=[], {environmentFMU}.env=[]}
DEBUG [NanoHttpd Request Processor (#3)] (NanoWebSocketImpl.java:26) - Opening web socket for session: 73885
DEBUG [NanoHttpd Request Processor (#1)] (CoeSimulator.scala:540) - Calling setDebugLogging for: FCUController_Limited, levels: logAll,logError,logFmiCall,Protocol,VdmOut,VdmErr
DEBUG [NanoHttpd Request Processor (#1)] (CoeSimulator.scala:58) - Calling setupExperiment for {controllerFMU}.controller
DEBUG [NanoHttpd Request Processor (#1)] (CoeSimulator.scala:58) - Calling setupExperiment for {roomheatingFMU}.room
DEBUG [NanoHttpd Request Processor (#1)] (CoeSimulator.scala:58) - Calling setupExperiment for {environmentFMU}.env
DEBUG [NanoHttpd Request Processor (#1)] (BasicInitializer.java:128) - Initialization, state = before initialization
DEBUG [NanoHttpd Request Processor (#1)] (BasicInitializer.java:129) - Setting independent values
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.LWT: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.rohWall: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.hi: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.ho: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.Awall: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {environmentFMU}.env.Constant.C: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.aWall: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.totalEnergyInput_initial: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.TisurfInit: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.cWall: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.mdotat: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.eps: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.cAir: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.rohAir: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.lWall: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.RATinit: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.TosurfInit: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {controllerFMU}.controller.controllerFrequency: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.cWater: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.lamdaWall: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.hAir: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.totalEnergyOut_initial: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.vAir: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {environmentFMU}.env.Constant1.C: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.mdotwt: Parameter
DEBUG [NanoHttpd Request Processor (#1)] (BasicInitializer.java:147) - Setting no input values
TRACE [NanoHttpd Request Processor (#1)] (Util.java:93) - setRaw with comp: {69387efb-46a9-47b0-86dd-cd23e13586f9}.env, type: Real, indices: [6, 7], values: [1.0, 1.0]
TRACE [NanoHttpd Request Processor (#1)] (Util.java:113) - setRaw complete. Type='Real', indices [6, 7] values [1.0, 1.0] Status returned='OK'
TRACE [NanoHttpd Request Processor (#1)] (Util.java:93) - setRaw with comp: {0af25cf6-a468-4cbe-8e60-ee584652db38}.controller, type: Real, indices: [6], values: [2150000000]
ERROR [NanoHttpd Request Processor (#1)] (RequestProcessors.java:324) - Error in simulation
java.lang.ArrayStoreException
        at java.lang.System.arraycopy(Native Method)
        at java.util.Arrays.copyOf(Unknown Source)
        at java.util.ArrayList.toArray(Unknown Source)
        at org.intocps.orchestration.coe.util.Util.setRaw(Util.java:103)
        at org.intocps.orchestration.coe.util.Util.setRaw(Util.java:85)
        at org.intocps.orchestration.coe.BasicInitializer$FmiStateCache.synchroniseInstances(BasicInitializer.java:88)
        at org.intocps.orchestration.coe.BasicInitializer.initialize(BasicInitializer.java:169)
        at org.intocps.orchestration.coe.scala.CoeSimulator$.simulate(CoeSimulator.scala:62)
        at org.intocps.orchestration.coe.scala.Coe.simulate(Coe.scala:79)
        at org.intocps.orchestration.coe.httpserver.RequestProcessors.processSimulate(RequestProcessors.java:320)
        at org.intocps.orchestration.coe.httpserver.RequestHandler.simulate(RequestHandler.java:282)
        at org.intocps.orchestration.coe.httpserver.RequestHandler.handleRequest(RequestHandler.java:181)
        at org.intocps.orchestration.coe.httpserver.NanoWSDImpl.serveHttp(NanoWSDImpl.java:36)
        at fi.iki.elonen.NanoWSD.serve(NanoWSD.java:861)
        at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:925)
        at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
        at java.lang.Thread.run(Unknown Source)
Contributor

ldcouto commented Jan 9, 2017

I just gave it a try with Release 0.1.6 (It's the Controller_Limited FMU, right?)

Same error. Log below. I think we've gotten all the info we can for now. Let's see what AU says.

COE(Command line options: [port]

Version: 0.1.10
Now running on port 8082
 INFO [NanoHttpd Request Processor (#1)] (RequestProcessors.java:160) - Using Fixed-step size calculator with size = 1.0
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:44) - loading fmus
TRACE [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:257) - Set({environmentFMU}.env, {controllerFMU}.controller, {roomheatingFMU}.room)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:261) - Outputs from: {controllerFMU}.controller = Set(valveOpen, fanSpeed)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:261) - Outputs from: {roomheatingFMU}.room = Set(RAT)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:261) - Outputs from: {environmentFMU}.env = Set(RAT_OUT, OAT_OUT)
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:267) - Inputs for: {controllerFMU}.controller
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {environmentFMU}.env.RAT_OUT --> RATSP
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {roomheatingFMU}.room.RAT --> RAT
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:267) - Inputs for: {roomheatingFMU}.room
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {environmentFMU}.env.OAT_OUT --> OAT
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {controllerFMU}.controller.valveOpen --> valveopen
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:269) -    {controllerFMU}.controller.fanSpeed --> fanspeed
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:121) - Load FMU C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\FCUController_Limited.fmu
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:77) - trying to extract:
C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\FCUController_Limited.fmu
C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited6572344332242623889
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:80) - Extracted 'C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\FCUController_Limited.fmu' to 'C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited6572344332242623889'
DEBUG [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:123) - Loading FMU library: C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited6572344332242623889\binaries\win64\FCUController_Limited.dll
DEBUG [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:133) - Dll pointer: 5163680
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:121) - Load FMU C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\RoomHeating.fmu
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:77) - trying to extract:
C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\RoomHeating.fmu
C:\Users\CoutoLD\AppData\Local\Temp\RoomHeating5868494986785774495
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:80) - Extracted 'C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\RoomHeating.fmu' to 'C:\Users\CoutoLD\AppData\Local\Temp\RoomHeating5868494986785774495'
DEBUG [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:123) - Loading FMU library: C:\Users\CoutoLD\AppData\Local\Temp\RoomHeating5868494986785774495\binaries\win64\RoomHeating.dll
DEBUG [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:133) - Dll pointer: 5168528
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:121) - Load FMU C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\Environment.fmu
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:77) - trying to extract:
C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\Environment.fmu
C:\Users\CoutoLD\AppData\Local\Temp\Environment8037122478739039895
DEBUG [NanoHttpd Request Processor (#1)] (Fmu.java:80) - Extracted 'C:\Users\CoutoLD\Downloads\case-study_fcu-master\FMUs\Environment.fmu' to 'C:\Users\CoutoLD\AppData\Local\Temp\Environment8037122478739039895'
DEBUG [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:123) - Loading FMU library: C:\Users\CoutoLD\AppData\Local\Temp\Environment8037122478739039895\binaries\win64\Environment.dll
DEBUG [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:133) - Dll pointer: 5701584
DEBUG [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:380) - Loading native FMU. GUID: {0af25cf6-a468-4cbe-8e60-ee584652db38}, NAME: controller
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:384) - Instantiating FMU. ModelName: 'FCUController_Limited', GUID: '{0af25cf6-a468-4cbe-8e60-ee584652db38}', Vendor tool: 'Overture', Generated by: 'Overture Tool FMI Exporter - v0.1.6', at: 2017-01-09T17:24:19 Execution tool required: true
 WARN [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:388) - Make sure the execution tool: 'Overture' is available during this simulation.
TRACE [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:176) - resourceLocationURI is: 'file:/C:/Users/CoutoLD/AppData/Local/Temp/FCUController_Limited6572344332242623889/resources/'
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: Called instantiate with instance controller and GUID {0af25cf6-a468-4cbe-8e60-ee584652db38}
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: Launching Tool Wrapper memory key: 'b918fa27-f048-4fff-9cc1-e89a6ca2c6fc' and resource location C:\Users\CoutoLD\AppData\Local\Temp\FCUController_Limited6572344332242623889\resources\
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: Launching with shared memory key: 'b918fa27-f048-4fff-9cc1-e89a6ca2c6fc'
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:398) - logFmiCall OK controller FMU: FMU Server create, hosting SHM with raw key: b918fa27-f048-4fff-9cc1-e89a6ca2c6fc
DEBUG [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:380) - Loading native FMU. GUID: {c2d275e0-33c1-48ef-88e0-66c4daa921d0}, NAME: room
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:384) - Instantiating FMU. ModelName: 'RoomHeating', GUID: '{c2d275e0-33c1-48ef-88e0-66c4daa921d0}', Vendor tool: '', Generated by: '20-sim', at:  Execution tool required: false
TRACE [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:176) - resourceLocationURI is: 'file:/C:/Users/CoutoLD/AppData/Local/Temp/RoomHeating5868494986785774495/resources/'
DEBUG [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:380) - Loading native FMU. GUID: {69387efb-46a9-47b0-86dd-cd23e13586f9}, NAME: env
 INFO [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:384) - Instantiating FMU. ModelName: 'Environment', GUID: '{69387efb-46a9-47b0-86dd-cd23e13586f9}', Vendor tool: '', Generated by: '20-sim', at:  Execution tool required: false
TRACE [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:176) - resourceLocationURI is: 'file:/C:/Users/CoutoLD/AppData/Local/Temp/Environment8037122478739039895/resources/'
TRACE [NanoHttpd Request Processor (#1)] (BasicFixedStepSizeCalculator.scala:16) - Initializing the fixed step size calculator
TRACE [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:99) - Obtaining logging categories from the modelDescirption.xml files
TRACE [NanoHttpd Request Processor (#1)] (CoeInitialize.scala:105) - Initialization done
TRACE [NanoHttpd Request Processor (#1)] (RequestProcessors.java:270) - Initialization completed obtained the following logging categories: {{controllerFMU}.controller=[logAll, logError, logFmiCall, Protocol, VdmOut, VdmErr], {roomheatingFMU}.room=[], {environmentFMU}.env=[]}
DEBUG [NanoHttpd Request Processor (#3)] (NanoWebSocketImpl.java:26) - Opening web socket for session: 73885
DEBUG [NanoHttpd Request Processor (#1)] (CoeSimulator.scala:540) - Calling setDebugLogging for: FCUController_Limited, levels: logAll,logError,logFmiCall,Protocol,VdmOut,VdmErr
DEBUG [NanoHttpd Request Processor (#1)] (CoeSimulator.scala:58) - Calling setupExperiment for {controllerFMU}.controller
DEBUG [NanoHttpd Request Processor (#1)] (CoeSimulator.scala:58) - Calling setupExperiment for {roomheatingFMU}.room
DEBUG [NanoHttpd Request Processor (#1)] (CoeSimulator.scala:58) - Calling setupExperiment for {environmentFMU}.env
DEBUG [NanoHttpd Request Processor (#1)] (BasicInitializer.java:128) - Initialization, state = before initialization
DEBUG [NanoHttpd Request Processor (#1)] (BasicInitializer.java:129) - Setting independent values
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.LWT: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.rohWall: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.hi: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.ho: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.Awall: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {environmentFMU}.env.Constant.C: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.aWall: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.totalEnergyInput_initial: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.TisurfInit: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.cWall: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.mdotat: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.eps: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.cAir: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.rohAir: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.lWall: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.RATinit: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Wall.TosurfInit: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {controllerFMU}.controller.controllerFrequency: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.cWater: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.lamdaWall: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.hAir: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.totalEnergyOut_initial: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.vAir: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {environmentFMU}.env.Constant1.C: Parameter
TRACE [NanoHttpd Request Processor (#1)] (BasicInitializer.java:137) - Adding independent value to cache: {roomheatingFMU}.room.Room.mdotwt: Parameter
DEBUG [NanoHttpd Request Processor (#1)] (BasicInitializer.java:147) - Setting no input values
TRACE [NanoHttpd Request Processor (#1)] (Util.java:93) - setRaw with comp: {69387efb-46a9-47b0-86dd-cd23e13586f9}.env, type: Real, indices: [6, 7], values: [1.0, 1.0]
TRACE [NanoHttpd Request Processor (#1)] (Util.java:113) - setRaw complete. Type='Real', indices [6, 7] values [1.0, 1.0] Status returned='OK'
TRACE [NanoHttpd Request Processor (#1)] (Util.java:93) - setRaw with comp: {0af25cf6-a468-4cbe-8e60-ee584652db38}.controller, type: Real, indices: [6], values: [2150000000]
ERROR [NanoHttpd Request Processor (#1)] (RequestProcessors.java:324) - Error in simulation
java.lang.ArrayStoreException
        at java.lang.System.arraycopy(Native Method)
        at java.util.Arrays.copyOf(Unknown Source)
        at java.util.ArrayList.toArray(Unknown Source)
        at org.intocps.orchestration.coe.util.Util.setRaw(Util.java:103)
        at org.intocps.orchestration.coe.util.Util.setRaw(Util.java:85)
        at org.intocps.orchestration.coe.BasicInitializer$FmiStateCache.synchroniseInstances(BasicInitializer.java:88)
        at org.intocps.orchestration.coe.BasicInitializer.initialize(BasicInitializer.java:169)
        at org.intocps.orchestration.coe.scala.CoeSimulator$.simulate(CoeSimulator.scala:62)
        at org.intocps.orchestration.coe.scala.Coe.simulate(Coe.scala:79)
        at org.intocps.orchestration.coe.httpserver.RequestProcessors.processSimulate(RequestProcessors.java:320)
        at org.intocps.orchestration.coe.httpserver.RequestHandler.simulate(RequestHandler.java:282)
        at org.intocps.orchestration.coe.httpserver.RequestHandler.handleRequest(RequestHandler.java:181)
        at org.intocps.orchestration.coe.httpserver.NanoWSDImpl.serveHttp(NanoWSDImpl.java:36)
        at fi.iki.elonen.NanoWSD.serve(NanoWSD.java:861)
        at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:925)
        at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
        at java.lang.Thread.run(Unknown Source)
@CThuleHansen

This comment has been minimized.

Show comment
Hide comment
@CThuleHansen

CThuleHansen Feb 7, 2017

Contributor

For this commit:
https://github.com/into-cps/case-study_fcu/tree/28c913b5bfc75500372a840b2c4e977ef4bf7a65
We have used this exporter: http://overture.au.dk/into-cps/vdm-tool-wrapper/development/latest/
And COE 0.1.10
and it cannot be simulated because of a type checking error. By manually inserting the frequency you specified Richard (215e7), we could succesfully run the simulation.

functions

	private getFrequency : () -> real
	getFrequency() ==    215e7;
	      
                      
thread
	-- execute the control loop every 80 ms
	periodic((215e7)/*ms*/,0,0,0)(PIDcalculate); -- original 80e6

Can you try again? If it does not work, then we would like the specific "failing" FMU where the models contain the frequency that causes it to fail, so we do not have to change anything but just run it.

Contributor

CThuleHansen commented Feb 7, 2017

For this commit:
https://github.com/into-cps/case-study_fcu/tree/28c913b5bfc75500372a840b2c4e977ef4bf7a65
We have used this exporter: http://overture.au.dk/into-cps/vdm-tool-wrapper/development/latest/
And COE 0.1.10
and it cannot be simulated because of a type checking error. By manually inserting the frequency you specified Richard (215e7), we could succesfully run the simulation.

functions

	private getFrequency : () -> real
	getFrequency() ==    215e7;
	      
                      
thread
	-- execute the control loop every 80 ms
	periodic((215e7)/*ms*/,0,0,0)(PIDcalculate); -- original 80e6

Can you try again? If it does not work, then we would like the specific "failing" FMU where the models contain the frequency that causes it to fail, so we do not have to change anything but just run it.

@CThuleHansen CThuleHansen modified the milestone: M25 Feb 13, 2017

@CThuleHansen CThuleHansen modified the milestone: M26 Feb 13, 2017

@lausdahl

This comment has been minimized.

Show comment
Hide comment
@lausdahl

lausdahl Feb 16, 2017

Contributor

Please fix this issue first #155 if it still gives the problem then we can take a look

Contributor

lausdahl commented Feb 16, 2017

Please fix this issue first #155 if it still gives the problem then we can take a look

@ldcouto

This comment has been minimized.

Show comment
Hide comment
@ldcouto

ldcouto Feb 16, 2017

Contributor

From what Kenneth is saying in #155, there may actually be a problem with the 20-sim model. See

Contributor

ldcouto commented Feb 16, 2017

From what Kenneth is saying in #155, there may actually be a problem with the 20-sim model. See

@ldcouto ldcouto modified the milestones: M26, M27 Mar 27, 2017

@ldcouto ldcouto modified the milestones: M27, M28 Apr 24, 2017

@ldcouto ldcouto modified the milestones: M28, M29 May 8, 2017

@ldcouto ldcouto modified the milestones: M29, M30 Jun 9, 2017

@ldcouto ldcouto modified the milestones: M30, M31 Jul 19, 2017

@ldcouto

This comment has been minimized.

Show comment
Hide comment
@ldcouto

ldcouto Jul 24, 2017

Contributor

I'm closing this issue. It's been months and no further news. Reopen if still a problem.

Contributor

ldcouto commented Jul 24, 2017

I'm closing this issue. It's been months and no further news. Reopen if still a problem.

@ldcouto ldcouto closed this Jul 24, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.