Opened 4 years ago

Closed 4 years ago

#5938 closed enhancement (fixed)

Add information about linearized model output

Reported by: casella Owned by: Karim.Abdelhak
Priority: high Milestone: 1.16.0
Component: Backend Version:
Keywords: Cc:

Description

When running the linearize API function (see attached test case), the linearized model is saved in a file. This is the output of the linearize function:

    resultFile = "d:/Temp/OMEdit/foo_res.mat",
    simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'foo', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
    messages = "stdout            | info    | Linearization will performed at point of time: 1.000000
LOG_SUCCESS       | info    | The initialization finished successfully without homotopy method.
LOG_SUCCESS       | info    | The simulation finished successfully.
stdout            | info    | Linear model is created!

The result log makes it very clear where the result of the simulation is, but it doesn't tell where the file with the linearized model is, only that it was created. This can be very frustrating in some cases, when the output directory is not directly under the user control (e.g. when running the linearize() command under the OMEdit CLI).

Please add the full path to the linearized model file to the log output, e.g. by writing "Linear model created in file xxx/yyy", instead of "Linear model created!".

I would also strongly suggest to add one extra line to indicate that it is possible to change the format of the output via a compiler flag, since this is not explained in the API manual, e.g.

The output format can be changed with the command line option --linearizationDumpLanguage, e.g. --linearizationDumpLanguage=matlab

Attachments (1)

test_linearize.mos (391 bytes) - added by casella 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by casella

comment:1 Changed 4 years ago by Karim.Abdelhak

I updated it and now it produces following output:

messages = "
stdout            | info    | Linearization will be performed at point of time: 1.000000
LOG_SUCCESS       | info    | The initialization finished successfully without homotopy method.
LOG_SUCCESS       | info    | The simulation finished successfully.
stdout            | info    | Linear model is created at /home/kab/Repo/FH/promotion/modelicaLibs/ticketTests/5928/linear_foo.m
stdout            | info    | The output format can be changed with the command line option --linearizationDumpLanguage.
stdout            | info    | The options are: --linearizationDumpLanguage=modelica, matlab, julia, python.
",

I will try to push it with the changes from #5927

comment:2 Changed 4 years ago by casella

Sounds good!

comment:3 Changed 4 years ago by casella

  • Resolution set to fixed
  • Status changed from new to closed

There are some extra slashes in Windows, probably due to bad escaping, but it's no big deal. I think this issue can be closed for good.

Note: See TracTickets for help on using tickets.