@startuml
interface AgentParams { 
}

class PsoAgentParams {
  LEARNING_RATE: number;
  VELOCITY_CHANGE_VELOCITY_COEFF: number;
  VELOCITY_CHANGE_LOCAL_POSITION_COEFF: number;
  VELOCITY_CHANGE_GLOBAL_POSITION_COEFF: number;
}
PsoAgentParams --|> AgentParams 

abstract class BaseAgent {
}
BaseAgent ..> AgentParams

class PsoAgent {
  -PARAMS: PsoAgentParams;
  -globalBestAgentState: AgentState;
  -velocity: Position2D[];
  -localBestAgentState: AgentState;

  -behave(): void
  -updateLocalBestState(): void
}
PsoAgent --|> BaseAgent
PsoAgent ..> PsoAgentParams 

interface SimulationParams {
  +MAX_ITERATION: number;
  +CHECK_NEW_STATE_PER_ITERATION: number;
  +POPULATION_SIZE: number;
}
SimulationParams --|> AgentParams 

class PsoSimulationParams {
}
PsoSimulationParams --|> PsoAgentParams
PsoSimulationParams ..|> SimulationParams 

abstract class BaseSimulation {
}
BaseSimulation ..> SimulationParams

class PsoSimulation {
  +run(\n  PARAMS: PsoSimulationParams,\n  heightMap: HeightMap,\n  cities: Position2D[],\n  citiesDistanceMap: DistanceMap[],\n  citiesPreviousMap: PreviousMap[],\n): Observable<AgentState>
}
PsoSimulation ..|> BaseSimulation 
PsoSimulation ..> PsoSimulationParams
PsoSimulation --* PsoAgent
@enduml