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

Broken table-interpolation? #2724

Closed
HansOlsson opened this issue Oct 4, 2018 · 2 comments · Fixed by #2725
Closed

Broken table-interpolation? #2724

HansOlsson opened this issue Oct 4, 2018 · 2 comments · Fixed by #2725
Assignees
Labels
bug Critical/severe issue L: Blocks Issue addresses Modelica.Blocks
Milestone

Comments

@HansOlsson
Copy link
Contributor

Consider the following:


model Unnamed
  Modelica.Blocks.Sources.CombiTimeTable combiTimeTable(
    table=[1,10; 1,11],
    smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments,
    verboseExtrapolation=true)
    annotation (Placement(transformation(extent={{-38,-52},{-18,-32}})));
  Modelica.Blocks.Sources.CombiTimeTable combiTimeTable1(
    table=[1,10; 1,11; 2,12],
    smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments,
    verboseExtrapolation=true)
    annotation (Placement(transformation(extent={{-40,20},{-20,40}})));
  annotation (uses(Modelica(version="3.2.3")));
end Unnamed;
@HansOlsson
Copy link
Contributor Author

As far as I can see combiTimeTable.y generates 11, 10 as signals, and combiTimeTable1.y is 11, a short dip and then 11, followed by 12 and then linear interpolation.

Setting extrapolation=Modelica.Blocks.Types.Extrapolation.HoldLastPoint gives correct result for combiTimeTable1 - but combiTimeTable is stuck at 10.

@HansOlsson HansOlsson added bug Critical/severe issue L: Blocks Issue addresses Modelica.Blocks labels Oct 4, 2018
@HansOlsson
Copy link
Contributor Author

One issue is in ModelicaStandardTables_CombiTimeTable_nextTimeEvent - if called at time=1 for this case it can compute nextInterval=1; whereas the expected output would be DBL_INF. (I think.)

@beutlich beutlich added L: C-Sources Issue addresses Modelica/Resources/C-Sources and removed L: Blocks Issue addresses Modelica.Blocks labels Oct 4, 2018
@beutlich beutlich added this to the MSL3.2.3 milestone Oct 4, 2018
@beutlich beutlich self-assigned this Oct 4, 2018
@beutlich beutlich added L: Blocks Issue addresses Modelica.Blocks and removed L: C-Sources Issue addresses Modelica/Resources/C-Sources labels Oct 4, 2018
beutlich added a commit to beutlich/ModelicaStandardLibrary that referenced this issue Oct 4, 2018
beutlich added a commit to beutlich/ModelicaStandardLibrary that referenced this issue Oct 4, 2018
beutlich added a commit that referenced this issue Oct 8, 2018
beutlich added a commit that referenced this issue Oct 16, 2018
* MSVC VS 2005
* MinGW 32/64 GCC 4.8.3
* Linux GCC 4.8.5

[ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Critical/severe issue L: Blocks Issue addresses Modelica.Blocks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants