This tutorial will guide you through how to make an console application that would run Ecosim and Ecospace. You can extend these to make applications such as monte carlos routines, or create/modify multiple databases.
This tutorial will extend the EweConsoleAppExample tutorial.
core.LoadEcosimScenario(1) ' (6) Loads an ecosim scenario core.RunEcoSim(AddressOf EcosimResultsHandler) ' (7) Runs Ecosim with delegate
' Ecosim delegate - a sub function/subroutine that is ' called at the end of every timestep. ' One would obtain the results from the results object. Private Sub EcosimResultsHandler(ByVal iTime As Long, ByVal EcoSimResults As cEcoSimResults) System.Console.WriteLine("Time Step = " & iTime.ToString & _ "; Biomass of group 1 = " & EcoSimResults.Biomass(1).ToString & vbCrLf) End Sub
Time Step = 320; Biomass of group 1 = 0.993543 Time Step = 321; Biomass of group 1 = 0.9935352 Time Step = 322; Biomass of group 1 = 0.9935276 Time Step = 323; Biomass of group 1 = 0.99352 Time Step = 324; Biomass of group 1 = 0.9935125 Press a key to exit
The .vb file can be found at the bottom of this page. Simply replace this file with the EwE7.vb found in the EweConsoleAppExample tutorial.