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:
+5
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user