/*
 * Copyright (c) 2005-2010 KOM – Multimedia Communications Lab
 *
 * This file is part of PeerfactSim.KOM.
 * 
 * PeerfactSim.KOM is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 * 
 * PeerfactSim.KOM is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with PeerfactSim.KOM.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

package de.tud.kom.p2psim.impl.topology.movement.modularosm.groups.groupforming;

import de.tud.kom.p2psim.api.topology.movement.SimLocationActuator;
import de.tud.kom.p2psim.impl.topology.movement.modularosm.SocialGroupMovementModel;
import de.tud.kom.p2psim.impl.topology.movement.modularosm.groups.SocialMovementGroup;

/**
 * This interface specifies the GroupFormingStrategy, which basically handles the creation and deletion of groups.
 * @author Marcel Verst
 * @version 1.0, 22.11.2018
 */
public interface IGroupFormingBehavior {
	/**
	 * Initializes class variables.
	 * 
	 * @author Marcel Verst
	 */
	void initialize(SocialGroupMovementModel movementModel);

	/**
	 * Manages the group handling. Calls processes for creating and deleting groups.
	 * 
	 * Groups are only created if conditions are met and enough candidates are there to form a group.
	 * Groups are deleted if the group leader reached its destination and thus all other members also 
	 * reached their destination.
	 * 
	 * @param SimLocationActuator The host to be checked.
	 * @param PositionVector The destination of the host.
	 * 
	 * @author Marcel Verst
	 */
	void manageGroups();	

	/**
	 * Checks if the given host is a leader and reached the its destination. If the destination is reached,
	 * the group of the leader is removed.
	 * 
	 * @param SimLocationActuator The host to be checked.
	 * @param PositionVector The destination of the host.
	 * 
	 * @author Marcel Verst
	 */
	void runGroupDeletionProcess();
		
	public int getMinGroupSize();
	public int getMaxGroupSize();	
	
	public void removeGroup(SocialMovementGroup group);
}