摘要: 当我试图获得gurobi.optimize()后目标函数的最值(obj.X)的时候,Gurobi报错:GurobiError: Unable to retrieve attribute 'X‘ 查找原因是因为添加的相关约束使得原函数无解,所以添加判断语句 if model.status == GRB 阅读全文
posted @ 2022-11-14 21:24 Triphan 阅读(3989) 评论(0) 推荐(0)
摘要: 1、 #include<iostream> using namespace std; int main() { char ch; cout << "Enter text:\n"; while (cin.get(ch) && ch != '@') { if (isalpha(ch)) ch = tol 阅读全文
posted @ 2022-11-13 23:39 Triphan 阅读(76) 评论(0) 推荐(0)
摘要: 1、 #include<iostream> using namespace std; int main() { int i, j; cout << "Enter two numbers: "; cin >> i >> j; //cout << "Sum between " << i << " and 阅读全文
posted @ 2022-11-12 21:48 Triphan 阅读(51) 评论(0) 推荐(0)
摘要: 1、 #include<iostream> using namespace std; const int NameSize = 20; struct stu { char firstName[NameSize]; char lastName[NameSize]; char grade; int ag 阅读全文
posted @ 2022-11-11 18:20 Triphan 阅读(58) 评论(0) 推荐(0)
摘要: 1、 #include<iostream> using namespace std; int main() { const int RAT = 14; int height_ft, height_in; cout << "Please input your height in feets:___\b 阅读全文
posted @ 2022-11-07 17:12 Triphan 阅读(27) 评论(0) 推荐(0)
摘要: 1、 #include<iostream> using namespace std; int main() { cout << "Name: Luoxiao,\nAddress: Xidian University, Xi'an, Shaanxi Province, China.\n"; retur 阅读全文
posted @ 2022-11-06 00:29 Triphan 阅读(48) 评论(0) 推荐(0)
摘要: 当尝试在cmd中用pip命令安装第三方库时,出现如下的WARNING WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 阅读全文
posted @ 2022-09-24 15:24 Triphan 阅读(22244) 评论(0) 推荐(2)
摘要: Windows: pip install pyyaml 而不是pip install yaml 代码中导入格式为 import yaml 阅读全文
posted @ 2022-09-24 09:21 Triphan 阅读(552) 评论(0) 推荐(0)