A maintenance operation begins after the end time of its corresponding job activity and ends before the start time of the following activity on its machine. We calculate the start time of the following activity using a variable transition cost on the machine. This variable transition cost is defined in Concert Technology using the macro ILOTRANSITIONCOSTOBJECT
. This macro allows the definition and extraction of a variable transaction cost in Concert. First of all, StartTCostObjectIlcI
, a derived class of IlcTransitionCostObjectI
, is created for this purpose. An instance of this class is used during the search to calculate the transition costs. The macro ILOTRANSITIONCOSTOBJECT
defines a Concert Technology variable transition cost class, StartTCostObject
, that will be extracted into an instance of StartTCostObjectIlcI
. Notice that the chosen teardown cost ensures that the last maintenance operation ends before the horizon of the schedule.
class StartTCostObjectIlcI : public IlcTransitionCostObjectI {
public:
StartTCostObjectIlcI();
~StartTCostObjectIlcI();
virtual IlcInt getTransitionCostMax(const IlcResourceConstraint srct1,
const IlcResourceConstraint srct2)
const;
virtual IlcInt getTransitionCostMin(const IlcResourceConstraint srct1,
const IlcResourceConstraint srct2)
const;
virtual IlcInt getSetupCostMin(const IlcResourceConstraint srct1) const;
virtual IlcInt getSetupCostMax(const IlcResourceConstraint srct1) const;
virtual IlcInt getTeardownCostMin(const IlcResourceConstraint srct1)
const;
virtual IlcInt getTeardownCostMax(const IlcResourceConstraint srct1)
const;
};
StartTCostObjectIlcI::StartTCostObjectIlcI()
:IlcTransitionCostObjectI(IlcTrue)
{}
StartTCostObjectIlcI::~StartTCostObjectIlcI() {}
IlcInt
StartTCostObjectIlcI::getTransitionCostMax(const IlcResourceConstraint,
const IlcResourceConstraint srct2)
const {
return srct2.getActivity().getStartMax();
}
IlcInt
StartTCostObjectIlcI::getTransitionCostMin(const IlcResourceConstraint,
const IlcResourceConstraint srct2)
const {
return srct2.getActivity().getStartMin();
}
IlcInt
StartTCostObjectIlcI::getSetupCostMin(const IlcResourceConstraint srct1)
const {
return srct1.getActivity().getStartMin();
}
IlcInt
StartTCostObjectIlcI::getSetupCostMax(const IlcResourceConstraint srct1)
const {
return srct1.getActivity().getStartMax();
}
IlcInt
StartTCostObjectIlcI::getTeardownCostMin(const IlcResourceConstraint srct1)
const {
return srct1.getActivity().getEndMin();
}
IlcInt
StartTCostObjectIlcI::getTeardownCostMax(const IlcResourceConstraint srct1)
const {
return srct1.getActivity().getEndMax();
}
ILOTRANSITIONCOSTOBJECT0(StartTCostObject, solver) {
return new (solver.getHeap()) StartTCostObjectIlcI();
}
IloTransitionCostObject startTCostObj =
StartTCostObject(env);