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

com.meliorbis.economics.individual.IndividualProblemSolver 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.individual;

import com.meliorbis.economics.model.ModelException;
import com.meliorbis.economics.model.State;

/**
 * Interface for individual problem solvers that work iteratively. The framework handles the iteration, so
 * the solver needs to implement the individual steps
 * 
 * @author Tobias Grasl
 * 
 * @param  The State type
 */
public interface IndividualProblemSolver>
{
	/**
	 * Initialise the solver
	 * 
	 * @param state_ The state instance used in this calculation
	 */
	void initialise(S state_);
	
	/**
	 * Perform a single iteration given the current state of the calculation
	 * 
	 * @param state_ The current state of the calculation
	 * 
	 * @throws ModelException If the model causes an error during the calculation
	 */
	void performIteration(S state_) throws ModelException;
}