Add New Algorithm

class Main.Accert(input_path, accert_path)
add_new_alg(c, alg_name, alg_for, alg_description, alg_python, alg_formulation, alg_units, variables, constants)

Adds a new algorithm into algorithm table based of the following parameters:

Parameters

cMySQLCursor

MySQLCursor class instantiates objects that can execute MySQL statements.

alg_namestr

Name of the algorithm.

alg_forstr

Whether the algorithm is for cost element or for variable.

alg_descriptionstr

Description of the algorithm.

alg_pythonstr

Python code of the algorithm. (Variables should be in the form of ‘var1’, ‘var2’, ‘var3’…)

alg_formulationstr

Prints info of the algorithm.

alg_unitsstr

Units of the output of algorithm.

variablesList[str]

Variables of the algorithm.

constantsList[str]

Constants of the algorithm.