38 x.
setDoc(
"frePPLe loadplan");
49 ld =
const_cast<Load*
>(r);
62 while (c->nextLoadPlan) c = c->nextLoadPlan;
63 c->nextLoadPlan =
this;
67 o->firstloadplan =
this;
91 ld =
const_cast<Load*
>(r);
100 if (o->firstloadplan)
104 while (c->nextLoadPlan) c = c->nextLoadPlan;
105 c->nextLoadPlan =
this;
109 o->firstloadplan =
this;
126 if (res == newres)
return;
129 if (!newres)
throw DataException(
"Can't switch to NULL resource");
137 throw DataException(
"Resource isn't matching the resource specified on the load");
143 for(Resource::skilllist::const_iterator s = newres->
getSkills().begin();
144 s != newres->
getSkills().end() && !ok; s++)
147 throw DataException(
"Resource misses the skill specified on the load");
159 bool oldHasSetup = ld && !ld->
getSetup().empty()
161 bool newHasSetup = ld && !ld->
getSetup().empty()
172 if (!setupOpplan) oldHasSetup =
false;
182 if (j->getLoad() == ld)
188 throw LogicException(
"Can't find loadplan on setup operationplan");
223 prevldplan =
const_cast<LoadPlan*
>(l);
237 prevldplan =
const_cast<LoadPlan*
>(l);
250 res->loadplans.
erase(ldplan);
257 ldplan->res = newres;
265 if (ldplan !=
this) ldplan =
this;
270 if (prevldplan) prevldplan->res->
updateSetups(prevldplan);
279 for (
LoadPlan *i = oper->firstloadplan; i; i = i->nextLoadPlan)
280 if (i->ld == ld && i !=
this)
return i;
307 static string nosetup;
309 if (!
getResource()->getSetupMatrix())
return nosetup;
315 for (Resource::loadplanlist::const_iterator i(
this);
342 prevldplan =
const_cast<LoadPlan*
>(l);
356 prevldplan =
const_cast<LoadPlan*
>(l);
370 if (newld == ld)
return;
373 if (!newld)
throw DataException(
"Can't switch to NULL load");
375 throw DataException(
"Only switching to a load on the same operation is allowed");
379 if (o) o->ld = newld;
428 Load* y =
static_cast<Load*
>(
static_cast<PyObject*
>(field));
442 x.
setDoc(
"frePPLe iterator for loadplan");
448 PyObject* LoadPlanIterator::iternext()
451 if (resource_or_opplan)
466 ld =
static_cast<LoadPlan*
>(&*((*opplaniter)++));
469 return const_cast<LoadPlan*
>(ld);