Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

decrease warnings

  • Loading branch information...
commit 26087178192c6ca8b9abcb02aa7b879b142bab87 1 parent 6e1d433
@ranxian authored
View
3  .gitignore
@@ -6,4 +6,5 @@ ascii
*.app
*.plist
*.pro
-*.xcodproj/*
+EleEmu.xcodeproj/
+moc_emulator.cpp
View
2  Headers/qt/emulator.h
@@ -1,4 +1,4 @@
-/* Emulator is a class like a controller(engine) manage all the logic */
+/* Emulator is a class like a controller(engine) manages all the logic */
#ifndef __EleEmu__emulator__
#define __EleEmu__emulator__
View
6 Sources/costflow.cpp
@@ -29,7 +29,7 @@ void addEdge(int a, int b, int f, int c)
cost[a][b] = c, cost[b][a] = -c;
}
-int BytheWay(Elevator *ele, Order *order)
+int BytheWay(Elevator *ele)
{
if (ele->Get_nPassenger() == Elevator::Get_capacity())
return 0;
@@ -80,7 +80,7 @@ void Controller::CostFLow()
{
++ idx_ele;
- if (BytheWay(*jter, *iter))
+ if (BytheWay(*jter))
addEdge(idx_order, idx_ele, 1, abs((*jter)->Get_pos() - (*iter)->from));
//addEdge(idx_order, idx_ele, 1, estimate(*jter, *iter));
@@ -99,7 +99,7 @@ void Controller::CostFLow()
flow[path[i]][i] = 0, flow[i][path[i]] = 1;
/* No need to calc the mincost */
}
- printf("%lu %l u\n", Emulator::orders.size(), tt);
+ printf("%lu %d\n", Emulator::orders.size(), tt);
//if (! tt) return;
//memset(toDel, 0, sizeof(toDel));
View
16 Sources/qt/emulator.cpp
@@ -15,42 +15,42 @@ Emulator::Emulator(QWidget* parent) : QWidget(parent) {
labelP = new QLabel("Elevator:", this);
int bias = 20;
labelP->move(40 + bias, 530);
- nEle = new QLabel("0 ", this);
+ nEle = new QLabel("0 ", this);
nEle->move(100 + bias, 530);
labelP = new QLabel("Passenger:", this);
labelP->move(150 + bias, 530);
- nPas = new QLabel("0 ", this);
+ nPas = new QLabel("0 ", this);
nPas->move(220 + bias, 530);
labelP = new QLabel("Average wait:", this);
labelP->move(260 + bias, 530);
- avWt = new QLabel("0 ", this);
+ avWt = new QLabel("0 ", this);
avWt ->move(345 + bias, 530);
labelP = new QLabel("Max wait:", this);
labelP->move(405 + bias, 530);
- mxWt = new QLabel("0 ", this);
+ mxWt = new QLabel("0 ", this);
mxWt->move(470 + bias, 530);
labelP = new QLabel("Average duration:", this);
labelP->move(40 + bias, 550);
- avDur = new QLabel("0 ", this);
+ avDur = new QLabel("0 ", this);
avDur->move(160 + bias, 550);
labelP = new QLabel("Max duration:", this);
labelP->move(210 + bias, 550);
- mxDur = new QLabel("0 ", this);
+ mxDur = new QLabel("0 ", this);
mxDur->move(305 + bias, 550);
labelP = new QLabel("Min duration:", this);
labelP->move(365 + bias, 550);
- mnDur = new QLabel("0 ", this);
+ mnDur = new QLabel("0 ", this);
mnDur->move(465 + bias, 550);
labelP = new QLabel("Average throughput:", this);
labelP->move(40 + bias, 570);
- avThr = new QLabel("0 ", this);
+ avThr = new QLabel("0 ", this);
avThr->move(bias + 180, 570);
start = new QPushButton("START", this);

0 comments on commit 2608717

Please sign in to comment.
Something went wrong with that request. Please try again.