46 list<const Flow*> thealternates;
50 if ((i->getAlternate() == x || &*i == x)
52 thealternates.push_front(&*i);
58 bool originalPlanningMode = data->constrainedPlanning;
59 data->constrainedPlanning =
true;
60 const Flow *firstAlternate = NULL;
61 double firstQuantity = 0.0;
64 bool originalLogConstraints = data->logConstraints;
68 Date min_next_date(Date::infiniteFuture);
71 for (list<const Flow*>::const_iterator i = thealternates.begin();
72 i != thealternates.end();)
74 const Flow *curflow = *i;
90 <<
" User exit disallows consumption from '"
91 << (*i)->getBuffer()->getName() <<
"'" << endl;
96 << (*i)->getBuffer()->getName() <<
"'" << endl;
109 if (*i != firstAlternate)
111 data->logConstraints =
false;
114 data->logConstraints = originalLogConstraints;
134 data->constrainedPlanning = originalPlanningMode;
135 data->logConstraints = originalLogConstraints;
149 << (*i)->getBuffer()->getName() <<
"'" << endl;
153 if (!originalPlanningMode)
155 assert(firstAlternate);
158 if (flplan->
getFlow() != firstAlternate)
159 flplan->
setFlow(firstAlternate);
163 <<
" Alternate flow plans unconstrained on alternate '"
166 data->constrainedPlanning =
false;
174 data->constrainedPlanning = originalPlanningMode;
183 " Alternate flow doesn't find supply on any alternate : "
205 <<
" because of a date effective flow" << endl;