You can add custom JAVA classes in AnyLogic. Proceed as follows:
- Go to the projects view
- Right-click the current model
- Select New in menu
- Select Java Class… in menu
- In the New Java Class wizard enter Class name and Specify relevant Superclass
- Click Next
- Now, specify relevant Class attributes (Class Fields)
- In the Class Fields wizard you also choose to implement default constructors and toString() methods for the Class (check boxes accordingly)
- Click Finish
- The Code editor will open and you will be able to specify your custom Class further by using JAVA code