How to use Calc/Cream
[ Japanese | English ]
How Calc/Cream works
- User can declare variables/constraints on integers
by using Calc/Cream cell functions described below
- When the user press the 'Start' button, the followins will be
performed.
- The sheet is scanned, and cells containing variables and
constraints are parsed, and they are added to
constraint network of Cream
- A solver is started to find a solution
- Values of the solution are set to the corresponding cells
- When the user press the 'Next' button, next solution will be
searched
Cell Functions of Calc/Cream
Variables can be declared by the following cell functions.
-
CVARIABLE(Infimum; Supremum; ProvisionalValue)
Declares a variable with Infimum, Supremum
(ProvisionalValue is used to show the result)
-
CVARIABLES(Infimum; Supremum;
CellRange1; CellRange2; ...)
Declares CellRange1, CellRange2, ... as variables with Infimum, Supremum
Constraints can be declared by the following CONSTRAINTS
function,
which can be used to specify the cell locations of constraints.
-
CONSTRAINTS(CellRange1; CellRange2; ...)
Declares CellRange1, CellRange2, ... as constraints.
In CellRange1, CellRange1, ...
, declares a constraint constructed from the followings:
- Integer value, Cell, or Cell range
-
+
, -
, *
,
SUM(CellRange)
,
ABS(CellRange)
-
=
, <>
,
<
, <=
,
>
, >=
-
CEQUALS(CellRange)
-
CNOTEQUALS(CellRange)
-
CSEQUENTIAL(CellRange)
-
CSERIALIZED(CellRange)
CVARIABLE
CVARIABLE(Infimum; Supremum; ProvisionalValue)
Declares a variable.Infimum, Supremum constructed from the followings :
- "MIN", "MINIMUM" : Minumum value available for Calc/Cream (-1073741823)
- "MAX", "MAXIMUM" : Maximum value available for Calc/Cream (1073741823)
- Term
ProvisionalValue is integer value.
CVARIABLES
CVARIABLES(Infimum; Supremum; CellRange1; CellRange2; ...)
Declares CellRange1, CellRange2, ... as variables with
Infimum, Supremum. Infimum, Supremum
constructed from the followings :
- "MIN", "MINIMUM" : Minumum value available for Calc/Cream (-1073741823)
- "MAX", "MAXIMUM" : Maximum value available for Calc/Cream (1073741823)
- Term
CONSTRAINTS
CONSTRAINTS(CellRange1; CellRange2; ...)
Declares CellRange1, CellRange2, ... as constrains. The Expression in CellRange1, CellRange2, ... is added to constraint network.
CEQUALS
CEQUALS(arg1; arg2; ...)
Declares a constraint means that arg1, arg2, ... are all
equal. arg1, arg2, ... constructed from the followings :
CNOTEQUALS
CNOTEQUALS(arg1; arg2; ...)
Declares a constraint means that arg1, arg2, ... are all
different. arg1, arg2, ... constructed from the followings :
CSEQUENTIAL
CSEQUENTIAL(arg1; arg2; ...)
Declares a constraint means that arg1, arg2, ... are
SEQUENTIAL. arg1, arg2, ... constructed from the
followings :
CSERIALIZED
CSERIALIZED(arg1; arg2; ...)
Declares a constraint means that arg1, arg2, ... are
SERIALIZED. arg1, arg2, ... constructed from the
followings :
COBJECTIVE
COBJECTIVE(Cell)
Declares objective.
CTIMEOUT
CTIMEOUT(Timeout)
Sets time out.
COPTIONS
COPTIONS(Option1; Option2; ...)
Sets options.
Option1, Option2, ...constructed from the followings :
- "MIN", "MINIMIZE" : Maximize objective.
- "MAX", "MAXIMIZE" : Minimize objective.
- "BETTER" : 改善方向に最適解探索を行います.
- "RW" : Search for the optimum solution by Random Walk method.
- "SA" : Search for the optimum solution by Simulated Annealing method.
- "IBB" : Search for the optimum solution by Iterative Branch-and-Bound method.
- "TABOO" : Search for the optimum solution by Taboo Search method.
Term
Term = Integer value ||
Cell ||
- Term ||
Term + Term ||
Term - Term ||
Term * Term ||
SUM(arg1; arg2; ...) ||
ABS(Term)
Expression
Expression = Term = Term ||
Term <> Term ||
Term > Term ||
Term >= Term ||
Term < Term ||
Term <= Term ||
CEQUALS(arg1; arg2; ...) ||
CNOTEQUALS(arg1; arg2; ...) ||
CSEQUENTIAL(arg1; arg2; ...) ||
CSERIALIZED(arg1; arg2; ...) ||
Naoyuki Tamura
(
Last modified: Tue Mar 15 00:09:54 JST 2005
)