Click or drag to resize

cCore Class

Class to handle all interactions between a user interface layer, a data source and the EcoPath, EcoSim and EcoSpace models.
Inheritance Hierarchy
SystemObject
  EwECorecCore

Namespace:  EwECore
Assembly:  EwECore (in EwECore.dll) Version: 6.6.15981.0 (6.6.15981.0)
Syntax
public class cCore : IDisposable

The cCore type exposes the following members.

Constructors
  NameDescription
Public methodcCore
Constructor
Top
Properties
  NameDescription
Public propertyActiveEcosimScenarioIndex
Gets the index of the active Ecosim scenario. If no scenario is loaded, a value < 1 will be returned.
Public propertyActiveEcospaceScenarioIndex
Gets the index of the active Ecospace scenario.
Public propertyActiveEcotracerScenarioIndex
Gets the index of the active Ecotracer scenario.
Public propertyActiveTimeSeriesDatasetIndex
Gets the one-based index of the active TimeSeries Dataset. If no time series are loaded, a value < 1 is returned.
Public propertyAdvectionManager
Public propertyAutosave
Get/set whether a auto-save capable component is allowed to auto-save.
Public propertyAuxillaryDataString
Helper method; looks up - or creates when non-existing - an AuxillaryData instance for a value.
Public propertyAuxillaryDatacValueID
Get/set anAuxillaryData instance for a given value ID.
Public propertyAuxillaryDatacCoreInputOutputBase, Boolean
Get all auxillary data that related to a given core object.
Public propertyAuxillaryDataeDataTypes, Int32, Boolean
Get all auxillary data that related to a given object.
Public propertyBackupFileMask
Public propertyCapacityMapInteractionManager
Public propertyDataSource
The data source that the core will use for reading and writing model data.
Public propertyDefaultAuthor
Get/set the default author name to use for EwE.
Public propertyDefaultContact
Get/set the default author contact information to use for EwE.
Public propertyDefaultOutputPath
Get the default output location for a given autosaving component.
Public propertyEcoFunction
Get the single cEcoFunctions instance.
Public propertyEcopathDataStructures
Public propertyEcopathFleetInputs
Public propertyEcoPathFleetOutputs
Public propertyEcoPathGroupInputs
Basic Inputs for EcoPath for a single group
Public propertyEcoPathGroupOutputs
Retrieves the EcoPath estimated parameters for the last run parameter estimation for this iGroup by creating a new EcoPathGroupOutputs object that is populated with the estimated parameters.
Public propertyEcopathStats
Statistics from the last Ecopath model run
Public propertyEcosimArenaManager
Public propertyEcosimEnviroResponseManager
Public propertyEcosimFitToTimeSeries
Get the Ecosim Fit to Time Series manager.
Public propertyEcosimFleetInputs
Ecosim Fleet inputs.
Public propertyEcosimFleetOutput
Ecosim Fleet summary results from last Ecosim run.
Public propertyEcoSimGroupInputs
Get a Ecosim input group for a given group index.
Public propertyEcoSimGroupOutputs
Get a Ecosim output group for a given group index.
Public propertyEcoSimModelParameters
Get the Ecosim model parameters for the currently loaded Ecosim scenario.
Public propertyEcosimMonteCarlo
Get the EcosimMonte Carlo manager.
Public propertyEcosimScenarioCount Obsolete.
Public propertyEcosimScenarios
Get an Ecosim scenario from the available scenarios.
Public propertyEcosimStats
Statistics from the last Ecosim model run
Public propertyEcospaceBasemap
Get the Ecospace base map for the currently loaded Ecospace scenario.
Public propertyEcospaceFleetInputs
Get a Ecospace fleet for a given index.
Public propertyEcospaceFleetOutput
Ecospace Fleet summary results from last Ecospace run.
Public propertyEcospaceFleets Obsolete.
Public propertyEcospaceGroupInputs
Get a Ecospace group for a given index.
Public propertyEcospaceGroupOutput
Results from last Ecospace run by group
Public propertyEcospaceGroups Obsolete.
Public propertyEcospaceHabitats
Get a Ecospace habitat for a given index.
Public propertyEcospaceModelParameters
Get the Ecospace model parameters for the currently loaded Ecospace scenario.
Public propertyEcospaceMPAs
Get a Ecospace MPA for a given index.
Public propertyEcospacePaused
Public propertyEcospaceRegionOutput
Ecospace region summary results from last Ecospace run.
Public propertyEcospaceScenarioCount Obsolete.
Public propertyEcospaceScenarios
Get an Ecospace scenario from the available scenarios.
Public propertyEcospaceStats
Statistics from the last Ecospace model run
Public propertyEcospaceTimeSeriesManager
Public propertyEcotracerGroupInputs
Get an Ecotracer group input.
Public propertyEcotracerGroupResults
Public propertyEcotracerModelParameters
Get the model parameters object for the current loaded Ecotracer scenario.
Public propertyEcotracerRegionGroupResults
Public propertyEcotracerScenarioCount Obsolete.
Public propertyEcotracerScenarios
Get an Ecotracer scenario.
Public propertyEggProdShapeManager
Public propertyEnviroResponseShapeManager
Public propertyEwEModel
Returns the EwE model for the current loaded data source.
Public propertyFishingEffortShapeManager
Public propertyFishingPolicyManager
Public propertyFishMortShapeManager
Public propertyFleetInputs Obsolete.
Public propertyForcingShapeManager
Public propertyGameManager
Public propertyLandingsShapeManager
Public propertyMediatedInteractionManager
Public propertyMediationShapeManager
Public propertyMessages
Exposes the MessagePublisher instance so that an interface can add message handlers to the message publisher
Public propertyMPAOptimizationManager
Public propertyMSEBatchManager
Public propertyMSEManager
Public propertyMSYManager
Public propertynAgeSteps
Public propertynCapacityMaps
Get the number of capacity maps .
Public propertynDetritusGroups
Number of detritus groups across all models.
Public propertynEcosimScenarios
Returns the number of Ecosim scenarios in the currently loaded model
Public propertynEcosimTimeSteps
Number of time steps in an Ecosim run.
Public propertynEcosimYears
Number of years to run an Ecosim model.
Public propertynEcospaceResultWriters
Public propertynEcospaceScenarios
Gets the number of available Ecospace scenarios for the loaded model.
Public propertynEcospaceTimeSteps
Number time steps in an Ecospace model.
Public propertynEcospaceYears
Number of years to run an Ecospace model.
Public propertynEcotracerScenarios
Get the number of available Ecotracer scenarios in the current loaded model.
Public propertynEnvironmentalDriverLayers
Number of Ecospace environmental driver layers.
Public propertynEnvironmentalLayers Obsolete.
Public propertynFleets
Number of fishing fleets across all models.
Public propertynGroups
Total number of groups across all models.
Public propertynHabitats
Number of Ecospace habitats.
Public propertynImportanceLayers
Number of Ecospace Importance layers.
Public propertynLivingGroups
Number of living groups across all models.
Public propertynMaxStanza
Max number of groups in a single stanza configuration over all stanza groups.
Public propertynMPAs
Number of Ecospace MPAs.
Public propertynPedigreeVariables
Get the number of pedigree variables.
Public propertynRegions
Number of Ecospace regions.
Public propertynStanzas
Number of stanza configurations.
Public propertynTaxon
Get the number of taxonomy groups.
Public propertynTimeSeries
Number of available time series.
Public propertynTimeSeriesDatasets
Public propertynTimeSeriesEnabled
Number of applied time series.
Public propertynTimeSeriesYears
Number of applied time series.
Public propertynWeightClasses
Public propertyOutputPath
Get/set the path for core processes to write output information to.
Public propertyParticleSizeDistributionParameters
Returns the EwE model for the current loaded data source.
Public propertyPluginManager
Get/set the Plug-in manager that the core must use for accessing plug-ins.
Public propertySaveWithFileHeader
Flag, stating whether results should be saved with header information.
Public propertySearchObjective
Public propertySpatialDataConnectionManager
Public propertySpatialOperationLog
Public propertyStanzaGroups
Return a stanza group from the core.
Public propertyStartBiomass
Start biomass of each group
Public propertyStateManager
Returns the state manager that provides methods to bring the core execution state up-to-date.
Public propertyStateMonitor
Returns the state monitor that reflects the running state and data state of this core instance.
Public propertyTaxon
Get a taxon for a given index.
Public propertyStatic memberVersion
Get the Core assembly version, formatted as a string.
Top
Methods
  NameDescription
Public methodAbsoluteTimeToEcospaceTimestep
Convert an absolute time to an Ecospace time step.
Public methodAddEcospaceDriverLayer
Add a driver layer to the current data source.
Public methodAddEcospaceHabitat
Add an Ecospace habitat to the current data source.
Public methodAddEcospaceImportanceLayer
Add an Ecospace importance layer to the current data source.
Public methodAddEcospaceMPA
Add an Ecospace MPA to the current data source.
Public methodAddEcospaceTimeStepHandler
Public methodAddFleet
Add a Fleet to the system.
Public methodAddGroup
Add a Group
Public methodAddPedigreeLevel
Add a pedigree level to a loaded EwE model.
Public methodAddStanzaLifestage
Add a group to a stanza configuration as a life stage.
Public methodAddTaxon
Add a taxonomy definition to an Ecopath group.
Public methodAddTimeSeries(String, Int32, eTimeSeriesType, Single, Single, Int32) Obsolete.
Add an Ecosim Time Series to the data source.
Public methodAddTimeSeries(String, Int32, Int32, eTimeSeriesType, Single, Single, Int32)
Add an Ecosim Time Series to the data source.
Public methodAppendStanza
Adds a stanza group to the data source.
Public methodAppendTimeSeriesDataset
Append a time series dataset to the core.
Public methodCalcEcosimVulBo
Public methodCalcEcosimVulFMax
Public methodCalcEcospaceCostOfSailing
Recalculate the Ecospace distance sailing cost map for all fleets.
Public methodCanSave
Checks if the underlying datasource can be saved.
Public methodCanStopRun
Check wether a means to stop any running process is in place.
Public methodCheckExternalSpatialTemporalData
Check whether the spatial/temporal data set-up is valid.
Public methodCheckHabitats
Has the capacity been set to a reasonable level for all groups.
Public methodCheckMigrationMapsSet
Public methodCheckResetDefaultVulnerabilities
Check if Ecosim has non-default vulnerabilities, and if so, reset the vulnerabilties.
Public methodClearEcospacePort
Clear port cells for a given fleet.
Public methodClearExcludedCells
Clear excluded cells.
Public methodCloseEcosimScenario
Public methodCloseEcospaceScenario
Public methodCloseEcotracerScenario
Public methodCloseModel
Close the Ecopath model and terminate the core.
Public methodDefaultFileHeader(eAutosaveTypes, Int32)
Returns a default file header for text files for a given auto-save type, representing loaded aspects of ecopath, ecosim, ecospace and ecotracer, where applicable. This header block can be integrated in CSV files.
Public methodDefaultFileHeader(XmlDocument, eAutosaveTypes, Int32)
Returns a default file header for XML files for a given auto-save type, representing loaded aspects of ecopath, ecosim, ecospace and ecotracer, where applicable. This header block can be integrated in XML files.
Public methodDiscardChanges
Discard any unsaved data change flags.
Public methodDispose
Releases all resources used by the cCore
Public methodEcosimFirstYear
Returns the start year for Ecosim
Public methodEcosimOutputs
Get outputs of the last Ecosim run
Public methodEcosimTimeSeries
Obtain a cTimeSeries-derived instance from the core.
Public methodEcospaceTimestepToAbsoluteTime
Convert an Ecospace time step to absolute time.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodEstimateVulnerabilities
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetCoreCounter
Returns the value the Core holds for a given eCoreCounterTypes enumerator. These values are referred to as Core Counters.
Public methodGetDataDescription
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetPedigreeManager
Returns the pedigree manager for a given variable name.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasAppliedTimeSeries
Helper method, states whether the model has time series applied.
Public methodHasChanges
Check whether the EwE data needs saving.
Public methodHasTimeSeries
Helper method, states whether the model has time series loaded.
Public methodHasUnusedShapeData
Returns whether Ecosim has unused shape data - shape data allocated by earlier, longer Ecosim runs - that is currently not used. This data can be trimmed via TrimUnusedShapeData.
Public methodImportEcosimTimeSeries
Import one time series into the database.
Public methodInvertExcludedCells
Clear excluded cells.
Public methodIsModelBalanced
Public methodIsPedigreeVariableSupported
States whether pedigree is supported for a given variable.
Public methodLoadEcosimScenario(Int32)
Load an Ecosim scenario from the current Data Source.
Public methodLoadEcosimScenario(cEcoSimScenario)
Load an Ecosim scenario from the current Data Source.
Public methodLoadEcospaceScenario(Int32)
Load an Ecospace scenario from the current Data Source.
Public methodLoadEcospaceScenario(cEcospaceScenario)
Load an Ecospace scenario from the current Data Source.
Public methodLoadEcotracerScenario(Int32)
Load an Ecotracer scenario from the current Data Source.
Public methodLoadEcotracerScenario(cEcotracerScenario)
Load an Ecotracer scenario from the current Data Source.
Public methodLoadModel(String)
Load the Ecopath model from a given file.
Public methodLoadModel(IEwEDataSource)
Load the Ecopath model from a given Datasource.
Public methodLoadTimeSeries(Int32, Boolean)
Load (and optionally apply) a single time series dataset
Public methodLoadTimeSeries(cTimeSeriesDataset, Boolean)
Load (and optionally apply) a single time series dataset
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMoveDriverLayer
Move a cEcospaceLayerDriver to a new position in the EwE model.
Public methodMoveEcospaceHabitat
Public methodMoveEcospaceMPA
Public methodMoveFleet
Public methodMoveGroup
Move a group to a new position in the EwE model.
Public methodMovePedigreeLevel
Move a pedigree level to a new location in the pedigree levels list.
Public methodNewEcosimScenario
Creates and loads a new Ecosim scenario.
Public methodNewEcospaceScenario
Creates and loads a new Ecospace scenario.
Public methodNewEcotracerScenario
Creates and loads a new Ecotracer scenario.
Public methodNormalizeDietInput
Normalize ecopath input values
Public methodNormalizeQuotaShare
Normalize MSE QuotaShare values
Public methodNormalizeTaxonProportions
Public methodonChanged
Interface for non-cCoreInputOutputBase object to report changes to the core
Public methodOnSettingsChanged
Send out a notification that core settings have changed.
Public methodPedigreeVariable
Returns the variable at a given variable index.
Public methodPedigreeVariableIndex
Returns the index of a pedigree variable, or -1 if pedigree is not supported for the variable.
Public methodReleaseBatchLock
End a batch operation of additions and removals of Core objects. Relevant data is reloaded and all locked messages will be sent to allow listening user interfaces to catch up.
Public methodRemoveEcosimScenario(Int32)
Remove a Ecosim Scenario from the current Data Source.
Public methodRemoveEcosimScenario(cCoreInputOutputBase)
Remove a Ecosim Scenario from the current Data Source.
Public methodRemoveEcospaceDriverLayer
Remove a driver layer from the current data source.
Public methodRemoveEcospaceHabitat
Remove an Ecospace habitat from the current data source.
Public methodRemoveEcospaceImportanceLayer
Remove an Ecospace habitat from the current data source.
Public methodRemoveEcospaceMPA
Remove an Ecospace MPA from the current data source.
Public methodRemoveEcospaceScenario(Int32)
Remove a Ecospace Scenario from the current Data Source.
Public methodRemoveEcospaceScenario(cCoreInputOutputBase)
Remove a Ecospace Scenario from the current Data Source.
Public methodRemoveEcospaceTimeStepHandler
Public methodRemoveEcotracerScenario(Int32)
Remove a Ecotracer Scenario from the current Data Source.
Public methodRemoveEcotracerScenario(cCoreInputOutputBase)
Remove a Ecotracer Scenario from the current Data Source.
Public methodRemoveFleet
Public methodRemoveGroup
Remove a group from the EwE model.
Public methodRemovePedigreeLevel
Remove an existing pedigree level.
Public methodRemoveStanza
Remove a stanza group from the data source.
Public methodRemoveStanzaLifestage
Remove a life stage from a stanza configuration.
Public methodRemoveTaxon
Remove a taxonomy definition from an Ecopath group.
Public methodRemoveTimeSeries(Int32)
Remove an Ecosim Time Series from the data source.
Public methodRemoveTimeSeries(cTimeSeries)
Remove an Ecosim Time Series from the data source.
Public methodRemoveTimeSeriesDataset(Int32)
Public methodRemoveTimeSeriesDataset(cTimeSeriesDataset)
Public methodResetMSEGroupRefLevels
Public methodResizeEcospaceBasemap
Change the size of the Ecospace base map to a new number of rows and columns.
Public methodRunEcoPath
Run the EcoPath model.
Public methodRunEcoPath(Boolean)
Run the EcoPath model.
Public methodRunEcoSim
Launch an Ecosim run.
Public methodRunEcoSpace
Run the Ecospace model with the currently loaded Ecosim and Ecospace scenario
Public methodSampleManager
Returns the only instance of the cEcopathSampleManager.
Public methodSave
Save the data of all models.
Public methodSaveChanges
Public interface to save changes.
Public methodSaveEcosimScenario
Saves the current Ecosim scenario.
Public methodSaveEcosimScenarioAs
Saves the current ecosim scenario under a new name.
Public methodSaveEcospaceScenario
Public methodSaveEcospaceScenarioAs
Save the current ecospace scenario under a new name.
Public methodSaveEcotracerScenario
Save the current Ecotracer scenario.
Public methodSaveEcotracerScenarioAs
Save the current ecotracer scenario under a new name.
Public methodScaleVulnerabilitiesToTL
Ecosim scale vulnerabilities by trophic level.
Public methodSetBatchLock
Begin a batch operation of additions and removals of Core objects. All messages will be locked while a batch operation is active.
Public methodsetDefaultCatchabilities
Public methodSetDefaultMSERecruitment
Set MSE QuotaShare values to default
Public methodSetDefaultQuotaShare
Set MSE QuotaShare values to default
Public methodSetDefaultTFM
Public methodSetEcospaceAllCoastToPort
Set all coastal cells to ports for a given fleet.
Public methodSetExcludedDepth
Set all coastal cells to ports for a given fleet.
Public methodSetFtimeFromGear
Public methodSetMessagePumpDelegate
Sets a delegate that a Manager can use to pump messages in the interface waiting for a process/thread to complete.
Public methodSetStopRunDelegate
Provide the delegate that the core can call to stop any running process.
Public methodSetVToDefault
Public methodStopEcoSim
Stop a running EcoSim model
Public methodStopEcospace
Stop a running EcoSpace model.
Public methodStopRun
Stop any running process, if possible.
Public methodTaxonAnalysis
Public methodTimeSeriesDataset
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTrimUnusedShapeData
Trim forcing functions to the Ecosim number of time steps. To determine if there is unused shape data check HasUnusedShapeData.
Public methodUpdateTimeSeries
Apply all Time Series that are flagged as Enabled to the Ecosim model.
Top
Fields
  NameDescription
Public fieldm_EcoSpaceData
Public fieldStatic memberMAX_AGE
The maximum age of a stanza life stage.
Public fieldStatic memberMAX_RUN_LENGTH
Max number of years ecosim or ecospace can run for
Public fieldStatic memberN_MONTHS
The number of months in a year.
Public fieldStatic memberNULL_VALUE
The NULL or 'no data' value for values maintained in the EwE Core.
Top
Extension Methods
  NameDescription
Public Extension MethodValue
Extension method; extract a value from an object by property name.
(Defined by Extensions.)
Top
Remarks

This class provides a wrapper for the underlying EcoPath, EcoSim and EcoSpace models.

The underlying model data structures have been converted into classes that an interface can program against. For instance, cEcopathFleetInput is the representation of a fishing fleet.

The EcopathFleetInputsInt32(iFleet) property provides a way for a user interface to interact with the underlying data structures that represent a fishing fleet without having to understand the modeling array structures.

Most conversions from interface objects (cEcopathFleetInput or cEcoSimResults) into model data structures are handled by the core.

Data structures for each model that need to be made public for setting of parameters or storing to file are held in a wrapper class for each model (cEcopathDataStructures or cEcosimDatastructures). These classes provide a thin wrapper, and a means to pass data back and forth between each other and a data source.

See Also