7.1.1.2.1.1.1.1.1.1. pycropml.transpiler.antlr_py.bioma.biomaExtraction module

A simple Strategy class In the constructor (Parameters description, Input and Output name, category) In SetPublisherData method (author, institution) In Domain property (Composite name) In URL property (URL) In Description property (Description)

class pycropml.transpiler.antlr_py.bioma.biomaExtraction.BiomaExtraction[source]

Bases: MetaExtraction

description(tree)[source]
getAlgo(tree)[source]
getAllVar(tree, dclass)[source]

get metadata from strategy classes and varinfo domain classes

Parameters:
  • tree (Node) – list of varinfo domain classes transformed to Nodes

  • dclass (Node) – list of domain classes

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’: {…} …

}

getFromVarInfo(tree1, tree, dclass)[source]

get metadata from strategy classes and varinfo domain classes

Parameters:
  • tree1 (Node) – A strategy class transformed to Node

  • tree (Node) – list of varinfo domain classes transformed to Nodes

  • dclass (Node) – list of domain classes

Returns:

metadata (inputs, parameters, outputs)

Return type:

Tuple

getInit(tree)[source]
getStrategyVar(tree)[source]
This method returns a list of parameters and the value of their attributes

and the name and category of model inputs and outputs

Parameters:

tree (Node) – a tree where the parameters and inouts will be extracted

Returns:

list of parameters and the value of their attributes and the name of model inputs and outputs and their category

Return type:

list

instancePastCurrent(stra)[source]
model_desc(desc)[source]
modelcomposition(models, tree)[source]
modelunit(desc, var, all_var_pa, tvar, inps, outs)[source]
prec_cur_states(tree, past_current=[])[source]
static retrieve_var_member(var)[source]
totalvar(tree)[source]
pycropml.transpiler.antlr_py.bioma.biomaExtraction.categorize(cat)[source]
pycropml.transpiler.antlr_py.bioma.biomaExtraction.modVal(val)[source]