The modeler’s intention was that the Source block should refer to the agent population called Customers. The error indicates there’s a problem with the name of the population that is referred to. Name resolution: the name of the referred element is wrongįixing the wrong name of the element (click to enlarge) Here are some scenarios for dealing with this error. It is usually caused by misspelling or renaming an object without refactoring.
Something is wrong with the name you refer to, which is why AnyLogic can’t process it.These are the ways to find elements in your model that you will need when working with errors and these problematic elements.Ĭompile-time error 1: " cannot be resolved… (…to a variable/…or is not a field)" Searching for model elements through the Search button
On the second double-click, the searched element in that agent will be highlighted.Īnother way to search for elements is through the Search button (Ctrl + F for Windows or Command + F on a Mac). When you first double-click the element, you will have the corresponding agent open. Let’s say you want to find not an agent but a specific element that belongs to that agent on Canvas. These two elements will be the focus of this blog post because they help you work with error messages. It will appear there as a new tab and will be highlighted in bold in the Projects view, so that you always know where you are in the model.Īt the bottom, you’ll see a Status bar and two windows – Console and Problems. To have an agent open in the Graphical editor, double-click it.
In the Projects section, the model’s elements are sorted out into different categories, so you can easily navigate through them.