lbl-srg / GenOpt

GenOpt - Generic Optimization program
http://simulationresearch.lbl.gov/GO
20 stars 14 forks source link

Coupling GenOpt with OpenModelica in Windows #12

Open giomarpap opened 4 months ago

giomarpap commented 4 months ago

Hello, I hope I am posting this in the correct place, if not, please advise me accordingly.

I am in the process of coupling GenOpt with OpenModelica in Windows. I believe I am close to achieve it, yet not successful.

After launching this in Windows Powershell: java -classpath genopt.jar genopt.GenOpt .\initialisation.ini

The folder tmp-genopt-run-1 is created, and then a bat file is executed, which firsts copies a test_JacA.bin file (generated when previously compiled/build the modelica case) in the folder and then it executes : .\test.bat -override c1_input=%c1%,c2_input=%c2%,stopTime=43200,stepSize=30

The simulation apparently finishes successfully since the result.txt file is generated correctly with the expected value. e.g.

Objective function value
f(x) = 9133302.9028263390064240

However, the genopt crashes providing the following message: (while the logfile does not contain any additional information)

GenOpt terminated with error.
See logfile for further information.

So, I am puzzled as to why genopt crashes, if the simulation is successfully producing the required output file. Any help would be highly appreciated. Thanks!

AHaumer commented 3 months ago

@giomarpap could you post GenOpt.log respectively the error message? Which version of OpenModelica are you using?