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

Fixes #2424 output mapping serialization #2425

Merged
merged 1 commit into from
Nov 11, 2022

Conversation

msevestre
Copy link
Member

No description provided.

@@ -291,7 +291,7 @@ public static SensitivityParameter SensitivityParameter(string name = "Sensitivi

public static DataRepository IndividualSimulationDataRepositoryFor(string simulationName)
{
var simulationResults = new DataRepository("Results");
var simulationResults = new DataRepository();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Id was fixed here. Letting the code create the id automatically

{
return SetParameterValue(parameter, value);
}

public ICommand UpdateParameterValueOrigin(IParameter parameter, ValueOrigin valueOrigin, ISimulation simulation)
public ICommand UpdateParameterValueOrigin(IParameter parameter, ValueOrigin valueOrigin, IModelCoreSimulation simulation)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change related to the change of interface

@@ -114,6 +114,7 @@ private void exportSimulationToFile(Simulation simulation, string moBiFile)
var simulationTransfer = new SimulationTransfer
{
Simulation = moBiSimulation,
OutputMappings = simulation.OutputMappings,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saving the actual output mapping when exporting

@@ -27,7 +27,7 @@ public SimulationTransfer Load(string pkmlFileFullPath)
{
var project = _projectRetriever.CurrentProject;

//use new ObjectBaseRepository here as the resulting simulation will be registered later on when added to the project
//use new WithIdRepository here as the resulting simulation will be registered later on when added to the project
var simulationTransfer = _simulationPersister.Load(pkmlFileFullPath, new WithIdRepository());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, we do not load obs data when loading from MoBi (this is not really a use case that is done often). So I am not going to tackle this for now

@rwmcintosh rwmcintosh merged commit 8668d38 into develop Nov 11, 2022
@rwmcintosh rwmcintosh deleted the 2424-output-mappings-serialization branch November 11, 2022 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants