slipmodel.cpp
来自「遗传自适应算法的源代码」· C++ 代码 · 共 55 行
CPP
55 行
// slipmodel.cpp: implementation of the slipmodel class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "2level.h"
#include "slipmodel.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
slipmodel::slipmodel()
{
}
slipmodel::~slipmodel()
{
}
double slipmodel::slip(int i,global x)
{
H=x.H[i];
h=x.h[i];
r=(H-h)/H;
B=x.B[0];
R=x.R[i];
f=x.f[i];
Tf=x.Tf[i];
Tb=x.Tb[i];
de_drag=x.de_drag[i];
double dh=H-h;
double v1=0;
double v2=0;
double P=x.P[i];
RR=R*(1+AA*P/B/dh);
a=f*sqrt(RR/h);
b=(1-Tf/de_drag)/(1-Tb/de_drag);
v1=f/a*tan(0.5*atan(sqrt(r/(1-r)))-0.25/a*log(1/(1-r))*b);
v2=RR/h*v1*v1;
return v2;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?