package acq_tam_wg.MotivationalSchema.v1_1_2.src;
import acq_tam_wg.Hypothalamus.v1_1_1.src.*;
import acq_tam_wg.WGCritic.v1_1_2.src.*;
import acq_tam_wg.TAMCritic.v1_1_2.src.*;

/*********************************/
/*                               */
/*   Importing all Nsl classes   */
/*                               */
/*********************************/

import nslj.src.system.*;
import nslj.src.cmd.*;
import nslj.src.lang.*;
import nslj.src.math.*;
import nslj.src.display.*;
import nslj.src.display.j3d.*;

/*********************************/

public class MotivationalSchema extends NslJavaModule{

//NSL Version: 3_0_1
//Sif Version: 9
//libNickName: acq_tam_wg
//moduleName:  MotivationalSchema
//versionName: 1_1_2


//variables 
public  acq_tam_wg.Hypothalamus.v1_1_1.src.Hypothalamus hypothalamus; // 
public  acq_tam_wg.WGCritic.v1_1_2.src.WGCritic wgCritic; // 
public  acq_tam_wg.TAMCritic.v1_1_2.src.TAMCritic tamCritic; // 
public  NslDinDouble1 reductions; // 
public  NslDinDouble1 incentives; // 
public  NslDinInt0 currentNodeId; // 
public  NslDinDouble0 lastDist; // 
public  NslDoutDouble1 motivationalState; // 
public  NslDoutDouble1 wgReinforcement; // 
public  NslDoutDouble1 tamReinforcement; // 

//methods 

public void makeConn(){
    nslConnect(currentNodeId,wgCritic.currentNodeIdIn);
    nslConnect(currentNodeId,tamCritic.currentNodeIdIn);
    nslConnect(lastDist,wgCritic.lastNodeDist);
    nslConnect(incentives,hypothalamus.incentives);
    nslConnect(reductions,hypothalamus.reductions);
    nslConnect(reductions,wgCritic.rewards);
    nslConnect(reductions,tamCritic.rewards);
    nslConnect(hypothalamus.drives,motivationalState);
    nslConnect(hypothalamus.drives,wgCritic.motivations);
    nslConnect(hypothalamus.drives,tamCritic.motivations);
    nslConnect(wgCritic.reinforcement,wgReinforcement);
    nslConnect(tamCritic.reinforcement,tamReinforcement);
}

	/******************************************************/
	/*                                                    */
	/* Generated by nslc.src.NslCompiler. Do not edit these lines! */
	/*                                                    */
	/******************************************************/

	/* Constructor and related methods */
	/* makeinst() declared variables */

	/* Formal parameters */
	int maxNodes;
	int numDrives;
	int angleRepSize;
	double[] d_min;
	double[] d_max;
	double maxDesirability;

	/* Temporary variables */

	/* GENERIC CONSTRUCTOR: */
	public MotivationalSchema(String nslName, NslModule nslParent, int maxNodes, int numDrives, int angleRepSize, double[] d_min, double[] d_max, double maxDesirability)
{
		super(nslName, nslParent);
		this.maxNodes=maxNodes;
		this.numDrives=numDrives;
		this.angleRepSize=angleRepSize;
		this.d_min=d_min;
		this.d_max=d_max;
		this.maxDesirability=maxDesirability;
		initSys();
		makeInstMotivationalSchema(nslName, nslParent, maxNodes, numDrives, angleRepSize, d_min, d_max, maxDesirability);
	}

	public void makeInstMotivationalSchema(String nslName, NslModule nslParent, int maxNodes, int numDrives, int angleRepSize, double[] d_min, double[] d_max, double maxDesirability)
{ 
		Object[] nslArgs=new Object[]{maxNodes, numDrives, angleRepSize, d_min, d_max, maxDesirability};
		callFromConstructorTop(nslArgs);
		hypothalamus = new acq_tam_wg.Hypothalamus.v1_1_1.src.Hypothalamus("hypothalamus", this, numDrives, d_min, d_max);
		wgCritic = new acq_tam_wg.WGCritic.v1_1_2.src.WGCritic("wgCritic", this, maxNodes, numDrives, d_min, d_max, maxDesirability);
		tamCritic = new acq_tam_wg.TAMCritic.v1_1_2.src.TAMCritic("tamCritic", this, maxNodes, numDrives, d_min, d_max, maxDesirability);
		reductions = new NslDinDouble1("reductions", this, numDrives);
		incentives = new NslDinDouble1("incentives", this, numDrives);
		currentNodeId = new NslDinInt0("currentNodeId", this);
		lastDist = new NslDinDouble0("lastDist", this);
		motivationalState = new NslDoutDouble1("motivationalState", this, numDrives);
		wgReinforcement = new NslDoutDouble1("wgReinforcement", this, numDrives);
		tamReinforcement = new NslDoutDouble1("tamReinforcement", this, numDrives);
		callFromConstructorBottom();
	}

	/******************************************************/
	/*                                                    */
	/* End of automatic declaration statements.           */
	/*                                                    */
	/******************************************************/


}//end MotivationalSchema

