Created
December 28, 2018 09:03
-
-
Save eponkratova/b7940aeb66bda8aaf6340027cc6dff7a to your computer and use it in GitHub Desktop.
initiating_gis_6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def name_units(self, names): | |
""" | |
Provide names for units for presentation purposes | |
:param names: a list of names, equal in length to the number of units | |
:return: nothing | |
""" | |
assert(self.n == len(names)) | |
self.names = names | |
def fit(self): | |
global not_efficient, alls | |
""" | |
Optimize the dataset, generate basic table | |
:return: table | |
""" | |
self.__optimize() # optimize | |
print("---------------------------\n") | |
efficient = {} | |
not_efficient = {} | |
alls = {} | |
for n, eff in enumerate(self.efficiency): | |
if eff >= 1.: | |
efficient.update({self.names[n]: eff[0]}) | |
else: | |
not_efficient.update({self.names[n]: eff[0]}) | |
for n, eff in enumerate(self.efficiency): | |
alls.update({self.names[n]: eff[0]}) | |
print("Efficient units:") | |
print(str(efficient).replace("{","").replace("}", "")) | |
print("\n") | |
print("Inefficient units:") | |
print(str(not_efficient).replace("{","").replace("}", "")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment