• No se han encontrado resultados

Sector de fabricación de envases y embalajes de vidrio

3. SECTOR ENVASES Y EMBALAJES CASTILLA Y LEÓN

3.2. PROCESOS PRODUCTIVOS GENERADORES DE RESIDUOS

3.2.5. Sector de fabricación de envases y embalajes de vidrio

Paparrizou and Stergiou[2017] propose a strategy for interrupting enforcing Neighborhood- SAC based on the amount of filtering it yields. For each singleton test on the consid- ered variable, the filtering is interrupted (i.e., how much) unless the domain of any neighboring variable (i.e., where) becomes singleton.

Summary

In this chapter, we gave background information on CSPs. We described represen- tations of a CSP and introduced some common consistency properties and reviewed how they can be compared. Finally, we reviewed the main approaches to enforcing high-level consistency during while positioning each approach along the three orthog- onal directions that we have identified, thus validating the relevance of our proposed characterization.

Chapter 3

Visualizing Search

Carro and Hermenegildo [1998] distinguish three main uses of visualization in Con- straint Programming:

1. Debugging: Providing a clear view of the program state to the programmer.

2. Tuning and optimizing programs: Providing, to the programmer or the expert user, profiling statistics about the solver’s execution.

3. Teaching and education: Providing explanations to a layperson.1

Thus, the design of any visualization takes into account the intended use, or the goal, of the visualization. In this chapter we focus the goal of ‘tuning and optimizing programs.’ To that end we introduce a visualization to help with understanding the performance of backtrack search and the effectiveness of enforcing a local consistency property on a problem instance.

Below, we first review previous approaches to visualization in Constraint Pro- gramming. Then, we introduce our proposed visualizations [Howell et al., 2018b]. 1For example, the visualization of constraint solving in the context of Sudoku (http://sudoku.

unl.edu), Minesweeper (http://minesweeper.unl.edu), the Game of Set (http://gameofset. unl.edu), and SAT solving (http://satviz.unl.edu).

We discuss how our visualizations allow us to interpret the performance of search, to compare the performances of two or more search algorithms, and to understand the effectiveness of enforcing a particular local consistency during search. Finally, we discuss two aspects of our implementation: how to provide a real-time visualization of search and how to enforce multiple consistency algorithms during search.

3.1

Previous Approaches to Visualizing Search

In Constraint Programming, visualizations are developed for the search tree and for the constraints, which are typically global constraints. The visualization in this dissertation focuses on the former because we operate on arbitrary constraints. Prior research on search-tree visualization focuses on the 2-way branching scheme, which is typical in Constraint Programming, in contrast to the k-way branching scheme adopted by the CSP community. In the constraint solver CHIP, Simonis and Aggoun

[2000] propose to visualize the search tree from two perspectives, namely, tree view and phase-line display:

• Tree view: The search tree is displayed using a parent-children relationship. Each node in the tree is an variable-assignment that was consistent after en- forcing lookahead. Failed branches are ‘collapsed’ to keep the display of the tree manageable. Figure 3.1 shows an example tree view.

• Phase-line display: Each variable is given a line that shows the depth in the search tree at which the variable was assigned (y-axis) as time progresses (x- axis). This visualization would show horizontal lines for a static variable- ordering, and can be useful for visualizing dynamic variable-ordering heuristics. Figure 3.2 shows an example phase line display.

Figure 3.1: The tree view [Simonis and Ag- goun, 2000]

Figure 3.2: The phase-line display [Simonis and Aggoun, 2000]

In addition to these two views of the search tree, Simonis and Aggoun [2000] provide functionalities that allow an in-depth analysis of the states of the variables and constraints, and to view the order of the constraints considered during propagation.

Simonis et al. [2000] also introduce visualizations of global constraints in the context of the constraints meaning in the CSP.

The tree view and phase-line display were originally proposed in the larger DiSCiPl project. The DiSCiPl project provides extensive visual functionalities to develop, test, and debug constraint logic programs such as displaying variables’ states, effect of constraints and global constraints, and event propagation at each node of the search tree [Simonis and Aggoun, 2000;Carro and Hermenegildo, 2000]. Many useful methodologies from the DiSCiPl project are implemented in CP-Viz [Simonis et

al., 2010] and other works [Shishmarev et al., 2016]. The implementation of CP- Viz is solver-agnostic. It takes as input an XML trace of the solver and generates visualizations of that search.

The OZ Explorer displays the search tree allowing the user to access detailed information about the node at each tree node and to collapse and expand failing trees for closer examination [Schulte, 1996]. This work is currently incorporated into Gecode’s Gist [Schulte et al., 2015].

The above approaches focus on exploring the search tree (as well as a problem’s components) while our work proposes particular projections (i.e., views, summaries) of the data reflecting (i.e., compiling) the cost and the effectiveness of both search and enforcing consistency. We believe that these visualizations are orthogonal and complementary.

Tracking search effort by depth was first proposed by Epstein et al. [2005] for the number of constraint checks and values removed per search and by Simonis et

al. [2010] in CP-Viz for the number of nodes visited (also used for solving a packing problem [Simonis and O’Sullivan, 2011]). Figure 3.3 shows an example visualization of the number of constraint checks at every depth of search [Epstein et al., 2005]. Figure 3.4 shows an example visualization of the result of every node visit call, either a failure (i.e., found the current subtree inconsistent) or successful (i.e., try a variable instantiation) [Simonis et al., 2010].

We claim that the number of constraint checks, values removed, and nodes visited are not accurate measures of the thrashing effort. Indeed, the number of constraint checks varies with the degree of the variables. The number of values removed and nodes visited vary with the size of the domain. In contrast, we claim that the number of backtracks per search depth (BpD) provides a more faithful representation of the thrashing effort, which is exactly the aspect of search that we aim to characterize.

Figure 3.3: The number of each constraint check at every depth [Epstein et al., 2005]

Figure 3.4: The result of a node visit at ev- ery depth [Simonis et al., 2010]

Recently, techniques have appeared in Constraint Processing for dynamically choosing between a set of consistency properties based on the CPU time spent on exploring a given subtree [Balafrej et al., 2015]. We claim that we better track the effectiveness of such decisions by following the number of backtracks per depth (BpD) and the number of consistency calls per depth (CpD) rather than the CPU time of searching a given subtree.