您好,欢迎来到叨叨游戏网。
搜索
您的当前位置:首页转向梯形的优化设计程序

转向梯形的优化设计程序

来源:叨叨游戏网
转向梯形的优化设计程序

#include \"stdio.h\" #include \"math.h\" static float a=50; static float Rmin=7000; static float L=3200; static float K=1820; static float pai=3.1415; static float Q=0.0; static float M=0.0; double Get_F_xi(double ai) {

double m_KM,m_sin_Qai,m_cos_Qai,m_ctg_aiKL;

double top1_asin,top1_sqrt,bom1_actg,top2_acos,top3_fabs; double F_xi; float h_Q,h_ai; h_ai=ai*pai/180; h_Q=Q*pai/180; m_KM=K/M;

m_sin_Qai=sin(h_Q+h_ai); m_cos_Qai=cos(h_Q+h_ai); m_ctg_aiKL=tan(pai/2-h_ai)-K/L;

top1_sqrt=sqrt(m_KM*m_KM+1-2*m_KM*m_cos_Qai); top1_asin=asin(m_sin_Qai/top1_sqrt)*180/pai; bom1_actg=90-(atan(m_ctg_aiKL))*180/pai;

printf(\"\\nm_ctg_aiKL=%f\\n\

top2_acos=(acos((m_KM*(2*cos(h_Q)-m_cos_Qai)-cos(2*h_Q))/top1_sqrt))*180/pai;

top3_fabs=fabs((Q-top1_asin)/bom1_actg-top2_acos); F_xi=fabs((Q-top1_asin)/bom1_actg-top2_acos/bom1_actg-1); printf(\"\\ntop3_fabs=%f\\n\printf(\"\\nF_xi=%f\\n\return F_xi; }

double Get_Wai(double ai) {if(ai>0&&ai<=10) return 1.5;

else if(ai>10&&ai<=20) return 1.0; else return 0.5; }

double Get_Fx(int aimax) {

double Fx=0.0; int i;

for(i=1;i<=aimax;i++) {

Fx+=Get_F_xi(i)*Get_Wai(i);

printf(\"\\nGet_Wai[%d]=%f\\n\ printf(\"\\nGet_F_x[%d]=%f\\n\

printf(\"\\nFx=%lf\ }

return Fx; }

double Get_result() {

float ai_max,h_ai_max; double M_min=0.11*K; double M_max=0.15*K; double Q_min=70; double is_ok; float h_Q;

printf(\"/*****************************/\\n\"); printf(\"\\nQ,M:\\n\"); scanf(\"%f,%f\printf(\"\\nQ=%f,M=%f\\n\

h_ai_max=asin(L/(Rmin-a)); ai_max=180*h_ai_max/3.1415; h_Q=Q*pai/180;

is_ok=(cos(40*pai/180)-2*cos(h_Q)+cos(h_Q+h_ai_max))/(cos(40*pai /180)-cos(h_Q))/cos(h_Q)-2*M/K; printf(\"\\n-->%f\\n\

if(M>=M_min&&M<=M_max&&Q>=Q_min&&is_ok>=0) {

return Get_Fx(ai_max); }

else printf(\"\\nQ,M\\n\"); return 0; }

void main() {

double re=Get_result(); if(re)

printf(\"\\n\\nThe Result is Fx=%lf\\n\\n\else

printf(\"\\n\\nThe Result is Wrong!\\n\\n\");}

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- gamedaodao.net 版权所有 湘ICP备2024080961号-6

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务