This is an abstract class which is the foundation of the model. Even though it is a simple class, I call it the "foundation" because the purpose of the model is to see some of the dynamics of the SDG, i.e. the diversity of interactions of agents within the Organization.
An abstract class is one that can't be created but describes the essential features of a class that can. The essential features that this organization provides are:
physical resources and an integrated temporal vicinity
For this, we import from Swarm swarm.objectbase.SwarmImpl, the implementation of a Swarm. Agents will live in the Swarm and will share the same notion of time. The suffix "Impl" is means implementation, the actual mechanism for a complete, usable type, as opposed to the protocol for talking to an object. In order to extend a thing, you have a thing to extend. Extending an interface can be done, but that only means that the new interface is a special way to talk to an object. The goal here is to make a new kind of object, not a new way to talk.
We also import swarm.defobj.Zone, a type needed in the Organization's constructor. When any object is created it is put in some Zone. If the owner of the Organization happens to be a Swarm, it may pass in a Swarm instead of a Zone; Swarm's implement the Zone interface. The constructor is the method used to create a basic instance of an class. In this case we call the superclass constructor (the Organization is a kind of Swarm, and we want to create the Organization like any other Swarm), and then write down the parameters the caller requested.
A spatial means for interaction
For this, we import from Swarm swarm.space.Grid2d and Swarm.space.Grid2dImpl, the interface and implementation of a Grid2d. Grid2d is a simple 2d grid for storing objects. Agents will interaction on this grid.
A Grid2dImpl is instantiated in the constructor and assigned to an instance variable of type Grid2d. The reason for assigning to an interface-typed variable, and returning that in the getWorld method is to minimize the information and constraints we expose to users of this class. Also, an interface can be extended by multiple inheritance whereas an implementation cannot.