mgreminger / EngineeringPaper.xyz

EngineeringPaper.xyz is a web app that makes it easy to create, save, and share engineering calculations.
https://EngineeringPaper.xyz
MIT License
122 stars 9 forks source link

Impossibility to Assign value to a calculated variable. #280

Open antoniopaolini opened 13 hours ago

antoniopaolini commented 13 hours ago

Hello, I found a problem in EngineeringPaper use, during electronic circuit calculation. I am dimensioning a circuit and from the calculations I find "exact" values for two resistors. Now I want to assign a commercial value ​​for the resistors, in order to verify that the operating conditions are correct. The problem is that I can't reassign the value. I get the message "Error: Duplicate assignment of variable R_1" ($$R_1$$ is one of my resistors)

I know, it is by design, isn't a bug, but it is a big issue for this kind of engineering calculation. I can use different names, like $$R_{1-calculated}$$ , but this is a workaround and is an impediment for using the nice report creation function.

Here one example: https://engineeringpaper.xyz/rkSGpDRfEb2EShV7oEUYzC

mgreminger commented 5 hours ago

Normally, I would suggest using the built in function notation to address this problem since it allows you to evaluate a function at multiple input values. However, with what you're trying to do with the system solve cell, this won't entirely address your issue. Since you're attempting to solve for R1 and R2 in one case and then solve for Vout for a different set of R1 and R2, there's not really a way to do this without defining another set of variables. You're attempting to solve two separate problems in the same sheet and this can only be done with two sets of variables. You can also do this with two separate sheets and then combine the reports after the fact.