⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 agent.h

📁 人工智能的matlab程序
💻 H
字号:
#import <objectbase.h>               //Agent is a SwarmObject
#import <objectbase/SwarmObject.h>
#import "World.h"

@interface Agent:SwarmObject          
{
  @public
    double demand;	/*" bid or -offer"*/ 
  double profit;	/*" exp-weighted moving average "*/
  double wealth;	/*" total agent wealth "*/
  double position;	/*" total shares of stock "*/
  double cash;	        /*" total agent cash position "*/ 
  double initialcash;
  double minholding;
  double mincash;
  double intrate;
  double intratep1;
  double price;         // price is maintained by World
  double dividend;      // dividend is maintained by World
  int myID;
}


+setWorld: (World *)aWorld;

-setID: (int)iD;
-setPosition: (double)aDouble;
-setintrate: (double)rate;
-setminHolding: (double)holding   minCash: (double)minimumcash;
-setInitialCash: (double)initcash;
-setInitialHoldings;
-getPriceFromWorld;
-getDividendFromWorld;

-creditEarningsAndPayTaxes;
-(double)constrainDemand: (double *)slope : (double)trialprice;
-(double)getAgentPosition;
-(double)getWealth;
-(double)getCash;

//Methods specified by each agent type
-prepareForTrading;   
-(double)getDemandAndSlope: (double *)slope forPrice: (double)trialprce;
-updatePerformance;

@end





⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -