Hello, I am trying to use auto-keq function in cadet-match, but I got this keyError: “[‘MCL_KA/MCL_KD Comp:0 Bound:0’] not in index”
Could some one help solve this problem? Thanks.
Hello, I am trying to use auto-keq function in cadet-match, but I got this keyError: “[‘MCL_KA/MCL_KD Comp:0 Bound:0’] not in index”
Could some one help solve this problem? Thanks.
Can you share your parameter transformation setup in python or json?
Sure! Thanks for your help!
parameter1 = Dict()
parameter1.transform = 'auto_keq'
parameter1.component = 0
parameter1.bound = 0
parameter1.location = ['/input/model/unit_002/adsorption/MCL_KA','/input/model/unit_002/adsorption/MCL_KD']
parameter1.minKA = 1e-5
parameter1.maxKA = 1e5
parameter1.minKEQ = 1e-4
parameter1.maxKEQ = 1e4
parameter2 = Dict()
parameter2.transform = 'auto'
parameter2.component = 0
parameter2.bound = 0
parameter2.location = '/input/model/unit_002/adsorption/MCL_QMAX'
parameter2.min = 1
parameter2.max = 20
match_config.parameters = [parameter1, parameter2]
experiment1 = Dict()
experiment1.csv = 'A:/Simulation/BT PBS (with PFR)/reduced.csv'
experiment1.isotherm = '/output/solution/unit_002/SOLUTION_OUTLET_COMP_000'
experiment1.HDF5 = 'model.h5'
experiment1.name = 'main'
match_config.experiments = [experiment1,]
feature1 = Dict()
feature1.name = "Pulse"
feature1.type = 'SSE'
experiment1.features = [feature1,]
match_config.searchMethod = 'NSGA3'
match_config.population = 12
match_config.stallGenerations = 10
match_config.finalGradRefinement = True
match_config.gradVector = True
from CADETMatch.jupyter import Match
match_file = base_dir / 'langmuir_keq.json'
with open(match_file, 'w') as json_file:
json.dump(match_config.to_dict(), json_file, indent='\t')
match = Match(match_file)
match.start_sim()
match.plot_best()
Hi William, did you take a chance to look at my python code? Thanks.
I don’t see anything wrong with those transforms. Can you share the entire notebook for this?
This problem has been solved. It turned out the problem was related to trying to resume from a checkpoint with a changed configuration file.
Thanks Bill for your help! I really appreciate it.