Hello Everyone,
Could someone please help me explain why I get an "Unbound expression" error with this constraint??
I am calculating angles between segments and I just want to set that if the denominator is zero then the angle is 90.
forall(f in Floor){
forall (p in aSegments){
if ((ChangeinX[f][p])== 0)
Angles0[f][p] == 90;
}
}
I have attached the .mod file as well,.
Any assistance rendered will be highly appreciated!
Topic

Re: Unbound Expression
20130405T10:03:10ZThis is the accepted answer. This is the accepted answer.Hello,
you cannot change an expression with a constraint, you need to build the expression with the "if" inside.
for example:
dexpr float Angles0[g in Floor][h in aSegments] = (ChangeinX[g][h]==0) ? 90 : (Slope0[g][h](Slope0[g][h]^3)/3+(Slope0[g][h]^5)/5(Slope0[g][h]^7)/7);
and your can remove the lines:
forall(f in Floor){
forall (p in aSegments){
if ((ChangeinX[f][p])== 0)
Angles0[f][p] == 90;
}
}
The same problem appears with Angle1.
Regards,
Olivier