Greet 2014
Documentation for the GREET 2014 API
 All Classes Namespaces Functions Variables Enumerations Properties Events
Greet.DataStructureV3.Interfaces.IDataHelper Interface Reference

Class used to manipulate the data without having to worry about too many details and dependencies More...

Inheritance diagram for Greet.DataStructureV3.Interfaces.IDataHelper:
Greet.DataStructureV3.DataHelper

Public Member Functions

void addInputToBiogenicCarbonMatrix (Dictionary< Guid, Dictionary< Guid, double >> CarbonTransferts, IInput input)
 Tests if a transfer value can be added for that new input (i.e. if we already have some outputs defined) Otherwise do not change anything to the transfert matrix More...
 
void addInputToBiogenicCarbonMatrix (IProcess process, IIO output)
 
IIO createNewCoProduct (int resourceId, double amount=0, string quantity="joules")
 Creates a new output if the resource ID exists in the database, returns null otherwise More...
 
IInput createNewInput (int resourceId, double amount=0, string quantity="joules", int source=0)
 Creates a new input if resource ID exists in the database, returns null otherwise More...
 
IIO createNewMainOutput (int resourceId, double amount=0, string quantity="joules")
 Creates a new output if the resource ID exists in the database, returns null otherwise More...
 
IPathway createNewPathway (string name="")
 Creates a new instance of a Pathway WITHOUT adding it to the dataset More...
 
IProcess createNewProcess (int type, string name="")
 Creates a new instance of a process either stationary or transportation More...
 
IResource createNewResource (string name="")
 Creates a new instance of a resource given a name for that resource More...
 
IMix DuplicateMix (IMix mix)
 Creates a new instance of a mix with a new ID and new output ID Takes care of registering all parameters and assiging new IDs More...
 
IPathway DuplicatePathway (IPathway o)
 Creates a copy of a pathway with an identical structure but a whole new set of IDs More...
 
IStationaryProcess DuplicateStationaryProcess (IStationaryProcess stationaryProcess)
 Creates a copy of a stationary process with an identical structure but new IDs and parameters More...
 
ITransportationProcess DuplicateTransportationProcess (ITransportationProcess transportationProcess)
 Creates a copy of a transportation process with an identical structure but new IDs and parameters More...
 
bool insertOrUpdatePathway (IPathway pathway, out string errorMessage)
 Tries to insert a pathway in the database, checks for validity before insertion If a pathway with the same ID is already inserted, then overwrites the existing one with the new pathway given as a parameter More...
 
bool insertOrUpdateProcess (IProcess process, out string errorMessage)
 Tries to insert a process in the database, checks for validity before insertion If a process with the same ID is already inserted, then overwrites the existing one with the new process given as a parameter More...
 
bool insertOrUpdateProcessOutput (IProcess process, IIO output, out string errorMessage)
 
bool insertOrUpdateResource (IResource resource)
 Inserts a new resource in the database or replace the one with the same ID if it already exists More...
 
bool insertProcessInput (IProcess process, IInput input, bool toGroup, out string errorMessage)
 
List< IDependentItemmixDependentItems (IDependentItem idi)
 List of all data that is dependent on the inputted object. More...
 
List< IDependentItemPathwayDependentItems (IDependentItem pathway, Guid output=new Guid())
 List all instances that are dependent of the Pathway passed as a argument More...
 
int PathwayMainOutputResouce (int pathwayID)
 This is a list of all mixes and pathways that output a given resource. More...
 
List< IDependentItemProcessDependentItems (IDependentItem idi, Guid io=new Guid())
 Checks if a process is used in pathways, if the io Guid is provided we'll only check for the specified io otherwise we'll check for any of the input or outputs. More...
 
List< IInputResourceReferenceProduceResource (int resourceId)
 This is a list of all mixes and pathways that output a given resource. More...
 
void removeInputToBiogenicCarbonMatrix (Dictionary< Guid, Dictionary< Guid, double >> CarbonTransferts, Guid guid)
 Removes the carbon transfer ratio associated with an input Guid More...
 
List< IDependentItemresourceDependentItems (IDependentItem r)
 List of all data that is dependent on the inputted object. More...
 
List< IDependentItemTechnologyDependentItems (IDependentItem idi)
 
List< int > unUsed ()
 
List< int > unUsedMixes ()
 This method returns a list of mixes that are un-used by other parts of the sofware. In other words there is no other entitiy in Greet that is dependent on these mixes. More...
 
List< int > unUsedPathways ()
 This method returns a list of pathways that are un-used by other parts of the sofware. In other words there is no other entitiy in Greet that is dependent on these pathways. More...
 
List< int > unUsedResources ()
 This method returns a list of resources that are un-used by other parts of the sofware. In other words there is no other entitiy in Greet that is dependent on these resources. More...
 
List< int > unUsedTechnologies ()
 
List< int > unUsedVehicles ()
 This method returns a list of vehicles that are un-used by other parts of the sofware. In other words there is no other entitiy in Greet that is dependent on these vehicles. More...
 
List< int > usedMixes ()
 This method returns a list of mixes that are used by other parts of the software. In other words there are entities in Greet dependent on the exisitence of these mixes. More...
 
List< int > usedPathways ()
 This method returns a list of pathways that are used by other parts of the software. In other words there are entities in Greet dependent on the exisitence of these pathways. More...
 
List< int > usedProcesses ()
 
List< int > usedResources ()
 This method returns a list of resources that are used by other parts of the software. In other words there are entities in Greet dependent on the exisitence of these resources. More...
 
List< int > usedTechnologies ()
 
List< int > usedVehicles ()
 This method returns a list of vehicles that are used by other parts of the software. In other words there are entities in Greet dependent on the exisitence of these vehicles. More...
 
List< IDependentItemVehicleDependentItems (IDependentItem idi)
 List of all data that is dependent on the inputted object. More...
 

Detailed Description

Class used to manipulate the data without having to worry about too many details and dependencies

Member Function Documentation

void Greet.DataStructureV3.Interfaces.IDataHelper.addInputToBiogenicCarbonMatrix ( Dictionary< Guid, Dictionary< Guid, double >>  CarbonTransferts,
IInput  input 
)

Tests if a transfer value can be added for that new input (i.e. if we already have some outputs defined) Otherwise do not change anything to the transfert matrix

Parameters
CarbonTransfertsReference to an instance of a CarbonTransferMatrix
inputInput beeing added

Implemented in Greet.DataStructureV3.DataHelper.

void Greet.DataStructureV3.Interfaces.IDataHelper.addInputToBiogenicCarbonMatrix ( IProcess  process,
IIO  output 
)

Adds an output ratio to the carbon transfer ratio matrix.

Also adds all inputs that may be added if necessary

Parameters
processprocess for which we want to add an output
outputthe output beeing added to the process

Implemented in Greet.DataStructureV3.DataHelper.

IIO Greet.DataStructureV3.Interfaces.IDataHelper.createNewCoProduct ( int  resourceId,
double  amount = 0,
string  quantity = "joules" 
)

Creates a new output if the resource ID exists in the database, returns null otherwise

Parameters
resourceIdID of an existing resource
amountDesign amount for the output
quantityQuantity for the design amount
Returns
New instance of Output or null

Implemented in Greet.DataStructureV3.DataHelper.

IInput Greet.DataStructureV3.Interfaces.IDataHelper.createNewInput ( int  resourceId,
double  amount = 0,
string  quantity = "joules",
int  source = 0 
)

Creates a new input if resource ID exists in the database, returns null otherwise

Parameters
resourceIdID of an existing resource
amountDesign amount for the input
quantityQuantity for the design amount
sourceSource of the input, 0=Well, 1=Previous, 2=Pathway, 3=Mix
Returns
New instance of Input or null

Implemented in Greet.DataStructureV3.DataHelper.

IIO Greet.DataStructureV3.Interfaces.IDataHelper.createNewMainOutput ( int  resourceId,
double  amount = 0,
string  quantity = "joules" 
)

Creates a new output if the resource ID exists in the database, returns null otherwise

Parameters
resourceIdID of an existing resource
amountDesign amount for the output
quantityQuantity for the design amount
Returns
New instance of Output or null

Implemented in Greet.DataStructureV3.DataHelper.

IPathway Greet.DataStructureV3.Interfaces.IDataHelper.createNewPathway ( string  name = "")

Creates a new instance of a Pathway WITHOUT adding it to the dataset

Parameters
nameOptional name for the created pathway
Returns
New instance of pathway

Implemented in Greet.DataStructureV3.DataHelper.

IProcess Greet.DataStructureV3.Interfaces.IDataHelper.createNewProcess ( int  type,
string  name = "" 
)

Creates a new instance of a process either stationary or transportation

Parameters
type0 for stationary, 1 for transportation
nameOptional name for the newly created process
Returns
Null if type is not 0 nor 1, otherwise an instance of a new Process

Implemented in Greet.DataStructureV3.DataHelper.

IResource Greet.DataStructureV3.Interfaces.IDataHelper.createNewResource ( string  name = "")

Creates a new instance of a resource given a name for that resource

Parameters
nameOptional name for the resource
Returns
New instance of the created resource

Implemented in Greet.DataStructureV3.DataHelper.

IMix Greet.DataStructureV3.Interfaces.IDataHelper.DuplicateMix ( IMix  mix)

Creates a new instance of a mix with a new ID and new output ID Takes care of registering all parameters and assiging new IDs

Parameters
mixThe mix to be duplicated
Returns
A new instance of the mix

Implemented in Greet.DataStructureV3.DataHelper.

IPathway Greet.DataStructureV3.Interfaces.IDataHelper.DuplicatePathway ( IPathway  o)

Creates a copy of a pathway with an identical structure but a whole new set of IDs

Parameters
o
Returns

Implemented in Greet.DataStructureV3.DataHelper.

IStationaryProcess Greet.DataStructureV3.Interfaces.IDataHelper.DuplicateStationaryProcess ( IStationaryProcess  stationaryProcess)

Creates a copy of a stationary process with an identical structure but new IDs and parameters

Parameters
stationaryProcessThe process to be duplicated
Returns
The new instance of a duplicated process

Implemented in Greet.DataStructureV3.DataHelper.

ITransportationProcess Greet.DataStructureV3.Interfaces.IDataHelper.DuplicateTransportationProcess ( ITransportationProcess  transportationProcess)

Creates a copy of a transportation process with an identical structure but new IDs and parameters

Parameters
transportationProcessThe process to be duplicated
Returns
The new instance of a duplicated process

Implemented in Greet.DataStructureV3.DataHelper.

bool Greet.DataStructureV3.Interfaces.IDataHelper.insertOrUpdatePathway ( IPathway  pathway,
out string  errorMessage 
)

Tries to insert a pathway in the database, checks for validity before insertion If a pathway with the same ID is already inserted, then overwrites the existing one with the new pathway given as a parameter

Parameters
pathwayPathway to be inserted
errorMessageError messages if any when checking the integrity of that pathway
Returns
True if pathway inserted correctly without any issues

Implemented in Greet.DataStructureV3.DataHelper.

bool Greet.DataStructureV3.Interfaces.IDataHelper.insertOrUpdateProcess ( IProcess  process,
out string  errorMessage 
)

Tries to insert a process in the database, checks for validity before insertion If a process with the same ID is already inserted, then overwrites the existing one with the new process given as a parameter

Parameters
processProcess to be inserted
errorMessageError messages if any when checking the integrity of that process
Returns

Implemented in Greet.DataStructureV3.DataHelper.

bool Greet.DataStructureV3.Interfaces.IDataHelper.insertOrUpdateProcessOutput ( IProcess  process,
IIO  output,
out string  errorMessage 
)

If the output is a MainOutput, sets or update the existing main output of the process

If the output is a CoProduct, adds or update an existing co-product that outputs the same resource ID

Parameters
processProcess to which we want to add an output(Main output or co-product)
outputOutput to be added to the process
errorMessageError messages if any errors
Returns
True if inserted or updated, false otherwise

Implemented in Greet.DataStructureV3.DataHelper.

bool Greet.DataStructureV3.Interfaces.IDataHelper.insertOrUpdateResource ( IResource  resource)

Inserts a new resource in the database or replace the one with the same ID if it already exists

Parameters
resourceThe new resource to be added or used as an update
Returns
True if insertion was done

Implemented in Greet.DataStructureV3.DataHelper.

bool Greet.DataStructureV3.Interfaces.IDataHelper.insertProcessInput ( IProcess  process,
IInput  input,
bool  toGroup,
out string  errorMessage 
)

Inserts an input to a StationaryProcess only if the Input is either and InputWithShare or if the input is an Input

Parameters
processStationary process to which the input is going to be added
inputThe instance of an input to add to the process
toGroupIf input is an instance on Input, setting to true will add in process Group, ignored otherwise
errorMessageError message for insertion or errors detected in the process integrity after insertion
Returns
True if added to the process, false otherwise

Implemented in Greet.DataStructureV3.DataHelper.

List<IDependentItem> Greet.DataStructureV3.Interfaces.IDataHelper.mixDependentItems ( IDependentItem  idi)

List of all data that is dependent on the inputted object.

Parameters
pw
Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<IDependentItem> Greet.DataStructureV3.Interfaces.IDataHelper.PathwayDependentItems ( IDependentItem  pathway,
Guid  output = new Guid() 
)

List all instances that are dependent of the Pathway passed as a argument

Parameters
pathwayThe pathway for which we want to know all the dependencies
outputOptional GUID for the output that we want to test. If empty all outputs are considered
Returns

Implemented in Greet.DataStructureV3.DataHelper.

int Greet.DataStructureV3.Interfaces.IDataHelper.PathwayMainOutputResouce ( int  pathwayID)

This is a list of all mixes and pathways that output a given resource.

Parameters
resourceIdThe resource id whose list of possible ways is needed
Returns
The return type is a list of InputResourceReference's because this object can represent a pathway or a mix depending on the source attribute of the object

Implemented in Greet.DataStructureV3.DataHelper.

List<IDependentItem> Greet.DataStructureV3.Interfaces.IDataHelper.ProcessDependentItems ( IDependentItem  idi,
Guid  io = new Guid() 
)

Checks if a process is used in pathways, if the io Guid is provided we'll only check for the specified io otherwise we'll check for any of the input or outputs.

Parameters
idiProcess IDependentItem
ioSpecific IO GUID if necessary
Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<IInputResourceReference> Greet.DataStructureV3.Interfaces.IDataHelper.ProduceResource ( int  resourceId)

This is a list of all mixes and pathways that output a given resource.

Parameters
resourceIdThe resource id whose list of possible ways is needed
Returns
The return type is a list of InputResourceReference's because this object can represent a pathway or a mix depending on the source attribute of the object

Implemented in Greet.DataStructureV3.DataHelper.

void Greet.DataStructureV3.Interfaces.IDataHelper.removeInputToBiogenicCarbonMatrix ( Dictionary< Guid, Dictionary< Guid, double >>  CarbonTransferts,
Guid  guid 
)

Removes the carbon transfer ratio associated with an input Guid

Parameters
dictionaryReference to an instance of a CarbonTransferMatrix
inputID of Input beeing removed

Implemented in Greet.DataStructureV3.DataHelper.

List<IDependentItem> Greet.DataStructureV3.Interfaces.IDataHelper.resourceDependentItems ( IDependentItem  r)

List of all data that is dependent on the inputted object.

Parameters
pw
Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<IDependentItem> Greet.DataStructureV3.Interfaces.IDataHelper.TechnologyDependentItems ( IDependentItem  idi)

Parameters
idi
Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<int> Greet.DataStructureV3.Interfaces.IDataHelper.unUsed ( )

Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<int> Greet.DataStructureV3.Interfaces.IDataHelper.unUsedMixes ( )

This method returns a list of mixes that are un-used by other parts of the sofware. In other words there is no other entitiy in Greet that is dependent on these mixes.

Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<int> Greet.DataStructureV3.Interfaces.IDataHelper.unUsedPathways ( )

This method returns a list of pathways that are un-used by other parts of the sofware. In other words there is no other entitiy in Greet that is dependent on these pathways.

Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<int> Greet.DataStructureV3.Interfaces.IDataHelper.unUsedResources ( )

This method returns a list of resources that are un-used by other parts of the sofware. In other words there is no other entitiy in Greet that is dependent on these resources.

Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<int> Greet.DataStructureV3.Interfaces.IDataHelper.unUsedTechnologies ( )

Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<int> Greet.DataStructureV3.Interfaces.IDataHelper.unUsedVehicles ( )

This method returns a list of vehicles that are un-used by other parts of the sofware. In other words there is no other entitiy in Greet that is dependent on these vehicles.

Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<int> Greet.DataStructureV3.Interfaces.IDataHelper.usedMixes ( )

This method returns a list of mixes that are used by other parts of the software. In other words there are entities in Greet dependent on the exisitence of these mixes.

Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<int> Greet.DataStructureV3.Interfaces.IDataHelper.usedPathways ( )

This method returns a list of pathways that are used by other parts of the software. In other words there are entities in Greet dependent on the exisitence of these pathways.

Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<int> Greet.DataStructureV3.Interfaces.IDataHelper.usedProcesses ( )

Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<int> Greet.DataStructureV3.Interfaces.IDataHelper.usedResources ( )

This method returns a list of resources that are used by other parts of the software. In other words there are entities in Greet dependent on the exisitence of these resources.

Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<int> Greet.DataStructureV3.Interfaces.IDataHelper.usedTechnologies ( )

Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<int> Greet.DataStructureV3.Interfaces.IDataHelper.usedVehicles ( )

This method returns a list of vehicles that are used by other parts of the software. In other words there are entities in Greet dependent on the exisitence of these vehicles.

Returns

Implemented in Greet.DataStructureV3.DataHelper.

List<IDependentItem> Greet.DataStructureV3.Interfaces.IDataHelper.VehicleDependentItems ( IDependentItem  idi)

List of all data that is dependent on the inputted object.

Parameters
veh
Returns

Implemented in Greet.DataStructureV3.DataHelper.


The documentation for this interface was generated from the following file: