Download site for Combinator
A tool for finding, analyzing and validating mathematical combinations.
Feature list
- Multiple variables with multiple values (including multiple value ranges. Values may be defined by a mathematical expression)
- Multiple rules defined by advanced mathematical expressions (Optionally)
- Multiple constants and local variables can be defined by advanced mathematical expressions (Optionally)
- Highly configurable output (Optionally)
- Can be used to generate input for itself
- Many mathematical and statistical functions are supported
- Highly optimized valid combinations search algorithms as default (Can be fully or partly switched off). Brute force is used as backup.
- Sorting / order of combinations can be specified (Fully, partly or omitted)
- Some general options are available
- Configurable valid combination value distribution tables in output (Optionally)
- Build-in constants
- Comments in the input file
Installation
- Download this file
- Follow the instruction on the general installer page
Uninstallation
- 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
- Java Runtime Environment (JRE) version: 1.8
See the List of projects page for other projects.
Last Updated: 2026-02-03 19:39:31
Copyright Allan Rasmussen©