Skip to content

Commit

Permalink
Merge pull request #6 from ApexRMS/AlexESTimeConsole
Browse files Browse the repository at this point in the history
Stochastic Time Console Changes
  • Loading branch information
alexembrey authored Jun 16, 2023
2 parents 9779a95 + 3d1ae6f commit 3fb0679
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: NeutralResourcesLanguage("en-US")]

23 changes: 22 additions & 1 deletion src/Updates/Updates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ public override void PerformUpdate(DataStore store, int currentSchemaVersion)
EpiUpdate_0001(store);
}

if (currentSchemaVersion < 2)
{
EpiUpdate_0002(store);
}

#if DEBUG
//Verify that all expected indexes exist after the update because it is easy to forget to recreate them after
//adding a column to an existing table (which requires the table to be recreated if you want to preserve column order.)
Expand Down Expand Up @@ -74,8 +79,24 @@ private static void EpiUpdate_0001(DataStore store)
store.ExecuteNonQuery("DROP TABLE TEMP_TABLE");

//Index
CreateIndex(store, "epi_DataSummary", new string[] {
UpdateProvider.CreateIndex(store, "epi_DataSummary", new string[] {
"ScenarioID", "TransformerID", "Iteration", "Timestep", "Variable", "Jurisdiction" });
}

/// <summary>
/// EpiUpdate_0002
///
/// This update changes the variable names in the corstime_Chart "Criteria" column(s) to use the
/// variable name instead of the group name. This change is required because selecting disaggregate
/// and include data by group is no longer supported as of SyncroSim v2.4.27.
/// </summary>
/// <param name="store"></param>
private static void EpiUpdate_0002(DataStore store)
{
UpdateProvider.RemoveChartGroupCriteria(store, new[]
{
"epi_Variables|epi_Variable"
});
}
}
}
10 changes: 5 additions & 5 deletions src/package.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<package name="epi" displayName="Model of epidemic infections and deaths" version="1.1.3" url="https://apexrms.github.io/epi/">
<package name="epi" displayName="Model of epidemic infections and deaths" version="1.2.0" minSyncroSimVersion="2.5.0" url="https://apexrms.github.io/epi/">
<transformers>
<transformer
name="Primary"
Expand Down Expand Up @@ -84,8 +84,8 @@
<item name="corestime_ChartTransformer"/>
</layout>
<layout name="corestimeforms_Charts" options="noDataAsZero=False">
<group name="Variables" dataSheet="DataSummary" filter="Jurisdiction">
<item name="Variable" dataSheet="DataSummary" column="Value" variableSourceColumn="Variable"/>
<group name="Variables">
<item name="Variable" dataSheet="DataSummary" column="Value" filter="Jurisdiction" variableSourceColumn="Variable"/>
</group>
</layout>
</layouts>
Expand All @@ -97,8 +97,8 @@
classAssembly="SyncroSim.Core.Forms"/>
</views>
<updateProvider
schemaVersion="1"
minPackageVersion="1.0.5"
schemaVersion="2"
minPackageVersion="1.2.0"
className="SyncroSim.Epi.Updates"
classAssembly="SyncroSim.Epi">
</updateProvider>
Expand Down

0 comments on commit 3fb0679

Please sign in to comment.