我试图在anylogic中编写以下函数:
double calSwgeFeeDclne () {
double sewegeFeeDecline;
if(swegeFee<reqSwgeFee){
sewegeFeeDecline=0.0;
}
else{
sewegeFeeDecline=min((swegeFee-0.2),(swegeFee-reqSwgeFee));
}
return sewegeFeeDecline;
}
但我收到错误:
Multiple markers at this line
- Syntax error, insert "VariableDeclarators" to complete
LocalVariableDeclaration
- Syntax error, insert "}" to complete MethodBody
- Syntax error, insert ";" to complete LocalVariableDeclarationStatement
我在这个页面上找到了答案: Why do I need brackets here? Java: "if (true) int i=0;"
但我仍然不确定该怎么做我的代码现在应该成为什么建议?