Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi
In Prime 10, is it possible to impose a domain of definition of variables?
in a geometric calculation, I do not have enough constraints, and it is difficult to have a unique solution. Is it possible to specify the domain of definition of the variables in order to converge ?
Thanks
You can always add constraints like a>0 or -10 < x < 20 or x>a in a solve block to force variables to a certain domain.
How about
or
the latter being equivalent to the original constraint but weighted by 10.
To "weight" a constraint you can multiply it by a larger number.
So instead of
which is equivalent to
you may use
Now this constraint (which in meaning has not changed at all and is equivalent to the original one) will be weighted more, but of course at the cost of the other constraints.
Weighting constraints in a solve bock with minerr can be quite tricky and a matter of trial and error to find the 'weights' that give the most desirable result.
I think multiplying a constraint by a number is equivalent to copy it multiple times in the solve block so that it will considered more than the others. We may think of the algorithm assigning each constraint a number indicating how much off the desired effect it s and tries to minimize the sum of those numbers. If a constraint is multiplied or repeated, of course it gets more weight to the overall effect.
I don't know the underlying algorithm but that seems to be the general way of working.
I understand the approach, but it seems "strange" to me.
isn't the operation of the solver documented somewhere?
Thanks
@XDN wrote:
I understand the approach, but it seems "strange" to me.
isn't the operation of the solver documented somewhere?
Thanks
Not in detail, I fear.
This part of the help explains which algorithms you may chose for various functions
For "find" the default still seems to be the LM algorithm but Prime is using the KNITRO engine as far as I understood.
I suppose that the algorithm somehow concentrates on the absolute 'error'.
If x=y=0.1 and the constraints are x=0 and 1000*y=0, the absolute error for x is 0.1 but the absolute error for y is 100. So the algorithm may concentrate to obtain a lower error for the constraint 1000*y=0 but may be satisfied with x=0.