这是一种方法,叫成本利润法! 
  做决策电价用的!   
  包名称 类名称 
decisionalgorithm CostProfitMethodDayBian 成员方法 public double [][][] calculation(int periodNumber,int bidSegmentNumber,double[] forecastPrice,double[] forecastPower,double userProfitRate,double[] userPowerRatio,double[] userRatioPercent,double bidMinPrice,double bidMaxPrice,double minPower,double maxPower,double costCoefficientA,double costCoefficientB,double costCoefficientC,boolean isCanDownBid,boolean isModifyMarginalPrice) 方法calculation输入参数 
参数名称   参数类型 
periodNumber int 
bidSegmentNumber int 
forecastPrice double[] 
forecastPower double[] 
userProfitRate double 
userPowerRatio double[] 
userRatioPercent double[] 
bidMinPrice double 
bidMaxPrice double 
minPower      double 
maxPower  double 
costCoefficientA double 
  costCoefficientB double 
  costCoefficientC double 
  isCanDownBid      boolean 
  isModifyMarginalPrice boolean 
  bidData      double[][][] 
以下是程序代码 
for(int i=0;i<bidSegmentNumber-1;i++) 
sum+=userPowerRatio[i]; 
for(int i=1;i<bidSegmentNumber-1;i++) 
bidPower[i]=bidPower[i-1]+(maxPower-minPower)*userPowerRatio[i-1]/sum; 
bidPrice[i] = costCoefficientA*powerPoint[i]*powerPoint[i] + costCoefficientB * powerPoint[i] + costCoefficientC; 
bidPrice[i]*= (1+userProfitRate/100.0); 
if(isModifyMarginalPrice) 
if(bidPrice[j]>forecastPrice[i]) 
bidPrice[j]=forecastPrice[i]; 
if(isCanDownBid==false) 
if(j>0) 
{ if(bidPrice[j-1]>bidPrice[j]) 
bidPrice[j]=bidPrice[j-1]; 
}//if 
//计算结果利润 
bidProfit=bidPrice[j]-costPrice[j]; 
if(bidProfit<0.0) bidProfit=0.0; double m_tao=forecastPrice[i]/10.0; 
double m_timescoff=2.5; 
if (bidPrice[j]>=(forecastPrice[i]-m_timescoff*m_tao) && bidPrice[j]<=(forecastPrice[i]+m_timescoff*m_tao)) 

bidRisk=Math.abs((bidPrice[j]-(forecastPrice[i]-m_timescoff*m_tao))/(m_timescoff*2*m_tao)*100);//写结果市场风险 
if(bidRisk>100) bidRisk=100; 

if (bidPrice[j]<(forecastPrice[i]-m_timescoff*m_tao)) 

bidRisk=0; 

if (bidPrice[j]>(forecastPrice[i]+m_timescoff*m_tao)) 

bidRisk=100; 
} bidPossessionRatio =bidPower[j]/forecastPower[i]*100; //计算市场占有率 
还有接口,我看不懂: 
在bds.DayBid48.getBidData()中建立CostProfitMethodDayBian一个实例,再调用该实例的方法calculation。 
代码如下: 
CostProfitMethodDayBian tempMethod = new CostProfitMethodDayBian(); 
bidData = tempMethod.calculation (PeriodNumber,BidSegmentNum,forePrice,forePowerQ, ProfitRate,PowerRate,PowerRatePer,DayMinPrice,DayMaxPrice,UnitMinPower,UnitMaxPower,mCostA,mCostB,mCostC,bidDownFlag,modifyFlag); 
麻烦大哥帮我参谋一下 
我不知道怎么调试,也不知道哪里出错了,肯请大哥大姐帮忙!!