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
This topic has been locked.
2 replies
Latest Post
 20130405T14:19:00Z by SystemAdmin
ACCEPTED ANSWER
Pinned topic Unbound Expression
20130405T01:00:06Z

Answered question
This question has been answered.
Unanswered question
This question has not been answered yet.
Attachments
Updated on 20130405T14:19:00Z at 20130405T14:19:00Z by SystemAdmin

ACCEPTED ANSWER
Re: Unbound Expression
20130405T10:03:10Z in response to SystemAdminHello,
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 
ACCEPTED ANSWER
Re: Unbound Expression
20130405T14:19:00Z in response to SystemAdminThank you very much sir for helping me, it works now.