org.sat4j.sat
Class DetailedCommandPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.sat4j.sat.DetailedCommandPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, ICDCLLogger, SolverController, SearchListener

public class DetailedCommandPanel
extends JPanel
implements SolverController, SearchListener, ICDCLLogger

This panel contains buttons that control restart and clean on solver. It also displays history of commands.

Author:
sroussel
See Also:
Serialized Form

Nested Class Summary
 class DetailedCommandPanel.MyTabbedPane
           
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static EmptyBorder border5
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface org.sat4j.minisat.core.ICDCLLogger
CONSOLE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DetailedCommandPanel(String filename, RemoteControlFrame frame)
           
DetailedCommandPanel(String filename, String ramdisk, RemoteControlFrame frame)
           
DetailedCommandPanel(String filename, String ramdisk, String[] args, RemoteControlFrame frame)
           
 
Method Summary
 void activateGnuplotTracing(boolean b)
           
 void adding(int p)
           
 void assuming(int p)
           
 void backjump(int backjumpLevel)
           
 void backtracking(int p)
           
 void beginLoop()
           
 void cleaning()
           
 void conflictFound(IConstr confl, int dlevel, int trailLevel)
           
 void conflictFound(int p)
           
 void createChoixSolverPanel()
           
 void createInstancePanel()
           
protected  Reader createReader(ICDCL theSolver, String problemname)
           
 void delete(int[] clause)
           
 void end(Lbool result)
           
 VisuPreferences getGnuplotPreferences()
           
 LearnedConstraintsEvaluationType getLearnedConstraintsEvaluationType()
           
 List<String> getListOfPBSolvers()
           
 List<String> getListOfSolvers()
           
 int getNVar()
           
 RestartStrategy getRestartStrategy()
           
 SearchParams getSearchParams()
           
 ISolver getSolver()
           
 String getStartStopText()
           
 DetailedCommandPanel getThis()
           
 void init(ISolverService solverService)
           
 void init(SearchParams params)
           
 void initSearchListeners()
           
 boolean isChartBased()
           
 boolean isGnuplotBased()
           
 boolean isPlotActivated()
           
 void launchSolverWithConfigs()
           
 void learn(IConstr c)
           
 void log(String message)
           
 void logsameline(String message)
           
 void openFileChooser()
           
 void propagating(int p, IConstr reason)
           
 void restarting()
           
 void setChartBased(boolean chartBased)
           
 void setChoixSolverPanelEnabled(boolean enabled)
           
 void setGnuplotBased(boolean gnuplotBased)
           
 void setGnuplotPreferences(VisuPreferences gnuplotPreferences)
           
 void setInstancePanelEnabled(boolean enabled)
           
 void setKeepSolverHot(boolean keepHot)
           
 void setLearnedDeletionStrategyTypeToSolver(LearnedConstraintsEvaluationType type)
           
 void setNbClausesAtWhichWeShouldClean(int nbConflicts)
           
 void setOptimisationMode(boolean optimizationMode)
           
 void setPhaseSelectionStrategy(IPhaseSelectionStrategy phase)
           
 void setPlotActivated(boolean isPlotActivated)
           
 void setRandomWalkProba(double proba)
           
 void setRestartStrategy(RestartStrategy strategy)
           
 void setSimplifier(SimplificationType type)
           
 void setSolverVisualisation(SolverVisualisation visu)
           
 void setUseTelecomStrategyAsLearnedConstraintsDeletionStrategy()
           
 void shouldCleanNow()
           
 void shouldRestartNow()
           
 void solutionFound(int[] model)
           
 void start()
           
 void startVisu()
           
 void stopVisu()
           
 void updateListOfSolvers()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

border5

public static final EmptyBorder border5
Constructor Detail

DetailedCommandPanel

public DetailedCommandPanel(String filename,
                            RemoteControlFrame frame)

DetailedCommandPanel

public DetailedCommandPanel(String filename,
                            String ramdisk,
                            RemoteControlFrame frame)

DetailedCommandPanel

public DetailedCommandPanel(String filename,
                            String ramdisk,
                            String[] args,
                            RemoteControlFrame frame)
Method Detail

createInstancePanel

public void createInstancePanel()

createChoixSolverPanel

public void createChoixSolverPanel()

getStartStopText

public String getStartStopText()

setOptimisationMode

public void setOptimisationMode(boolean optimizationMode)

launchSolverWithConfigs

public void launchSolverWithConfigs()

initSearchListeners

public void initSearchListeners()

getNVar

public int getNVar()
Specified by:
getNVar in interface SolverController

setPhaseSelectionStrategy

public void setPhaseSelectionStrategy(IPhaseSelectionStrategy phase)
Specified by:
setPhaseSelectionStrategy in interface SolverController

shouldRestartNow

public void shouldRestartNow()
Specified by:
shouldRestartNow in interface SolverController

setRestartStrategy

public void setRestartStrategy(RestartStrategy strategy)
Specified by:
setRestartStrategy in interface SolverController

getRestartStrategy

public RestartStrategy getRestartStrategy()
Specified by:
getRestartStrategy in interface SolverController

getSearchParams

public SearchParams getSearchParams()
Specified by:
getSearchParams in interface SolverController

init

public void init(SearchParams params)
Specified by:
init in interface SolverController

setNbClausesAtWhichWeShouldClean

public void setNbClausesAtWhichWeShouldClean(int nbConflicts)
Specified by:
setNbClausesAtWhichWeShouldClean in interface SolverController

setUseTelecomStrategyAsLearnedConstraintsDeletionStrategy

public void setUseTelecomStrategyAsLearnedConstraintsDeletionStrategy()
Specified by:
setUseTelecomStrategyAsLearnedConstraintsDeletionStrategy in interface SolverController

setLearnedDeletionStrategyTypeToSolver

public void setLearnedDeletionStrategyTypeToSolver(LearnedConstraintsEvaluationType type)
Specified by:
setLearnedDeletionStrategyTypeToSolver in interface SolverController

getLearnedConstraintsEvaluationType

public LearnedConstraintsEvaluationType getLearnedConstraintsEvaluationType()

shouldCleanNow

public void shouldCleanNow()
Specified by:
shouldCleanNow in interface SolverController

setKeepSolverHot

public void setKeepSolverHot(boolean keepHot)
Specified by:
setKeepSolverHot in interface SolverController

isGnuplotBased

public boolean isGnuplotBased()

setGnuplotBased

public void setGnuplotBased(boolean gnuplotBased)

isChartBased

public boolean isChartBased()

setChartBased

public void setChartBased(boolean chartBased)

isPlotActivated

public boolean isPlotActivated()

setPlotActivated

public void setPlotActivated(boolean isPlotActivated)

setRandomWalkProba

public void setRandomWalkProba(double proba)
Specified by:
setRandomWalkProba in interface SolverController

setSimplifier

public void setSimplifier(SimplificationType type)
Specified by:
setSimplifier in interface SolverController

getListOfSolvers

public List<String> getListOfSolvers()

getListOfPBSolvers

public List<String> getListOfPBSolvers()

log

public void log(String message)
Specified by:
log in interface ICDCLLogger

logsameline

public void logsameline(String message)

openFileChooser

public void openFileChooser()

createReader

protected Reader createReader(ICDCL theSolver,
                              String problemname)

updateListOfSolvers

public void updateListOfSolvers()

setInstancePanelEnabled

public void setInstancePanelEnabled(boolean enabled)

setChoixSolverPanelEnabled

public void setChoixSolverPanelEnabled(boolean enabled)

setSolverVisualisation

public void setSolverVisualisation(SolverVisualisation visu)

activateGnuplotTracing

public void activateGnuplotTracing(boolean b)

startVisu

public void startVisu()

stopVisu

public void stopVisu()

getGnuplotPreferences

public VisuPreferences getGnuplotPreferences()

setGnuplotPreferences

public void setGnuplotPreferences(VisuPreferences gnuplotPreferences)

getThis

public DetailedCommandPanel getThis()

getSolver

public ISolver getSolver()

init

public void init(ISolverService solverService)
Specified by:
init in interface SearchListener

assuming

public void assuming(int p)
Specified by:
assuming in interface SearchListener

propagating

public void propagating(int p,
                        IConstr reason)
Specified by:
propagating in interface SearchListener

backtracking

public void backtracking(int p)
Specified by:
backtracking in interface SearchListener

adding

public void adding(int p)
Specified by:
adding in interface SearchListener

learn

public void learn(IConstr c)
Specified by:
learn in interface SearchListener

delete

public void delete(int[] clause)
Specified by:
delete in interface SearchListener

conflictFound

public void conflictFound(IConstr confl,
                          int dlevel,
                          int trailLevel)
Specified by:
conflictFound in interface SearchListener

conflictFound

public void conflictFound(int p)
Specified by:
conflictFound in interface SearchListener

solutionFound

public void solutionFound(int[] model)
Specified by:
solutionFound in interface SearchListener

beginLoop

public void beginLoop()
Specified by:
beginLoop in interface SearchListener

start

public void start()
Specified by:
start in interface SearchListener

end

public void end(Lbool result)
Specified by:
end in interface SearchListener

restarting

public void restarting()
Specified by:
restarting in interface SearchListener

backjump

public void backjump(int backjumpLevel)
Specified by:
backjump in interface SearchListener

cleaning

public void cleaning()
Specified by:
cleaning in interface SearchListener


Copyright © 2012 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.