License | BSD3 |
---|---|
Maintainer | Gert-Jan Bottu <gertjan.bottu@kuleuven.be> |
Stability | experimental |
Safe Haskell | Safe |
Language | Haskell2010 |
This module defines an interface for constructing action sequence expressions, required for the TimeSpaceConstr.TimeSpaceConstraints module, in order to construct time space constraints.
- data ASExpr
- = AtleastCells Int
- | AtmostCells Int
- | Atleast Int Int
- | Atmost Int Int
- | Incompatible Int Int
- | Implication Int Int
- | ValuePrecedence Int Int
- | StretchMin Int Int
- | StretchMax Int Int
- | Or Int Int
- actionSeqConstraint :: Int -> String -> ASExpr -> ModelData
- atleast_cells :: Int -> ASExpr
- atmost_cells :: Int -> ASExpr
- atleast :: Int -> Int -> ASExpr
- atmost :: Int -> Int -> ASExpr
- incompatible :: Int -> Int -> ASExpr
- implication :: Int -> Int -> ASExpr
- value_precedence :: Int -> Int -> ASExpr
- stretch_min :: Int -> Int -> ASExpr
- stretch_max :: Int -> Int -> ASExpr
- or_as :: Int -> Int -> ASExpr
- data ASCostExpr
- actionSeqCost :: String -> String -> ASCostExpr -> ModelData
- uniformCost :: Int -> Int -> ASCostExpr
- discountCost :: Int -> Int -> Int -> Int -> Bool -> ASCostExpr
- dependentCost :: Int -> Int -> Int -> Int -> Int -> Bool -> ASCostExpr
- data ASCostPredExpr
- actionSeqCostPreds :: [ASCostPredExpr] -> [ModelData]
- uniformCostPred :: ASCostPredExpr
- discountCostPred :: ASCostPredExpr
- dependentCostPred :: ASCostPredExpr
Documentation
An action sequence expression
:: Int | The number of actions |
-> String | The name of the action sequence variable |
-> ASExpr | The action sequence expression |
-> ModelData |
The main method of this module for constructing action sequence constraints. Takes the action sequence expression and produces a HaskellZinc expression.
Restrict the model to at least contain a given amount of locations.
Restrict the model to at most contain a given amount of locations.
Require the given action to be executed at least a given amount of times, in each location.
Require the given action to be executed at most a given amount of times, in each location.
Require that the two given actions are never executed together in any location.
Require that if the first action is executed, the second has to be executed as well in the same location.
:: Int | The action that has to precede the second action |
-> Int | The action that has to be preceded by the first action |
-> ASExpr |
Require the given action action to always precede the second given action.
:: Int | The action in question |
-> Int | The min number of times the action has to be performed in a row once it has been performed at least once |
-> ASExpr |
Require the if the given action is executed, it has to at least be executed a given number of times in a row.
:: Int | The action in question |
-> Int | The max number of times the action may be performed in a row |
-> ASExpr |
Require the if the given action is executed, it can at most be executed a given number of times in a row.
:: Int | The first of the two actions, at least one of which has to be performed |
-> Int | The second of the two actions, at least one of which has to be performed |
-> ASExpr |
Require each location to execute at least one of the two given actions.
data ASCostExpr Source #
An action sequence cost expression
:: String | The name of the action sequence variable |
-> String | The name of the variable containing the resulting cost |
-> ASCostExpr | The cost expression |
-> ModelData |
The main method of this module for constructing cost constraints. Takes the cost expression and produces a HaskellZinc expression.
:: Int | The action for which the cost is given |
-> Int | The uniform cost for this action |
-> ASCostExpr |
Constraint the cost of the given action to uniformly be the given number.
:: Int | The action for which the cost is given |
-> Int | The action which moves to the next station |
-> Int | The initial cost |
-> Int | The discounted cost |
-> Bool | The local flag |
-> ASCostExpr |
Constraint the cost of the given action to initially be the given full cost, and afterwards be the given discounted cost.
:: Int | The action for which the cost is given |
-> Int | The action which influences the cost |
-> Int | The action which moves to the next station |
-> Int | The original cost |
-> Int | The discounted cost |
-> Bool | The local flag |
-> ASCostExpr |
Constraint the cost of the given action to be the given full cost, if the influencing is not executed, or the given discounted cost otherwise.
data ASCostPredExpr Source #
An action sequence cost predicate expression
:: [ASCostPredExpr] | The list of cost predicate expressions |
-> [ModelData] |
The main method for constructing cost predicates. Takes a list of cost predicate expressions and produces a list of HaskellZinc predicates.
uniformCostPred :: ASCostPredExpr Source #
Constructors