order.hh
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Christian Schulte, 2019
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifndef __GECODE_INT_ORDER_HH__
#define __GECODE_INT_ORDER_HH__
#include <gecode/int.hh>
namespace Gecode { namespace Int { namespace Order {
class OrderProp : public Propagator {
protected:
IntView s0, s1;
BoolView b;
int p0, p1;
OrderProp(Space& home, OrderProp& p);
OrderProp(Home home, IntView s0, int p0, IntView s1, int p1,
BoolView b);
public:
GECODE_INT_EXPORT
virtual Actor* copy(Space& home);
GECODE_INT_EXPORT
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
GECODE_INT_EXPORT
virtual void reschedule(Space& home);
GECODE_INT_EXPORT
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, IntView s0, int p0, IntView s1, int p1,
BoolView b);
GECODE_INT_EXPORT
virtual size_t dispose(Space& home);
};
}}}
#include <gecode/int/order/propagate.hpp>
#endif
// STATISTICS: int-prop
Gecode::ActorLink::Actor
friend class Actor
Definition core.hpp:590
Gecode::Home
Home class for posting propagators
Definition core.hpp:856
Gecode::Int::BoolView
Boolean view for Boolean variables.
Definition view.hpp:1380
Gecode::Int::IntView
Integer view for integer variables.
Definition view.hpp:129
Gecode::Int::Order::OrderProp::post
static ExecStatus post(Home home, IntView s0, int p0, IntView s1, int p1, BoolView b)
Post order propagator.
Definition propagate.hpp:48
Gecode::Int::Order::OrderProp::b
BoolView b
Boolean view for order.
Definition order.hh:58
Gecode::Int::Order::OrderProp::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition propagate.cpp:76
Gecode::Int::Order::OrderProp::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary).
Definition propagate.cpp:44
Gecode::Int::Order::OrderProp::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition propagate.cpp:39
Gecode::Int::Order::OrderProp::s1
IntView s1
Definition order.hh:56
Gecode::Int::Order::OrderProp::p0
int p0
Processing times.
Definition order.hh:60
Gecode::Int::Order::OrderProp::OrderProp
OrderProp(Space &home, OrderProp &p)
Constructor for cloning.
Definition propagate.hpp:67
Gecode::Int::Order::OrderProp::s0
IntView s0
View for start times.
Definition order.hh:56
Gecode::Int::Order::OrderProp::reschedule
virtual void reschedule(Space &home)
Schedule function.
Definition propagate.cpp:49
Gecode::Int::Order::OrderProp::p1
int p1
Definition order.hh:60
Gecode::Int::Order::OrderProp::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition propagate.cpp:56
Gecode::PropCost
Propagation cost.
Definition core.hpp:486
Gecode::Propagator::Space
friend class Space
Definition core.hpp:1066
Gecode::Propagator::med
ModEventDelta med
A set of modification events (used during propagation).
Definition core.hpp:1075
Gecode::Propagator::Propagator
Propagator(Home home)
Constructor for posting.
Definition core.hpp:3498
int.hh
GECODE_INT_EXPORT
#define GECODE_INT_EXPORT
Definition int.hh:81
Gecode::ModEventDelta
int ModEventDelta
Modification event deltas.
Definition core.hpp:89
Gecode::Int::Order
Int for ordering two tasks
Gecode::Int
Finite domain integers.
Gecode
Gecode toplevel namespace
Gecode::ExecStatus
ExecStatus
Definition core.hpp:472
propagate.hpp