[runner] section#

This section sets the configuration of Runner, which bridges Algorithm and Solver. It has three subsections, mapping, limitation, and log .

  • ignore_error

    Format: Boolean (default: false)

    Description: A parameter to specify whether a RuntimeError raised within the direct problem solver is ignored and the calculation is continued with NaN as the result. Note that only the RuntimeError exceptions are captured.

[runner.mapping] section#

This section defines the mapping from an \(N\) dimensional parameter searched by Algorithm, \(x\), to an \(M\) dimensional parameter used in Solver, \(y\) . In the case of \(N \ne M\), the parameter dimension in [solver] section should be specified.

In the current version, the affine mapping (linear mapping + translation) \(y = Ax+b\) is available.

  • A

    Format: List of list of float, or a string (default: [])

    Description: \(M \times N\) matrix \(A\) (mapping the \(N\)-dim parameter \(x\) to the \(M\)-dim \(y\)). An empty list [] is a shorthand of an identity matrix. If you want to set it by a string, arrange the elements of the matrix separated with spaces and newlines (see the example).

  • b

    Format: List of float, or a string (default: [])

    Description: \(M\) dimensional vector \(b\). An empty list [] is a shorthand of a zero vector. If you want to set it by a string, arrange the elements of the vector separated with spaces.

For example, both

A = [[1,1], [0,1]]

and

A = """
1 1
0 1
"""

mean

\[\begin{split}A = \left( \begin{matrix} 1 & 1 \\ 0 & 1 \end{matrix} \right).\end{split}\]

[runner.limitation] section#

This section defines the limitation (constraint) in an \(N\) dimensional parameter searched by Algorithm, \(x\), in addition to min_list and max_list.

In the current version, a linear inequality of the form \(Ax+b>0\) is available. Specifically, you can apply constraints as follows:

\[\begin{split}A_{1,1} x_{1} + A_{1,2} x_{2} + &... + A_{1,N} x_{N} + b_{1} > 0\\ A_{2,1} x_{1} + A_{2,2} x_{2} + &... + A_{2,N} x_{N} + b_{2} > 0\\ &...\\ A_{M,1} x_{1} + A_{M,2} x_{2} + &... + A_{M,N} x_{N} + b_{M} > 0\end{split}\]

where \(M\) is the number of constraint equations (arbitrary).

  • co_a

    Format: List of list of float, or a string (default: [])

    Description: \(M \times N\) matrix \(A\) for the constraint equations. The number of rows should be the number of constraints \(M\), and the number of columns should be the number of search variables \(N\). You must define co_b together with this parameter.

  • co_b

    Format: List of lists of float (a column vector), or a string (default: [])

    Description: \(M\) dimensional vector \(b\) for the constraint equations. Specify it as a column vector (a list of lists), e.g. co_b = [[0], [-1]]; a flat list such as co_b = [0, -1] raises an error. You need to set a column vector with the dimension equal to the number of constraints \(M\). You must define co_a together with this parameter.

For example, both

co_a = [[1,1], [0,1]]

and

co_a = """
1 1
0 1
"""

mean

\[\begin{split}A = \left( \begin{matrix} 1 & 1 \\ 0 & 1 \end{matrix} \right).\end{split}\]

Also, the following examples:

co_b = [[0], [-1]]

and

co_b = """0 -1"""

and

co_b = """
0
-1
"""

all represent:

\[\begin{split}b = \left( \begin{matrix} 0 \\ -1 \end{matrix} \right)\end{split}\]

If neither co_a nor co_b is defined, no constraint equation will be applied to the search.

[runner.log] section#

Setting parameters related to logging of solver calls.

  • filename

    Format: String (default: “runner.log”)

    Description: Name of log file.

  • interval

    Format: Integer (default: 0)

    Description: Every solver call is recorded; this value specifies how many entries are buffered before they are flushed to the log file. If the value is less than or equal to 0, no log will be written.

  • write_result

    Format: Boolean (default: false)

    Description: Whether to record the output from the solver.

  • write_input

    Format: Boolean (default: false)

    Description: Whether to record the input to the solver.