scheduling.hh
Go to the documentation of this file.
00001 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 00002 /* 00003 * Main authors: 00004 * Mikael Lagerkvist <lagerkvist@gecode.org> 00005 * Christian Schulte <schulte@gecode.org> 00006 * Guido Tack <tack@gecode.org> 00007 * 00008 * Copyright: 00009 * Mikael Lagerkvist, 2005 00010 * Christian Schulte, 2009 00011 * Guido Tack, 2010 00012 * 00013 * Last modified: 00014 * $Date: 2011-01-18 23:37:08 +0100 (Tue, 18 Jan 2011) $ by $Author: tack $ 00015 * $Revision: 11551 $ 00016 * 00017 * This file is part of Gecode, the generic constraint 00018 * development environment: 00019 * http://www.gecode.org 00020 * 00021 * Permission is hereby granted, free of charge, to any person obtaining 00022 * a copy of this software and associated documentation files (the 00023 * "Software"), to deal in the Software without restriction, including 00024 * without limitation the rights to use, copy, modify, merge, publish, 00025 * distribute, sublicense, and/or sell copies of the Software, and to 00026 * permit persons to whom the Software is furnished to do so, subject to 00027 * the following conditions: 00028 * 00029 * The above copyright notice and this permission notice shall be 00030 * included in all copies or substantial portions of the Software. 00031 * 00032 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00033 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00034 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00035 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 00036 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 00037 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00038 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00039 * 00040 */ 00041 00042 #ifndef __GECODE_SCHEDULING_HH__ 00043 #define __GECODE_SCHEDULING_HH__ 00044 00045 #include <gecode/int.hh> 00046 00047 /* 00048 * Configure linking 00049 * 00050 */ 00051 #if !defined(GECODE_STATIC_LIBS) && \ 00052 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER)) 00053 00054 #ifdef GECODE_BUILD_SCHEDULING 00055 #define GECODE_SCHEDULING_EXPORT __declspec( dllexport ) 00056 #else 00057 #define GECODE_SCHEDULING_EXPORT __declspec( dllimport ) 00058 #endif 00059 00060 #else 00061 00062 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY 00063 #define GECODE_SCHEDULING_EXPORT __attribute__ ((visibility("default"))) 00064 #else 00065 #define GECODE_SCHEDULING_EXPORT 00066 #endif 00067 00068 #endif 00069 00070 // Configure auto-linking 00071 #ifndef GECODE_BUILD_SCHEDULING 00072 #define GECODE_LIBRARY_NAME "Scheduling" 00073 #include <gecode/support/auto-link.hpp> 00074 #endif 00075 00082 namespace Gecode { 00083 00089 00091 enum TaskType { 00092 TT_FIXP, //< Task with fixed processing time 00093 TT_FIXS, //< Task with fixed start time 00094 TT_FIXE //< Task with fixed end time 00095 }; 00096 00098 typedef PrimArgArray<TaskType> TaskTypeArgs; 00100 template<> 00101 class ArrayTraits<PrimArgArray<TaskType> > { 00102 public: 00103 typedef TaskTypeArgs StorageType; 00104 typedef TaskType ValueType; 00105 typedef TaskTypeArgs ArgsType; 00106 }; 00107 00147 GECODE_SCHEDULING_EXPORT void 00148 cumulatives(Home home, const IntVarArgs& machine, 00149 const IntVarArgs& start, const IntVarArgs& duration, 00150 const IntVarArgs& end, const IntVarArgs& height, 00151 const IntArgs& limit, bool at_most, 00152 IntConLevel icl=ICL_DEF); 00157 GECODE_SCHEDULING_EXPORT void 00158 cumulatives(Home home, const IntArgs& machine, 00159 const IntVarArgs& start, const IntVarArgs& duration, 00160 const IntVarArgs& end, const IntVarArgs& height, 00161 const IntArgs& limit, bool at_most, 00162 IntConLevel icl=ICL_DEF); 00167 GECODE_SCHEDULING_EXPORT void 00168 cumulatives(Home home, const IntVarArgs& machine, 00169 const IntVarArgs& start, const IntArgs& duration, 00170 const IntVarArgs& end, const IntVarArgs& height, 00171 const IntArgs& limit, bool at_most, 00172 IntConLevel icl=ICL_DEF); 00177 GECODE_SCHEDULING_EXPORT void 00178 cumulatives(Home home, const IntArgs& machine, 00179 const IntVarArgs& start, const IntArgs& duration, 00180 const IntVarArgs& end, const IntVarArgs& height, 00181 const IntArgs& limit, bool at_most, 00182 IntConLevel icl=ICL_DEF); 00187 GECODE_SCHEDULING_EXPORT void 00188 cumulatives(Home home, const IntVarArgs& machine, 00189 const IntVarArgs& start, const IntVarArgs& duration, 00190 const IntVarArgs& end, const IntArgs& height, 00191 const IntArgs& limit, bool at_most, 00192 IntConLevel icl=ICL_DEF); 00197 GECODE_SCHEDULING_EXPORT void 00198 cumulatives(Home home, const IntArgs& machine, 00199 const IntVarArgs& start, const IntVarArgs& duration, 00200 const IntVarArgs& end, const IntArgs& height, 00201 const IntArgs& limit, bool at_most, 00202 IntConLevel icl=ICL_DEF); 00207 GECODE_SCHEDULING_EXPORT void 00208 cumulatives(Home home, const IntVarArgs& machine, 00209 const IntVarArgs& start, const IntArgs& duration, 00210 const IntVarArgs& end, const IntArgs& height, 00211 const IntArgs& limit, bool at_most, 00212 IntConLevel icl=ICL_DEF); 00217 GECODE_SCHEDULING_EXPORT void 00218 cumulatives(Home home, const IntArgs& machine, 00219 const IntVarArgs& start, const IntArgs& duration, 00220 const IntVarArgs& end, const IntArgs& height, 00221 const IntArgs& limit, bool at_most, 00222 IntConLevel icl=ICL_DEF); 00223 00242 GECODE_SCHEDULING_EXPORT void 00243 unary(Home home, const IntVarArgs& s, const IntArgs& p); 00244 00265 GECODE_SCHEDULING_EXPORT void 00266 unary(Home home, const IntVarArgs& s, const IntArgs& p, 00267 const BoolVarArgs& m); 00268 00297 GECODE_SCHEDULING_EXPORT void 00298 unary(Home home, const TaskTypeArgs& t, 00299 const IntVarArgs& s, const IntArgs& p); 00300 00331 GECODE_SCHEDULING_EXPORT void 00332 unary(Home home, const TaskTypeArgs& t, 00333 const IntVarArgs& s, const IntArgs& p, const BoolVarArgs& m); 00334 00354 GECODE_SCHEDULING_EXPORT void 00355 unary(Home home, const IntVarArgs& s, const IntVarArgs& p, 00356 const IntVarArgs& e); 00357 00379 GECODE_SCHEDULING_EXPORT void 00380 unary(Home home, const IntVarArgs& s, const IntVarArgs& p, 00381 const IntVarArgs& e, const BoolVarArgs& m); 00382 00417 GECODE_SCHEDULING_EXPORT void 00418 cumulative(Home home, int c, const TaskTypeArgs& t, 00419 const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u); 00420 00457 GECODE_SCHEDULING_EXPORT void 00458 cumulative(Home home, int c, const TaskTypeArgs& t, 00459 const IntVarArgs& s, const IntArgs& p, const IntArgs& u, 00460 const BoolVarArgs& m); 00461 00486 GECODE_SCHEDULING_EXPORT void 00487 cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p, 00488 const IntArgs& u); 00489 00516 GECODE_SCHEDULING_EXPORT void 00517 cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p, 00518 const IntArgs& u, const BoolVarArgs& m); 00519 00548 GECODE_SCHEDULING_EXPORT void 00549 cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p, 00550 const IntVarArgs& e, const IntArgs& u); 00551 00582 GECODE_SCHEDULING_EXPORT void 00583 cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p, 00584 const IntVarArgs& e, const IntArgs& u, const BoolVarArgs& m); 00586 00587 } 00588 00589 #endif 00590 00591 // STATISTICS: scheduling-post 00592