//==============================================================================
// The Society of Actuaries (SOA) makes this computer model and its computer
// code available to its members for educational purposes. The model and its
// code may be modified and redistributed without prior authorization from the
// SOA. The SOA distributes this computer model and its computer code 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.
//==============================================================================

package resources;

import repast.simphony.context.Context;
import repast.simphony.engine.environment.RunEnvironment;
import repast.simphony.parameter.Parameter;
import repast.simphony.ui.probe.ProbeID;
import resources.Constants.PlanTag;
import agents.Agent;

@SuppressWarnings("unused")
public class InsurancePlan extends Agent
{
//==============================================================================
// Attribute variables
// These variables do not change during the agent's life (unless the user
// changes an attribute parameter during a simulation).
//------------------------------------------------------------------------------
    private PlanTag planTag;
    private double copaymentPercentage;

//==============================================================================


//==============================================================================
// Memory variables
// These variables can change during an agent's life.
// There are two types of memory variables:
// 1. Currently updated variables:  Variables that the agent updates during the
//    period to which they apply.
// 2. Previously updated variables:  Variables that the agent updates during the
//    period prior to the period in which they apply.
//------------------------------------------------------------------------------
    // 1. Currently updated memory variables
    private int currentExchangePresentationOrder;
    private int currentPremiumOrder_HighToLow;
    private double currentPremiumAmount;
    private double priorPremiumAmount;

    // 2. Previously updated memory variables
    // None

//==============================================================================


//==============================================================================
// Other variables
// These are other variables used in the class.
//------------------------------------------------------------------------------    	
    private Context<Object> simulationContext;
    private double tickCount;

//==============================================================================
// Method:  InsurancePlan() constructor
//------------------------------------------------------------------------------

    public InsurancePlan(Context<Object> pContext, AgentID pInsurancePlanID)
    {

        setAgentID(pInsurancePlanID);
        simulationContext = pContext;

    }//end InsurancePlan()

//------------------------------------------------------------------------------

//==============================================================================
// Methods: Initialization methods for the agent. These are used in
//          the agent's constructor method or at the beginning of each
//          simulation period.
//==============================================================================

// None. Variables for this class are handled by Health Insurance Company agents.

//==============================================================================


//==============================================================================
// Methods:  "Input" methods for the agent. These are described in the
// detailed description of the model. Each method is preceded by "i#".
//==============================================================================

// None

//==============================================================================


//==============================================================================
// Methods:  "Process" methods for the agent. These are described in the
// detailed description of the model. Each method is preceded by "p#"
// to indicate its number according to the numbering scheme used in the
// detailed description.
//==============================================================================

// None

//==============================================================================


//==============================================================================
// Methods:  "Rule" methods for the agent. These are described in the
// detailed description of the model. Each method is preceded by "r#"
// to indicate its number according to the numbering scheme used in the
// detailed description.
//==============================================================================

// None

//==============================================================================


//==============================================================================
// Methods:  General methods for the agent.
//==============================================================================

// None

//==============================================================================


//==============================================================================
// Methods: "Probe" methods for the model user to probe the agent's data.
// Note:    As a simulation runs, the model user can probe an agent by
//          double-clicking on its icon in the display. For more information
//          about probes, see the Repast Simphony reference documentation.
//==============================================================================

// The "ProbeID" annotation provides the probe ID
    @ProbeID
    public String getName()
    {
        return getAgentName();
    }

    @Parameter (usageName="currentPremiumAmount", displayName="A1. Current premium amount")
    public double getCurrentPremiumAmount()
    {
        return currentPremiumAmount;
    }

    @Parameter (usageName="priorPremiumAmount", displayName="A2. Prior premium amount")
    public double getPriorPremiumAmount()
    {
        return priorPremiumAmount;
    }
    
    @Parameter (usageName="copaymentPercentage", displayName="A3. Copayment percentage")
    public double getCopaymentPercentage()
    {
        return copaymentPercentage;
    }

    @Parameter (usageName="currentPremiumOrder_HighToLow", displayName="B1. Current premium order")
    public int getCurrentPremiumOrder_HighToLow()
    {
        return currentPremiumOrder_HighToLow;
    }

    @Parameter (usageName="currentExchangePresentationOrder", displayName="B2. Current Exchange presentation order")
    public int getCurrentExchangePresentationOrder()
    {
        return currentExchangePresentationOrder;
    }


//==============================================================================

//==============================================================================
// Methods: getter and setter methods
//------------------------------------------------------------------------------

    public void setCurrentExchangePresentationOrder(int currentExchangePresentationOrder)
    {
        this.currentExchangePresentationOrder = currentExchangePresentationOrder;
    }

    public void setCurrentPremiumAmount(double currentPremiumAmount)
    {
        this.currentPremiumAmount = currentPremiumAmount;
    }

    public void setPriorPremiumAmount(double priorPremiumAmount)
    {
        this.priorPremiumAmount = priorPremiumAmount;
    }

    public void setCopaymentPercentage(double copaymentPercentage)
    {
        this.copaymentPercentage = copaymentPercentage;
    }

    public String getInsurancePlanIDString()
    {
        return (this.getAgentID().getAgentIDString());
    }//end getInsurancePlanIDString()

    public void setCurrentPremiumOrder_HighToLow(int currentPremiumOrder_HighToLow)
    {
        this.currentPremiumOrder_HighToLow = currentPremiumOrder_HighToLow;
    }

    public PlanTag getPlanTag()
    {
        return planTag;
    }

    public void setPlanTag(PlanTag planTag)
    {
        this.planTag = planTag;
    }

//==============================================================================


}//end InsurancePlan class
