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

Observed data - reload under the same settings -> Error in PI #2179

Closed
PavelBal opened this issue Dec 7, 2023 · 3 comments · Fixed by #2402
Closed

Observed data - reload under the same settings -> Error in PI #2179

PavelBal opened this issue Dec 7, 2023 · 3 comments · Fixed by #2402
Assignees

Comments

@PavelBal
Copy link
Member

PavelBal commented Dec 7, 2023

Whe using the funtion to "Reload under the same settings", and the updated data set has less values that the previous one and it was used in a PI, trying to open the PI:

Application:
MoBi® 11.2.138

Values.Length = 154 != 67 = BaseGrid.Count

Stack trace:

at OSPSuite.Core.Domain.Data.DataColumn.set_Values(IReadOnlyList`1 value)
   at OSPSuite.Presentation.Mappers.ParameterIdentifications.WeightedDataRepositoryToDataTableMapper.createWeightColumn(BaseGrid baseGrid, WeightedObservedData weightedObservedData)
   at OSPSuite.Presentation.Mappers.ParameterIdentifications.WeightedDataRepositoryToDataTableMapper.MapFrom(WeightedObservedData weightedObservedData)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.WeightedDataRepositoryDataPresenter.MapDataTableFromColumns()
   at OSPSuite.Presentation.Presenters.ObservedData.BaseDataRepositoryDataPresenter`2.Rebind()
   at OSPSuite.Presentation.Presenters.ObservedData.BaseDataRepositoryDataPresenter`2.EditObservedData(DataRepository observedData)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.WeightedDataRepositoryDataPresenter.EditObservedData(WeightedObservedData weightedObservedData)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationWeightedObservedDataPresenter.Edit(WeightedObservedData weightedObservedData)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationWeightedObservedDataCollectorPresenter.edit(WeightedObservedData weightedObservedData)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationWeightedObservedDataCollectorPresenter.AddObservedData(WeightedObservedData weightedObservedData)
   at OSPSuite.Utility.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 list, Action`1 action)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationWeightedObservedDataCollectorPresenter.<>c__DisplayClass10_0.<addWeightedObservedDataToView>b__0()
   at OSPSuite.Utility.Extensions.LatchableExtensions.DoWithinLatch(ILatchable latchable, Action action)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationWeightedObservedDataCollectorPresenter.addWeightedObservedDataToView(List`1 allWeightedObservedData)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationWeightedObservedDataCollectorPresenter.EditParameterIdentification(ParameterIdentification parameterIdentification)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationDataSelectionPresenter.EditParameterIdentification(ParameterIdentification parameterIdentification)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.EditParameterIdentificationPresenter.<>c__DisplayClass2_0.<InitializeSubPresentersWith>b__0(IParameterIdentificationItemPresenter x)
   at OSPSuite.Utility.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 list, Action`1 action)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.EditParameterIdentificationPresenter.InitializeSubPresentersWith(ParameterIdentification parameterIdentification)
   at OSPSuite.Presentation.Presenters.EditAnalyzablePresenter`4.Edit(TAnalyzable analyzable)
   at OSPSuite.Presentation.Presenters.SubjectPresenter`3.Edit(Object objectToEdit)
   at MoBi.Presentation.Tasks.SingleStartPresenterTask.StartForSubject[T](T subject)
   at OSPSuite.Presentation.UICommands.EditParameterIdentificationUICommand.PerformExecute()
   at OSPSuite.Presentation.UICommands.ObjectUICommand`1.Execute()
   at OSPSuite.Presentation.UICommands.UICommandExtensions.ExecuteWithinExceptionHandler(IUICommand uiCommand, IEventPublisher eventPublisher, IChangePropagator changePropagator)
@PavelBal PavelBal added this to v12.1 Dec 16, 2024
@rwmcintosh rwmcintosh moved this to Todo in v12.1 Jan 2, 2025
@rwmcintosh rwmcintosh moved this from Todo to In Progress in v12.1 Jan 14, 2025
@rwmcintosh rwmcintosh self-assigned this Jan 14, 2025
@rwmcintosh
Copy link
Member

The right fix might be to prevent reload don't you think? Because here we have created a weighting for 154 measurements and the new observed data only contains 67. Which weights do you throw out?

@PavelBal
Copy link
Member Author

The right fix might be to prevent reload

No.

Which weights do you throw out?

Reset all weights to 1 and notify the user.

@rwmcintosh
Copy link
Member

benjaperez1983 added a commit that referenced this issue Jan 22, 2025
@benjaperez1983 benjaperez1983 moved this from In Progress to In Review in v12.1 Jan 22, 2025
benjaperez1983 added a commit that referenced this issue Jan 28, 2025
benjaperez1983 added a commit that referenced this issue Jan 28, 2025
rwmcintosh added a commit that referenced this issue Jan 29, 2025
* Fixes #2382 Improve 'Cannot find quantity with path' message (#2383)

* Fixes #2382 Improve 'Cannot find quantity with path' message

* pr comments

* pr comments

* update simmodel (#2385)

* update simmodel

* update simmodel

* Fixes #1743 Cannot add data to simulation? (#2387)

* #2179 observed data reload with same settings

* #2179 Cleanup

* what if we change the interface

* remove a property

* spelling

* What if we change fixes

* #2179 code review comments

* #2179 remove unused reference

---------

Co-authored-by: Robert McIntosh <261477+rwmcintosh@users.noreply.github.com>
@rwmcintosh rwmcintosh moved this from In Review to Done in v12.1 Jan 29, 2025
@rwmcintosh rwmcintosh closed this as completed by moving to Done in v12.1 Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
3 participants