Check paymentOptionIndex for test of GALTUER.
This commit is contained in:
parent
9d72574106
commit
44efd44ede
@ -37,8 +37,8 @@ extern "C" char* strptime(const char* s,
|
||||
#define SZEGED (0)
|
||||
#define SCHOENAU_KOENIGSEE (0)
|
||||
#define NEUHAUSER_KORNEUBURG (0)
|
||||
#define NEUHAUSER_LINSINGER_MASCHINENBAU (0)
|
||||
#define NEUHAUSER_NORDISCHES_AUSBILDUNGSZENTRUM (1)
|
||||
#define NEUHAUSER_LINSINGER_MASCHINENBAU (1)
|
||||
#define NEUHAUSER_NORDISCHES_AUSBILDUNGSZENTRUM (0)
|
||||
#define NEUHAUSER_BILEXA_GALTUER (0)
|
||||
#define NEUHAUSER_KIRCHDORF (0)
|
||||
#define BAD_NEUENAHR_AHRWEILER (0)
|
||||
@ -1005,7 +1005,7 @@ int main() {
|
||||
cout << endl;
|
||||
|
||||
if (isParsed) {
|
||||
int minParkingTime = get_minimal_parkingtime(&cfg);
|
||||
//int minParkingTime = get_minimal_parkingtime(&cfg);
|
||||
QList<int> timeSteps = Calculator::GetInstance().GetTimeSteps(&cfg);
|
||||
qCritical() << timeSteps;
|
||||
int Down = 0;
|
||||
@ -1013,11 +1013,19 @@ int main() {
|
||||
//compute_next_timestep(&cfg, )
|
||||
|
||||
QDateTime const start = QDateTime::currentDateTime();
|
||||
int paymentOptionIndex = cfg.getPaymentOptionIndex(start);
|
||||
|
||||
if (paymentOptionIndex < 0) {
|
||||
qCritical() << "ERROR paymentOptionIndex" << paymentOptionIndex
|
||||
<< "< 0 for start" << start.toString(Qt::ISODate);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
for (int i=0; i<timeSteps.size(); ++i) {
|
||||
int nextTimeStep = compute_next_timestep(&cfg, timeSteps.at(i), Up);
|
||||
qCritical() << "nextTimeStep" << nextTimeStep;
|
||||
|
||||
uint32_t price = Calculator::GetInstance().GetPriceForTimeStep(&cfg, timeSteps.at(i));
|
||||
uint32_t price = Calculator::GetInstance().GetPriceForTimeStep(&cfg, timeSteps.at(i), paymentOptionIndex);
|
||||
uint32_t duration = Calculator::GetInstance().GetDurationForPrice(&cfg, price);
|
||||
qCritical() << "nextTimeStep relative to start:"
|
||||
<< duration << start.addSecs(duration * 60).toString(Qt::ISODate)
|
||||
|
Loading…
Reference in New Issue
Block a user