| 424 | ProblemData::VehicleType::~VehicleType() { delete[] name; } |
| 425 | |
| 426 | ProblemData::VehicleType ProblemData::VehicleType::replace( |
| 427 | std::optional<size_t> numAvailable, |
| 428 | std::optional<std::vector<Load>> capacity, |
| 429 | std::optional<size_t> startDepot, |
| 430 | std::optional<size_t> endDepot, |
| 431 | std::optional<Cost> fixedCost, |
| 432 | std::optional<Duration> twEarly, |
| 433 | std::optional<Duration> twLate, |
| 434 | std::optional<Duration> shiftDuration, |
| 435 | std::optional<Distance> maxDistance, |
| 436 | std::optional<Cost> unitDistanceCost, |
| 437 | std::optional<Cost> unitDurationCost, |
| 438 | std::optional<size_t> profile, |
| 439 | std::optional<Duration> startLate, |
| 440 | std::optional<std::vector<Load>> initialLoad, |
| 441 | std::optional<std::vector<size_t>> reloadDepots, |
| 442 | std::optional<size_t> maxReloads, |
| 443 | std::optional<Duration> maxOvertime, |
| 444 | std::optional<Cost> unitOvertimeCost, |
| 445 | std::optional<std::string> name) const |
| 446 | { |
| 447 | return {numAvailable.value_or(this->numAvailable), |
| 448 | capacity.value_or(this->capacity), |
| 449 | startDepot.value_or(this->startDepot), |
| 450 | endDepot.value_or(this->endDepot), |
| 451 | fixedCost.value_or(this->fixedCost), |
| 452 | twEarly.value_or(this->twEarly), |
| 453 | twLate.value_or(this->twLate), |
| 454 | shiftDuration.value_or(this->shiftDuration), |
| 455 | maxDistance.value_or(this->maxDistance), |
| 456 | unitDistanceCost.value_or(this->unitDistanceCost), |
| 457 | unitDurationCost.value_or(this->unitDurationCost), |
| 458 | profile.value_or(this->profile), |
| 459 | startLate.value_or(this->startLate), |
| 460 | initialLoad.value_or(this->initialLoad), |
| 461 | reloadDepots.value_or(this->reloadDepots), |
| 462 | maxReloads.value_or(this->maxReloads), |
| 463 | maxOvertime.value_or(this->maxOvertime), |
| 464 | unitOvertimeCost.value_or(this->unitOvertimeCost), |
| 465 | name.value_or(this->name)}; |
| 466 | } |
| 467 | |
| 468 | size_t ProblemData::VehicleType::maxTrips() const |
| 469 | { |
no outgoing calls