Closed bqpd closed 3 years ago
test models please
@pgkirsch what do you think of this feature's utility? It seems to me like something that should Just Work, so I'm willing to take the performance hit...but that's easy for me to say.
@bqpd that seems helpful! This seems like it would further simplify the proposed aero changes?
I assume that syntax carries over to the setup method form?
def setup(self):
...
substitutions = {
v[0,2:]: 1,
...
}
return constraints, substitutions
I know I'm sort of pushing the envelope on some of these vector variable subs, but do you have other users with anything similar in use case?
yup, carries over!
I think this is one of those things where people might have tried to use it, it didn't work, they found an alternative without mentioning...
Awesome!
Have you profiled what the performance hit is for a large model? I can't imagine it's too significant, right?
it was ~4% of the time in that function...don't remember exactly the timing in my test run, but no more than a couple hundredths of a second.
Seems very tolerable!
I'm just so used to making things quicker when I make changes to core classes :p
Ha sorry!
test models please
allows substitutions like
m.substitutions[v[0,2:]] = 1 # or np.ones(v[0,2:].shape)