6.1.1.2.1.1.1.1.1.1. pycropml.transpiler.antlr_py.apsim.apsimExtraction module

class pycropml.transpiler.antlr_py.apsim.apsimExtraction.ApsimExtraction[source]

Bases: MetaExtraction

getAlgo(tree)[source]

Get algorithm method from the tree

Parameters:

tree (Node) – ASG of the component

Returns:

ASG of the algorithm method

Return type:

Node

getAllVar(tree)[source]

get metadata from interfaces

Parameters:

tree (Node) – list of interfaces transformed to Nodes

Returns:

metadata (inputs, parameters, outputs)

Return type:

Tuple

Result:
{‘Q’: {‘Name’: b’Q’, ‘category’: ‘AuxiliaryVarInfo’, ‘Description’: b’Total moisture’,

‘MaxValue’: ‘100D’, ‘MinValue’: ‘0D’, ‘DefaultValue’: ‘50D’, ‘Units’: b’%’, ‘URL’: b’http://’, ‘ValueType’: ‘DOUBLE’},

‘Q2’: {…} …

}

getInit(tree)[source]

Get initialization method from the tree

Parameters:

tree (Node) – ASG of the component

Returns:

ASG of the initialization method

Return type:

Node

getInputs(tree)[source]
getOutputs(tree)[source]
getUtilities(tree)[source]
getUtilitiesFunctions(tree)[source]