Joseph Jabbour
unread,Jul 7, 2025, 12:37:08 PMJul 7Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to JaamSim Users Discussion Group
I'm encountering a runtime error in JaamSim with `GuardedTransition1.AttributeGetter` when trying to assign a single value to an attribute in a cloned submodel. The error is:
GuardedTransition1.AttributeGetter (ASSIGN) keyword 'AttributeAssignmentList':
Expression does not evaluate to a collection or lambda type. { 'this.obj.branchAttribute = this.Parent.getAttributes(1)(1)' }
Details:
- My model is a clone of a submodel, and `GuardedTransition1` is part of this cloned structure.
- My goal is to assign the value `2.0` to `this.obj.branchAttribute` within `GuardedTransition1`.
- `this.Parent.getAttributes(1)(1) does not return `2.0``.
- `GetAttributeList` is a `FileToMatrix` object with `DataFile = SUBTRIALGETATTRIBUTELIST.txt`, and `[GetAttributeList].Value(1)` returns `{2.0, 0.0, 1.0, 0.0}`.
- The `SimEntity` (`this.obj`) has `AttributeDefinitionList = { { branchAttribute 0 } }`, expecting a single numeric value.
- The error occurs because `AttributeGetter` expects a collection or lambda type, but `this.Parent.getAttributes(1)(1)` returns a single value (`2.0`).
- I'm using `AttributeGetter` to define the attribute assignment within the `AttributeAssignmentList` keyword, e.g., `{ this.obj.branchAttribute = this.Parent.getAttributes(1)(1) }`.
Please advise on resolving the error and achieving the assignment in `GuardedTransition1` while maintaining compatibility with the submodel's cloning and attribute assignment structure.