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) core.RunEcoSim(AddressOf EcosimResultsHandler)
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
You can run the code by loading the EweConsoleAppExample tutorial, and overwrite its file EwE7.vb with the code file found at the bottom of this page.