Test cases
This commit is contained in:
parent
89b7589600
commit
17ae11212a
@ -54,18 +54,22 @@ int main() {
|
|||||||
cout << endl;
|
cout << endl;
|
||||||
|
|
||||||
if (isParsed) {
|
if (isParsed) {
|
||||||
QDateTime start = QDateTime::currentDateTime();
|
int minParkingTime = get_minimal_parkingtime(&cfg);
|
||||||
start.setTime(QTime(start.time().hour(), start.time().minute(), 0));
|
QList<int> timeSteps = Calculator::GetInstance().GetTimeSteps(&cfg);
|
||||||
Calculator calculator(start);
|
|
||||||
QList<int> timeSteps = calculator.GetTimeSteps(&cfg);
|
|
||||||
qCritical() << timeSteps;
|
qCritical() << timeSteps;
|
||||||
|
int Down = 0;
|
||||||
|
int Up = 1;
|
||||||
|
//compute_next_timestep(&cfg, )
|
||||||
|
|
||||||
for (int i=0; i<timeSteps.size(); ++i) {
|
for (int i=0; i<timeSteps.size(); ++i) {
|
||||||
uint32_t price = calculator.GetPriceForTimeStep(&cfg, timeSteps.at(i));
|
int nextTimeStep = compute_next_timestep(&cfg, timeSteps.at(i), Up);
|
||||||
uint32_t duration = calculator.GetDurationForPrice(&cfg, price);
|
qCritical() << "nextTimeStep" << nextTimeStep;
|
||||||
qCritical() << "nextTimeStep relative to start:"
|
|
||||||
<< duration << start.addSecs(duration * 60)
|
// uint32_t price = calculator.GetPriceForTimeStep(&cfg, timeSteps.at(i));
|
||||||
<< "(price so far:" << price << ")";
|
// uint32_t duration = calculator.GetDurationForPrice(&cfg, price);
|
||||||
|
// qCritical() << "nextTimeStep relative to start:"
|
||||||
|
// << duration << start.addSecs(duration * 60)
|
||||||
|
// << "(price so far:" << price << ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user