Skip to content

verbose parameter #68

Open
Open

Description

@hadipourh

Hi all,

I create this issue to discuss the verbose parameter.
I am feeding the solve command with the following arguments:

cp_inst.solve(timeout=time_limit, 
                      processes=self.num_of_threads, 
                      verbose=True, 
                      debug_output=Path("./debug_output.txt", intermediate_solutions=True),
                      optimisation_level=2)

My purpose is to see the solver's progress report on-the-fly through the terminal. This feature is available when we use Minizinc through the terminal. However, I could not find a configuration for this purpose in the Python interface. For example, the above configuration outputs the progress report when the running process terminates.
Is there any configuration to represent the solver's progress report on-the-fly through the terminal?

Activity

  1. Dekker1 commented on Nov 10, 2022

    @Dekker1
    Member

    The verbose and debug_output arguments have been included mostly for finding problems when MiniZinc Python wasn't giving users the expected behaviour. It was not intended for polling the solver progress.

    This might be possible (I would think that we can directly output the stderr stream into the log), but it would require some more engineering. The particular problem is that we could have to manage two streams at the same time, likely requiring the splitting of the solutions() function implementation.

    This does not have a high priority for me, but I would be happy to accept pull request if the benefit can be clearly shown, and the implementation is of high quality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions