field_coverage.h
Go to the documentation of this file.
1 //=============================================================================
2 // Copyright (C) 2021-2024 Wageningen University - All Rights Reserved
3 // Author: Gonzalo Mier
4 // BSD-3 License
5 //=============================================================================
6 
7 #pragma once
8 #ifndef FIELDS2COVER_OBJECTIVES_FIELD_COVERAGE_H_
9 #define FIELDS2COVER_OBJECTIVES_FIELD_COVERAGE_H_
10 
11 #include <utility>
12 #include <memory>
13 #include "fields2cover/types.h"
15 
16 namespace f2c::obj {
17 
18 // Works only if all the swaths have same width
20 class FieldCoverage : public SGObjective {
21  public:
23  double computeCost(const F2CCell& poly, const F2CSwaths& swaths) override;
24  double computeCost(const F2CCells& poly, const F2CSwaths& swaths) override;
25 
26  public:
27  bool isMinimizing(void) const override;
28 };
29 
30 } // namespace f2c::obj
31 
32 #endif // FIELDS2COVER_OBJECTIVES_FIELD_COVERAGE_H_
5_route_planning.swaths
swaths
Definition: 5_route_planning.py:58
types.h
f2c::obj::FieldCoverage::computeCost
double computeCost(const F2CCell &poly, const F2CSwaths &swaths) override
Compute the cost function.
Definition: field_coverage.cpp:11
f2c::obj::SGObjective
Base class for objective functions of swath generators.
Definition: sg_objective.h:21
f2c::types::Cell
Definition: Cell.h:32
f2c::obj
Objective algorithms' namespace.
Definition: base_objective.h:14
f2c::obj::FieldCoverage
SG objective function as the percentage of the field covered.
Definition: field_coverage.h:20
f2c::types::Cells
Definition: Cells.h:21
sg_objective.h
f2c::obj::FieldCoverage::isMinimizing
bool isMinimizing(void) const override
Return true if the objective is to minimize the cost function.
Definition: field_coverage.cpp:28
f2c::obj::SGObjective::computeCost
virtual double computeCost(const F2CSwath &)
Compute the cost function.
Definition: sg_objective.cpp:11
f2c::types::Swaths
Definition: Swaths.h:20


fields2cover
Author(s):
autogenerated on Fri Apr 25 2025 02:18:31