/// <summary>
        /// Creates the specified current state.
        /// </summary>
        /// <param name="currentState">State of the current.</param>
        /// <returns>FreeNavigationAgent.</returns>
        public static FreeNavigationAgent Create(StateBase currentState)
        {
            FreeNavigationAgent agent = new FreeNavigationAgent
            {
                VisibilityCosineFactor = Math.Cos(Parameter.DefaultParameters[AgentParameters.GEN_VisibilityAngle].Value / 2),
                DecisionMakingPeriod   = Parameter.DefaultParameters[AgentParameters.OPT_DecisionMakingPeriodLambdaFactor].Value,
                WalkTime = 0.0d,
                AngleDistributionLambdaFactor        = Parameter.DefaultParameters[AgentParameters.OPT_AngleDistributionLambdaFactor].Value,
                DesirabilityDistributionLambdaFactor = Parameter.DefaultParameters[AgentParameters.OPT_DesirabilityDistributionLambdaFactor].Value,
                AngularVelocity   = Parameter.DefaultParameters[AgentParameters.GEN_AngularVelocity].Value,
                BodySize          = Parameter.DefaultParameters[AgentParameters.GEN_BodySize].Value,
                VelocityMagnitude = Parameter.DefaultParameters[AgentParameters.GEN_VelocityMagnitude].Value,
                CurrentState      = currentState,
                Destination       = null,
                VisibilityAngle   = Parameter.DefaultParameters[AgentParameters.GEN_VisibilityAngle].Value,
                DecisionMakingPeriodLambdaFactor = Parameter.DefaultParameters[AgentParameters.OPT_DecisionMakingPeriodLambdaFactor].Value,
                DecisionMakingPeriodDistribution = new Exponential(1.0d / Parameter.DefaultParameters[AgentParameters.OPT_DecisionMakingPeriodLambdaFactor].Value),
                BodyElasticity        = Parameter.DefaultParameters[AgentParameters.GEN_AgentBodyElasticity].Value,
                AccelerationMagnitude = Parameter.DefaultParameters[AgentParameters.GEN_AccelerationMagnitude].Value,
                BarrierFriction       = Parameter.DefaultParameters[AgentParameters.GEN_BarrierFriction].Value,
                BarrierRepulsionRange = Parameter.DefaultParameters[AgentParameters.GEN_BarrierRepulsionRange].Value,
                RepulsionChangeRate   = Parameter.DefaultParameters[AgentParameters.GEN_MaximumRepulsion].Value,
                EdgeCollisionState    = null,
                TimeStep = 0.0d,
            };

            return(agent);
        }
        /// <summary>
        /// Copies this instance deeply.
        /// </summary>
        /// <returns>FreeNavigationAgent.</returns>
        public FreeNavigationAgent Copy()
        {
            FreeNavigationAgent copied = new FreeNavigationAgent()
            {
                AngleDistributionLambdaFactor = this.AngleDistributionLambdaFactor,
                AngularVelocity = this.AngularVelocity,
                DesirabilityDistributionLambdaFactor = this.DesirabilityDistributionLambdaFactor,
                CurrentState           = this.CurrentState,
                DecisionMakingPeriod   = this.DecisionMakingPeriod,
                BodySize               = this.BodySize,
                VelocityMagnitude      = this.VelocityMagnitude,
                VisibilityAngle        = this.VisibilityAngle,
                VisibilityCosineFactor = this.VisibilityCosineFactor,
                WalkTime               = this.WalkTime,
                RepulsionChangeRate    = this.RepulsionChangeRate,
                BarrierRepulsionRange  = this.BarrierRepulsionRange,
                BarrierFriction        = this.BarrierFriction,
                AccelerationMagnitude  = this.AccelerationMagnitude,
                BodyElasticity         = this.BodyElasticity,
            };

            return(copied);
        }