Download site for Combinator


A tool for finding, analyzing and validating mathematical combinations.

Feature list

Installation

  1. Download this file
  2. Follow the instruction on the general installer page

Uninstallation

  1. Follow the instruction on the general uninstaller page

The newest version is: 1.0.4
Release notes

Details

This tool is a text-based command line tool.

It must be run with a text file with a specific syntax (See below) as first parameter. An optional second parameter can be used to specify an output file:

Combinator <Input file name> [ <Output file name> ]

Input file syntax

The input file is divided into sections, all starting with a header name in upper case followed by a colon (':') followed by line(s) a section specific format:
<Section name> :
<Section line>
...
Example:
VARIABLES:
A={1,2}

A section may be omitted (Except the "VARIABLES" section). It may only be specified once and it must contain lines.
A line starting with \\ will be ignored / seen as a comment (Except in output sections (OUTPUT_NO_SOLUTION, OUTPUT_EXACTLY_ONE_SOLUTION, OUTPUT_HEADER, OUTPUT and OUTPUT_FOOTER)).

Sections may only be specified in the following order and with section lines in the following format:
OPTIONS:
<Option name>=<Option value>
...
CONSTANTS:
<Constant name>=<Mathematical expression>
...
VARIABLES:
<Variable name>={<Mathematical expression or range> [, <Mathematical expression or range> ] ... }
...
LOCAL_VARIABLES:
<Local variable name>=<Mathematical expression>
...
RULES:
<Mathematical expression>
...
ORDER_BY:
<Variable name or Local variable name> [ , ( ASCENDING | DESCENDING ) ]
...
OUTPUT_NO_SOLUTION:
<Output line>
...
OUTPUT_EXACTLY_ONE_SOLUTION:
<Output line>
...
OUTPUT_HEADER:
<Output line>
...
OUTPUT:
<Output line>
...
OUTPUT_FOOTER:
<Output line>
...
DISTRIBUTION_OUTPUT:
( <Variable name>
[ . <Distribution output property name>=<Distribution output property value> ]
...
) ...


Option name must be one of "AUTO_HEADER", "AUTO_NEWLINE", "LOG_LEVEL" or "OPTIMIZATION_LEVEL". An option may only be specified once.

Constant name, Variable name and Local variable name must be globally unique, and it must not be one of the built-in ones ("SOLUTION_NUMBER", "NUMBER_OF_SOLUTIONS", "PI", "e", "TRUE", "FALSE").
Ranges are specified as:
<Range from> .. <Range to> [ @ <Range step> ]
Range from, Range to and Range step may all be a mathematical expression.

All rules must evaluate to TRUE for a combination to be valid.
TRUE is defined as the value 1 (Formally as not 0). FALSE is defined as the value 0. All comparators (=, <, <=, >, >= and !=) will evaluate to 1 or 0 accordingly.

A Output line will be echoed as written except text parts in the following format:
${ <Mathematical expression> [: <Dynamic output format> [ : <Header label> ] ] }
Dynamic output format is specified as:
[ \ ] ( <Decimal format> | '[' <Choice format pattern> ']' )
The leading \ will cause the output to be a non fixed width column and it will be decoded / unescaped.
The "Decimal format" has an additional feature beyond what is descripen in the link above. The '_' can be used to indicate min integer width.
See the Sample 08 - Formating examples for detailed examples.

The Distribution output property name must be one of "SHOW_TITLE", "TITLE", "SHOW_TOTAL_LINE", "TOTAL_LABEL", "OTHER_INCLUDE_CRITERIA", "OTHER_LABEL" or "OUTPUT". A distribution output property may only be set once.

See the Combinator Samples page for examples.

Development

My source code Other dependencies
See the List of projects page for other projects.


Last Updated: 2026-02-03 19:39:31

Copyright Allan Rasmussen©