I run SPaircraft.py and an error occurred, see the bold texts at the end of relaxed_constants.py file. Please help?
if i == (len(sol.program.gps) - 1):
print("WARNING: The final GP iteration had relaxation values more than 1")
_File ~/SPaircraft-master/turbofan/relaxed_constants.py:49
print("The final GP iteration had relaxation values > 1")
^
SyntaxError: invalid syntax
below is the codes in the relaxed_constants.py file:
print("Checking for relaxed constants...")
for i in range(len(sol.program.gps)):
varkeys = [k for k in sol.program.gps[i].varlocs if "Relax" in k.models and sol.program.gps[i].result(k) >= 1.00001]
if varkeys:
print("GP iteration %s has relaxed constants") % i
print(sol.program.gps[i].result.table(varkeys)
if i == (len(sol.program.gps) - 1):
print("The final GP iteration had relaxation values > 1")
I run SPaircraft.py and an error occurred, see the bold texts at the end of relaxed_constants.py file. Please help? if i == (len(sol.program.gps) - 1): print("WARNING: The final GP iteration had relaxation values more than 1")
_File ~/SPaircraft-master/turbofan/relaxed_constants.py:49 print("The final GP iteration had relaxation values > 1") ^ SyntaxError: invalid syntax
below is the codes in the relaxed_constants.py file: