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