Joel Andersson

Results 187 comments of Joel Andersson

For MX or SX? For MX, there are other things that have to be resolved first (in particular caching of constants). In principle, the way to go is to replace...

There is already caching of constants and of sparsity patterns. We cannot maintain multiple ways of caching things. So, if the current approach is not satisfactory, it should be changed...

> And make the hash large enough to assume it is collision free Against this. We need to handle collisions (which is already done in for sparsity patterns).

> 1) a cheap "true" equality check does not depend on collision-freeness of the hashing ( It's not clear to me yet why) If you use a `std::unordered_multimap` as a...

A completely different approach is to cache everything, that is avoid duplicate expressions to be created in the first place, but come up with an algorithm for recalculating subexpressions in...

I'm not sure that it's possible to come up with such an algorithm though, without violating the AD complexity rules.

In any case, I don't see why caching could not take place one level higher. That is, there is caching of the code the user writes, but not of the...

If there were such a class, we could completely remove e.g. the caching of constants in SX and you get a nice and clear rule: - `SX`/`MX` never caches

Thanks! That's a good minimal failing example. I'll try to have a look before next release.

The corresponding extension to the Nlpsol class would be: ``` minimize f(x,p) subject to lbx