File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,25 +119,15 @@ JresStandardSolver::CapacityAnalysis JresStandardSolver::calculate_max_potential
119119
120120 std::vector<bool > planned_drive (m_input.stints .size (), false );
121121 int base_capacity = 0 ;
122- int current_consecutive = 0 ;
123- int maxConsecutive = (p.maxStints > 0 ) ? p.maxStints : 1 ;
124-
125122 double driver_total_hours = 0.0 ;
126123
127124 for (size_t s=0 ; s<m_input.stints .size (); ++s) {
128125 if (is_available[s]) {
129- if (current_consecutive < maxConsecutive) {
130- planned_drive[s] = true ;
131- base_capacity++;
132- current_consecutive++;
133-
134- auto duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(endTimes[s] - startTimes[s]).count ();
135- driver_total_hours += static_cast <double >(duration_ms) / 3600000.0 ;
136- } else {
137- current_consecutive = 0 ; // Forced rest
138- }
139- } else {
140- current_consecutive = 0 ;
126+ planned_drive[s] = true ;
127+ base_capacity++;
128+
129+ auto duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(endTimes[s] - startTimes[s]).count ();
130+ driver_total_hours += static_cast <double >(duration_ms) / 3600000.0 ;
141131 }
142132 }
143133
You can’t perform that action at this time.
0 commit comments