Changes between Version 8 and Version 9 of EcosimVariableTimestepPluginExample
- Timestamp:
- 2010-02-25 14:24:10 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
EcosimVariableTimestepPluginExample
v8 v9 19 19 20 20 ==== Sub time step plugin points ==== 21 IEcosimSubTimestepsPlugin.!EcosimSubTimeStepBegin(!ByRef !BiomassAtTimestep() As Single, !ByVal !TimeInYears As Single, !ByVal DeltaT As Single, !ByVal !SubTimestepIndex As Integer, !ByVal !EcosimDatastructures As Object) 21 {{{ 22 IEcosimSubTimestepsPlugin.EcosimSubTimeStepBegin(ByRef BiomassAtTimestep() As Single, ByVal TimeInYears As Single, ByVal DeltaT As Single, ByVal SubTimestepIndex As Integer, ByVal EcosimDatastructures As Object) 23 }}} 24 22 25 23 26 * Called at the start of a sub time step. 24 27 * !BiomassAtTimestep() contains the biomass that will be used for the time step. Any changes to biomass by a plugin point will be use be by Ecosim for the time step. 25 28 26 IEcosimSubTimestepsPlugin.!EcosimSubTimeStepEnd(!ByRef !BiomassAtTimestep() As Single, !ByVal !TimeInYears As Single, !ByVal DeltaT As Single, !ByVal !SubTimestepIndex As Integer, !ByVal !EcosimDatastructures As Object) 29 {{{ 30 IEcosimSubTimestepsPlugin.EcosimSubTimeStepEnd(ByRef BiomassAtTimestep() As Single, ByVal TimeInYears As Single, ByVal DeltaT As Single, ByVal SubTimestepIndex As Integer, ByVal EcosimDatastructures As Object) 31 }}} 32 27 33 28 34 * Called at the end of a sub time step. … … 30 36 31 37 = Running Ecosim on a separate thread = 32 Ecosim can be run on a separate thread from the user interface by setting the cEcosimDataStuctures.bMultiThreaded Boolean flag to True. The next time Ecosim is run it will run on its own thread. Once the Ecosim run has completed the cEcosimDataStuctures.bMultiThreaded flag will be automatically set to its default value of False and all subsequent run will be on the main application thread. All plug-in calls that originate on a thread other than the main thread will be marshaledto the main thread. This is for robustness, in .NET user interface controls cannot be accessed from a thread other than that which they were created on. Plug-ins are created and run on the main thread by the EwE framework. By automatically marshaling all plug-in calls to the main thread plug-in points do not have to marshal calls to an interface.38 Ecosim can be run on its own thread by setting the cEcosimDataStuctures.bMultiThreaded Boolean flag to True. The next time Ecosim is run it will run on its own thread. Once the Ecosim run has completed the cEcosimDataStuctures.bMultiThreaded flag will be automatically set to its default value of False and all subsequent runs will be on the main application thread. All plug-in calls that originate on a thread other than the main thread will be marshaled to the main thread. This is for robustness, in .NET user interface controls cannot be accessed from a thread other than that which they were created on. Plug-ins are created and run on the main thread by the EwE framework. By automatically marshaling all plug-in calls to the main thread plug-in points do not have to marshal calls to an interface.