diff --git a/src/libs/antares/study/area/list.cpp b/src/libs/antares/study/area/list.cpp index 64a33cea07..0f4af06576 100644 --- a/src/libs/antares/study/area/list.cpp +++ b/src/libs/antares/study/area/list.cpp @@ -985,80 +985,6 @@ static bool AreaListLoadFromFolderSingleArea(Study& study, } } - // Reserves - { - buffer.clear() << study.folderInput << SEP << "reserves" << SEP << area.id << SEP - << "reserves.ini"; - if (ini.open(buffer, false)) - { - ini.each( - [&](const IniFile::Section& section) - { - if (area.allCapacityReservations.contains(section.name)) - { - logs.warning() << area.name << ": reserve name already exists for reserve " - << section.name; - } - else - { - CapacityReservation tmpCapacityReservation; - std::string file_name = AllCapacityReservations::toFilename(section.name); - int type = -1; - for (auto* p = section.firstProperty; p; p = p->next) - { - CString<30, false> tmp; - tmp = p->key; - tmp.toLower(); - - if (tmp == "failure-cost") - { - if (!p->value.to(tmpCapacityReservation.failureCost)) - { - logs.warning() - << area.name << ": invalid failure cost for reserve " - << section.name; - } - } - else if (tmp == "spillage-cost") - { - if (!p->value.to(tmpCapacityReservation.spillageCost)) - { - logs.warning() - << area.name << ": invalid spillage cost for reserve " - << section.name; - } - } - else if (tmp == "type") - { - if (p->value == "up") - type = 0; - else if (p->value == "down") - type = 1; - else - logs.warning() - << area.name << ": invalid type for reserve " << section.name; - } - else - logs.warning() - << area.name << ": invalid key " << tmp << " in file " << buffer; - } - fs::path filePath = study.folderInput / "reserves" / area.id.to() - / (file_name + ".txt"); - ret = tmpCapacityReservation.need.loadFromFile(filePath, false) && ret; - if (type == 0) - area.allCapacityReservations.areaCapacityReservationsUp.emplace( - section.name, tmpCapacityReservation); - else if (type == 1) - area.allCapacityReservations.areaCapacityReservationsDown.emplace( - section.name, tmpCapacityReservation); - else - logs.warning() - << area.name << ": invalid type for reserve " << section.name; - } - }); - } - } - // Solar { if (area.solar.prepro) // Prepro