I wrote this: Doenet
It looks and seems to act just like I want it to (but feedback and improvements are welcome!). However, as soon as I move the water level in the tank I get an “info” that “Cannot change state variable formula of 429 as it doesn’t have an inverse definition.”
Should I care about that? Will it affect anything about restoring answers or displaying the problem within PreTeXt?
When you move the water level, you are moving the point P define on line 8. In addition to changing the y-coordinate of the point, it is also attempting to change the x-coordinate, which is set to be fixed at Phcent. Since Phcent is a function, cannot be changed by something that references it (that’s the meaning of the cryptic “no inverse definition” remark). So, it is your intended behavior. You can remove the “info” by adding a fixed attribute to the function Phcent.
We recently moved some log messages to info diagnostics to expose some more information, but it seems we went too far and now show some cryptic messages that are not author-facing. We should take a second look at the new infos added and prune ones like this that don’t belong.
Thanks!
I have been in the habit of using a constant-valued function when I want a coordinate to not change, as I had observed that desired behavior. But your reply made me realize that I could have defined the variable as a number and added the “fixed” attribute to get the same result, and that seems better and more semantic to me. So again, thank you!