Opened 11 years ago

Closed 6 years ago

#2350 closed defect (fixed)

Experiment annotation ignored when using +s

Reported by: Per Östlund Owned by: Martin Sjölund
Priority: high Milestone: 1.14.0
Component: Frontend Version:
Keywords: Cc:

Description

The experiment annotation is ignored when the +s flag is used to generate simulation code, i.e. they are not used for the DefaultExperiment section in the Model_init.xml file.

Example:

model M
  Real x = 1.0;

  annotation(experiment(StartTime = 1.0, StopTime = 3.0, Interval = 0.01, Tolerance = 0.0001));
end M;

Change History (4)

comment:1 by Martin Sjölund, 11 years ago

Component: Code GenerationFrontend

comment:2 by jan.kokert, 11 years ago

Is this issue also fixed now?

I mean, the "Interval" value of the experiment annotation is parsed correctly since r18715, which is a great fix!

comment:3 by Martin Sjölund, 11 years ago

It probably did not change. +s I guess should just call the translateModel command internally instead of try to do everything from scratch.

comment:4 by Francesco Casella, 6 years ago

Milestone: Future1.14.0
Resolution: fixed
Status: newclosed
Version: trunk

It seems this is now solved, the .xml file contains the following section:

  <DefaultExperiment
    startTime      = "1"
    stopTime       = "3"
    stepSize       = "0.01"
    tolerance      = "0.0001"
    solver        = "dassl"
    outputFormat      = "mat"
    variableFilter      = ".*" />
Note: See TracTickets for help on using tickets.