haskelzinc-0.3.1.0: CP in Haskell through MiniZinc

LicenseBSD3
MaintainerGert-Jan Bottu <gertjan.bottu@kuleuven.be>
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

TimeSpaceConstr.ActionSequences

Description

This module defines an interface for constructing action sequence expressions, required for the TimeSpaceConstr.TimeSpaceConstraints module, in order to construct time space constraints.

Synopsis

Documentation

actionSeqConstraint Source #

Arguments

:: 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.

atleast_cells Source #

Arguments

:: Int

The minimum amount of cells in the sequence

-> ASExpr 

Restrict the model to at least contain a given amount of locations.

atmost_cells Source #

Arguments

:: Int

The maximum amount of cells in the sequence

-> ASExpr 

Restrict the model to at most contain a given amount of locations.

atleast Source #

Arguments

:: Int

The action in question

-> Int

The min number of times this action has to be performed

-> ASExpr 

Require the given action to be executed at least a given amount of times, in each location.

atmost Source #

Arguments

:: Int

The action in question

-> Int

The max number of times this action can be performed

-> ASExpr 

Require the given action to be executed at most a given amount of times, in each location.

incompatible Source #

Arguments

:: Int

The first of the incompatible actions

-> Int

The second of the incompatible actions

-> ASExpr 

Require that the two given actions are never executed together in any location.

implication Source #

Arguments

:: Int

The action that implies the second action

-> Int

The action that is implied

-> ASExpr 

Require that if the first action is executed, the second has to be executed as well in the same location.

value_precedence Source #

Arguments

:: 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.

stretch_min Source #

Arguments

:: 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.

stretch_max Source #

Arguments

:: 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.

or_as Source #

Arguments

:: 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

actionSeqCost Source #

Arguments

:: 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.

uniformCost Source #

Arguments

:: 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.

discountCost Source #

Arguments

:: 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.

dependentCost Source #

Arguments

:: 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

actionSeqCostPreds Source #

Arguments

:: [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.