A quick and hacky fix for main.py to make use of the new Parser object. Also, switched back to using a JSON file for input, can easily be swapped back though.

This commit is contained in:
2020-07-24 11:15:47 -05:00
parent 3cab3f03e8
commit a1c260d0fa
4 changed files with 56 additions and 22 deletions
+5 -2
View File
@@ -40,6 +40,9 @@ class Variable:
# Utilitie function to get the variable's type from it's name.
# For example, a variable with 'i' in its name is an Interest type.
# Returns the variable's type as a string or 'Unknown' otherwise.
if not variable_name in Variable.VARIABLE_TYPES:
if not variable_name[0] in Variable.VARIABLE_TYPES:
return "Unknown"
return Variable.VARIABLE_TYPES[variable_name]
return Variable.VARIABLE_TYPES[variable_name[0]]
def __str__(self):
return "Name: %s Type: %s Start: %f" %(self.name, Variable.get_variable_type(self.name), self.starting_point)