The short answer is “yes”: all you have to do is change the relevant variable domains. The one catch is that you want to make sure that you maintain the variable bounds (Variables can get their domains from two sources: the bounds explicitly set by the user and the variable’s domain). The general paradigm that should work for your use case is:
# given a variable m.x
tmp = m.x.bounds
m.x.domain = Reals
m.x.setlb(tmp[0])
m.x.setub(tmp[1])
The loop to do some / all of the VarData in an Indexed variable is relatively straightforward (but, because of the “bounds issue”, you will want to do it one VarData at a time)
John
--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
pyomo-forum...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyomo-forum/2b028cab-4384-48a9-abf5-724970330ddfn%40googlegroups.com.