All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.meliorbis.economics.model.ModelWithControls Maven / Gradle / Ivy

Go to download

A library for solving economic models, particularly macroeconomic models with heterogeneous agents who have model-consistent expectations

There is a newer version: 1.1
Show newest version
package com.meliorbis.economics.model;

import com.meliorbis.economics.infrastructure.simulation.SimState;
import com.meliorbis.numerics.generic.MultiDimensionalArray;
import com.meliorbis.numerics.generic.primitives.DoubleArray;

/**
 * Interface for models which also have aggregate controls
 * 
 * @param  The type used to configure this model
 * @param  The type used to hold state for this model
 */
public interface ModelWithControls> extends Model
{
    /**
     * Given the individual transition function conditional on aggregate control values, but already adjusted
     * to the realised aggregate states and shocks, this method calculates and returns the aggregate control values
     * at the given the input distribution, aggregate states, shocks and calculation state.
     * 
     * @param simState_ The current simulation state (distribution)
     * @param individualTransitionByAggregateControl_ The individual transition function, conditional on the grid values
     *                                                of aggregate controls
     *                                                
     * @param currentAggStates_ The current aggregate state values
     * @param currentAggShocks_ The current aggregate shock realisation
     * @param calcState_                              The state of the calculation
     * 
     * @return The value of each aggregate control in the model given the inputs
     * 
     * @throws ModelException If a model-specific error occurs
     * 
     * @param  The numeric type of shocks used in this model
     */
     double[] calculateAggregateControls(
    		SimState simState_,
            DoubleArray individualTransitionByAggregateControl_,
            double[] currentAggStates_,
            MultiDimensionalArray currentAggShocks_,
            S calcState_) throws ModelException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy