ewoksfluo.math.scan_shape.solve_nnls_posint#

ewoksfluo.math.scan_shape.solve_nnls_posint(equations_dict, values_dict, estimate_initial_values=None)[source]#

Solve a system of non-linear equations with strictly positive integer constraints, supporting over-determined systems.

Parameters:
  • equations_dict (Dict[str, str]) – A dictionary where keys are equation names and values are the equations as strings.

  • values_dict (Dict[str, int]) – A dictionary where keys match those in equations_dict and values are the known results.

  • estimate_initial_values (Optional[Callable[[int], List[int]]])

Return type:

Optional[Dict[str, int]]

Returns:

If the solver, a dictionary containing the solved integer values for each variable.

Raises:

ValueError – If the keys in equations_dict and values_dict do not match.