IN-CORE / pyincore

pyIncore is a component of IN-CORE. It is a python package consisting of two primary components: 1) a set of service classes to interact with the IN-CORE web services, and 2) IN-CORE analyses . The pyIncore allows users to apply various hazards to infrastructure in selected areas, propagating the effect of physical infrastructure damage and loss of functionality to social and economic impacts.
Mozilla Public License 2.0
24 stars 7 forks source link

port shelby cge #102

Open diegoac2 opened 2 years ago

diegoac2 commented 2 years ago

Port Shelby CGE code provided by Tao Lu

longshuicy commented 2 years ago

code recieved but running failed with my exiting ipopt and environment LSEQ1(H) Traceback (most recent call last): File "/Users/cwang138/Documents/INCORE-2.0/PY_shelby/shelby_CES_September_21_2020.py", line 2074, in run_solver(filename, tmp) File "/Users/cwang138/Documents/INCORE-2.0/PY_shelby/shelby_CES_September_21_2020.py", line 1995, in run_solver set_equation(cons_filename) File "/Users/cwang138/Documents/INCORE-2.0/PY_shelby/shelby_CES_September_21_2020.py", line 1687, in set_equation print(LSEQ1.test(vars.initialVals)) File "/Users/cwang138/Documents/INCORE-2.0/PY_shelby/shelby/Equationlib.py", line 830, in test print(i,j,fun(x)) File "/Users/cwang138/Documents/INCORE-2.0/PY_shelby/shelby/Equationlib.py", line 829, in fun = lambda x: eval( self.m[i][j].debug_test_str() ) RecursionError: maximum recursion depth exceeded during compilation

But conda environment provided and I will try installing that and see how it goes.

longshuicy commented 2 years ago

code works after increase the recursion limit

import sys
sys.setrecursionlimit(10000)