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 * 00007 * Copyright: 00008 * Mikael Lagerkvist, 2005 00009 * Christian Schulte, 2009 00010 * 00011 * Last modified: 00012 * $Date: 2010-06-18 10:37:36 +0200 (Fri, 18 Jun 2010) $ by $Author: schulte $ 00013 * $Revision: 11087 $ 00014 * 00015 * This file is part of Gecode, the generic constraint 00016 * development environment: 00017 * http://www.gecode.org 00018 * 00019 * Permission is hereby granted, free of charge, to any person obtaining 00020 * a copy of this software and associated documentation files (the 00021 * "Software"), to deal in the Software without restriction, including 00022 * without limitation the rights to use, copy, modify, merge, publish, 00023 * distribute, sublicense, and/or sell copies of the Software, and to 00024 * permit persons to whom the Software is furnished to do so, subject to 00025 * the following conditions: 00026 * 00027 * The above copyright notice and this permission notice shall be 00028 * included in all copies or substantial portions of the Software. 00029 * 00030 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00031 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00032 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00033 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 00034 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 00035 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00036 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00037 * 00038 */ 00039 00040 #ifndef __GECODE_SCHEDULING_HH__ 00041 #define __GECODE_SCHEDULING_HH__ 00042 00043 #include <gecode/int.hh> 00044 00045 /* 00046 * Configure linking 00047 * 00048 */ 00049 #if !defined(GECODE_STATIC_LIBS) && \ 00050 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER)) 00051 00052 #ifdef GECODE_BUILD_SCHEDULING 00053 #define GECODE_SCHEDULING_EXPORT __declspec( dllexport ) 00054 #else 00055 #define GECODE_SCHEDULING_EXPORT __declspec( dllimport ) 00056 #endif 00057 00058 #else 00059 00060 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY 00061 #define GECODE_SCHEDULING_EXPORT __attribute__ ((visibility("default"))) 00062 #else 00063 #define GECODE_SCHEDULING_EXPORT 00064 #endif 00065 00066 #endif 00067 00068 // Configure auto-linking 00069 #ifndef GECODE_BUILD_SCHEDULING 00070 #define GECODE_LIBRARY_NAME "Scheduling" 00071 #include <gecode/support/auto-link.hpp> 00072 #endif 00073 00080 namespace Gecode { 00081 00087 00089 enum TaskType { 00090 TT_FIXP, //< Task with fixed processing time 00091 TT_FIXS, //< Task with fixed start time 00092 TT_FIXE //< Task with fixed end time 00093 }; 00094 00096 typedef PrimArgArray<TaskType> TaskTypeArgs; 00098 template<> 00099 class ArrayTraits<PrimArgArray<TaskType> > { 00100 public: 00101 typedef TaskTypeArgs StorageType; 00102 typedef TaskType ValueType; 00103 typedef TaskTypeArgs ArgsType; 00104 }; 00105 00145 GECODE_SCHEDULING_EXPORT void 00146 cumulatives(Home home, const IntVarArgs& machine, 00147 const IntVarArgs& start, const IntVarArgs& duration, 00148 const IntVarArgs& end, const IntVarArgs& height, 00149 const IntArgs& limit, bool at_most, 00150 IntConLevel icl=ICL_DEF); 00155 GECODE_SCHEDULING_EXPORT void 00156 cumulatives(Home home, const IntArgs& machine, 00157 const IntVarArgs& start, const IntVarArgs& duration, 00158 const IntVarArgs& end, const IntVarArgs& height, 00159 const IntArgs& limit, bool at_most, 00160 IntConLevel icl=ICL_DEF); 00165 GECODE_SCHEDULING_EXPORT void 00166 cumulatives(Home home, const IntVarArgs& machine, 00167 const IntVarArgs& start, const IntArgs& duration, 00168 const IntVarArgs& end, const IntVarArgs& height, 00169 const IntArgs& limit, bool at_most, 00170 IntConLevel icl=ICL_DEF); 00175 GECODE_SCHEDULING_EXPORT void 00176 cumulatives(Home home, const IntArgs& machine, 00177 const IntVarArgs& start, const IntArgs& duration, 00178 const IntVarArgs& end, const IntVarArgs& height, 00179 const IntArgs& limit, bool at_most, 00180 IntConLevel icl=ICL_DEF); 00185 GECODE_SCHEDULING_EXPORT void 00186 cumulatives(Home home, const IntVarArgs& machine, 00187 const IntVarArgs& start, const IntVarArgs& duration, 00188 const IntVarArgs& end, const IntArgs& height, 00189 const IntArgs& limit, bool at_most, 00190 IntConLevel icl=ICL_DEF); 00195 GECODE_SCHEDULING_EXPORT void 00196 cumulatives(Home home, const IntArgs& machine, 00197 const IntVarArgs& start, const IntVarArgs& duration, 00198 const IntVarArgs& end, const IntArgs& height, 00199 const IntArgs& limit, bool at_most, 00200 IntConLevel icl=ICL_DEF); 00205 GECODE_SCHEDULING_EXPORT void 00206 cumulatives(Home home, const IntVarArgs& machine, 00207 const IntVarArgs& start, const IntArgs& duration, 00208 const IntVarArgs& end, const IntArgs& height, 00209 const IntArgs& limit, bool at_most, 00210 IntConLevel icl=ICL_DEF); 00215 GECODE_SCHEDULING_EXPORT void 00216 cumulatives(Home home, const IntArgs& machine, 00217 const IntVarArgs& start, const IntArgs& duration, 00218 const IntVarArgs& end, const IntArgs& height, 00219 const IntArgs& limit, bool at_most, 00220 IntConLevel icl=ICL_DEF); 00221 00240 GECODE_SCHEDULING_EXPORT void 00241 unary(Home home, const IntVarArgs& s, const IntArgs& p); 00242 00263 GECODE_SCHEDULING_EXPORT void 00264 unary(Home home, const IntVarArgs& s, const IntArgs& p, 00265 const BoolVarArgs& m); 00266 00295 GECODE_SCHEDULING_EXPORT void 00296 unary(Home home, const TaskTypeArgs& t, 00297 const IntVarArgs& s, const IntArgs& p); 00298 00329 GECODE_SCHEDULING_EXPORT void 00330 unary(Home home, const TaskTypeArgs& t, 00331 const IntVarArgs& s, const IntArgs& p, const BoolVarArgs& m); 00332 00352 GECODE_SCHEDULING_EXPORT void 00353 unary(Home home, const IntVarArgs& s, const IntVarArgs& p, 00354 const IntVarArgs& e); 00355 00377 GECODE_SCHEDULING_EXPORT void 00378 unary(Home home, const IntVarArgs& s, const IntVarArgs& p, 00379 const IntVarArgs& e, const BoolVarArgs& m); 00380 00415 GECODE_SCHEDULING_EXPORT void 00416 cumulative(Home home, int c, const TaskTypeArgs& t, 00417 const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u); 00418 00455 GECODE_SCHEDULING_EXPORT void 00456 cumulative(Home home, int c, const TaskTypeArgs& t, 00457 const IntVarArgs& s, const IntArgs& p, const IntArgs& u, 00458 const BoolVarArgs& m); 00459 00484 GECODE_SCHEDULING_EXPORT void 00485 cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p, 00486 const IntArgs& u); 00487 00514 GECODE_SCHEDULING_EXPORT void 00515 cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p, 00516 const IntArgs& u, const BoolVarArgs& m); 00517 00546 GECODE_SCHEDULING_EXPORT void 00547 cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p, 00548 const IntVarArgs& e, const IntArgs& u); 00549 00580 GECODE_SCHEDULING_EXPORT void 00581 cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p, 00582 const IntVarArgs& e, const IntArgs& u, const BoolVarArgs& m); 00584 00585 } 00586 00587 #endif 00588 00589 // STATISTICS: scheduling-post 00590