示例#1
0
 def __init__(self):
     ##CONST CODE AREA
     self.CLIPS_FILE_LOAD_FAILED_CODE = 404
     self.CLIPS_FILE_LOAD_SUCCESS_CODE = 200
     self.codetype = sys.getfilesystemencoding()
     ##GLOBAL_AREA
     self.file_pointers = 1  # sim.data file read position
     self.m_nCount = 0
     self.data_file_name = TEMP_FILE_PREFIX + 'test_flight_facts.dat'
     self.clips_dribble_filename = TEMP_FILE_PREFIX + 'record.dat'
     self.clips_env = clips.Environment()
     self.engine = clips
     self.filemodel = FileModel()
     self.fact_filename = ''
     ## fact dataframe
     self.data = np.array([])
     self.data_header = np.array([])
     # self.dataframe = pd.DataFrame
     ## mapper
     self.mapper_list = []  # Template and slot mapping pair list
     self.record_name = ''  # Reasoning result record file name
示例#2
0
print "\t\t\t\t-----------------------------------------------"
print "\t\t\t\t PID Tuning with Artificial Intelegence method"
print "\t\t\t\t             Tower Copter Control"
print "\t\t\t\t               M.Imam Muttaqin"
print "\t\t\t\t-----------------------------------------------"
print "\t\t\t\t Select Mode > 1.Automatic (use default-conf)"
print "\t\t\t\t             > 2.Genetic Algorithm (Hard Tune)"
print "\t\t\t\t             > 3.Neural Network (Soft Tune)"
print "\t\t\t\t             > 4.TensorFlow (Soft Tune)"
print "\t\t\t\t             > 5.NN Predict"
print "\t\t\t\t             > 99.Exit"

i_mode = input("\t\t\t\t             : ")

name_model = raw_input("Enter name of models: ")
file_model = FileModel(name_model)

if i_mode == 1:
    ga(True)
    nn()
elif i_mode == 2:
    ga()
elif i_mode == 3:
    nn()
elif i_mode == 4:
    keras()
elif i_mode == 5:
    nn_predict()
else:
    sys.exit()