How to change a parameter indexed in two sets ?
for example I have this:
model.Caudales = z.Param(model.H,model.periodos, initialize=q, mutable=True )
q is a dictionary with two keys
solve the model with that data and after I want to change them
I did this:
instance = model.create_instance()
instance.Caudales[instance.H, instance.periodos].value = qq
instance.preprocess()
but it doesn't work, qq is a dictionary equal to q
qq = {('G1', 1): 117.744,
('G1', 2): 98.0284,
('G1', 3): 98.0688,
('G1', 4): 117.9826,
('G1', 5): 136.143,
('G1', 6): 139.6622,
('G1', 7): 102.826,
('G1', 8): 72.5888,
('G1', 9): 65.7478,
How to change the parameter when it has two sets ?
thanks for your help