Originally posted by: ashley20
Hi all,
I defined my variables in dictionaries, model.continuous_var_dict(). When I retrieve solution values one by one by using
sol = model.solve(url=None, key=None)
for a in NumA:
sol.get_value(vars[a])
It works well.
However, I want to retrieve solution values in batches. I tried to use the function get_values(),
sol.get_values(vars)
but it does not work. Probably it only works for vars defined as list.
I have some variables defined as 1-dimension, 2-dimension and 3-dimension dictionaries, retrieve values in batches would be good, rather than writing multiple loops. Is there a way I can retrieve solution values in batches for these variables defined as multi-dimension dictionaries?
Thank you!
#CPLEXOptimizers#DecisionOptimization