Changeset 2111


Ignore:
Timestamp:
Jan 2, 2010 6:14:54 PM (10 years ago)
Author:
dlwoodr
Message:

drop scenariostrucutre.py and update the command line options for a few new ones

Location:
coopr.pysp/trunk/doc/pysp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • coopr.pysp/trunk/doc/pysp/pyspbody.tex

    r1957 r2111  
    5757\item ReferenceModel.py  (A pyomo model file)
    5858\item ReferenceModel.dat (data for an arbitrary scenario)
    59 \item ScenarioStructure.py (do not edit this file)
    6059\item ScenarioStructure.dat (among other things: the scenario names: Sname)
    6160\item *Sname.dat   (full data for now) one file for each scenario
     
    6665\subsection{ScenarioStructure.dat}
    6766
    68 The file ScenarioStructure.py defines the python sets and parameters needed to describe stochastic elements. This file should not be edited. Data
    69 to instantiate these sets and parameters is provided by users in the file ScenarioStructure.dat, which can be given in AMPL \cite{ampl} format.
    70 This file contains the following data:
     67The file ScenarioStucture.dat contains the following data:
    7168
    7269\begin{itemize}
     
    9592\end{itemize}
    9693
     94Data
     95to instantiate these sets and parameters is provided by users in the file ScenarioStructure.dat, which can be given in AMPL \cite{ampl} format.
     96
    9797The default behavior is one file per scenario and each file has the full data for the scenario. An
    9898alternative is to specify just the data that changes from the root node in one file per tree node.
     
    102102
    103103This will set it up to want a per-node file, something along the lines of what's in \verb|examples/pysp/farmer/NODEDATA|.
     104
     105Advanced users may be interested in seeing the file \verb|coopr/pysp/utils/scenariomodels.py|, which defines the python sets and parameters needed to describe stochastic elements. This file should not be edited.
    104106
    105107\section{Command Line Arguments \label{cmdargsec}}
     
    267269\item CanSlamToMax: True or False. If True, then slamming can be to the maximum across scenarios for any variable.
    268270\item CanSlamToUB: True of False. If True, then slamming can be to the upper bound for any variable.
     271\item DisableCycleDetection: True or False. If True, then cycle detection and the associated slamming are completely disabled. This cannot be changed to False on the fly because a value of True at startup causes creation of the cycle detection storage to be bypassed.
    269272\end{itemize}
    270273
     
    329332
    330333A user defined extension file can be incorporated by using the command line option:
    331 \verb|--user-defined-extension=EXTENSIONFILE|. Here, "EXTENSIONFILE" is the module name, which is in either the current directory (most likely) or somewhere on your PYTHONPATH. A simple example is "testphextension" plugin that simply prints a message to the screen for each callback. The file testphextension.py can be found in the sources directory and given in Section~\ref{callbacksec}. An easy test of this would be to specify "-user-defined-extension=testphextension" and you should
     334\verb|--user-defined-extension=EXTENSIONFILE|. Here, "EXTENSIONFILE" is the module name, which is in either the current directory (most likely) or somewhere on your PYTHONPATH. A simple example is "testphextension" plugin that simply prints a message to the screen for each callback. The file testphextension.py can be found in the sources directory and given in Section~\ref{CallbackSec}. An easy test of this would be to specify "-user-defined-extension=testphextension" and you should
    332335note the the ``.py'' file extension is not included on the runph command line.
    333336 
     
    336339Here are the callbacks:
    337340\begin{itemize}
     341\item post\_ph\_initialization: Called after PH data structures have been intialized but before iteration zero solves.
    338342\item post\_iteration\_0\_solves: Called after iteration zero solutions and some statistics such as averages have been computed, but before weights are updated.
    339343\item post\_iteration\_0: Called after all processing for iteration zero is complete.
     
    358362\item ReferenceModel.py: a single-scenario model for the SP
    359363\item ReferenceModel.dat: a single-scenario data file for the SP (any scenario will do - used to flush out variable and constraint index sets)
    360 \item ScenarioStructure.py: defines the scenario tree structure for the SP. SHOULD NOT BE MODIFIED.
    361364\item ScenarioStructure.dat: data file defining the scenario tree.
    362365\item AboveAverageScenario.dat: one of the scenario data files.
     
    384387
    385388\begin{itemize}
    386 \item phdriver.ph: executes ph. Do not modify this file unless you an algorithm developer and you
    387 need to edit a line to speficy a plug-in that you have written. It is presently configured to use the WWPHExtensions.py plug-in the implements the Watson and Woodruff extensions.
    388389\item wwph.cfg: replace default algorithm parameter values for the Watson and Woodruff extensions.
    389390\item wwph.suffixes: sets algorithm parameter values at the variables level for the Watson and Woodruff extensions.
    390391\item ReferenceModel.py: a single-scenario model for the SP
    391392\item ReferenceModel.dat: a single-scenario data file for the SP (any scenario will do - used to flush out variable and constraint index sets)
    392 \item ScenarioStructure.py: defines the scenario tree structure for the SP. SHOULD NOT BE MODIFIED.
    393393\item ScenarioStructure.dat: data file defining the scenario tree.
    394394\item Scenario1.dat: one of the scenario data files.
     
    397397\end{itemize}
    398398
    399 The file phdriver.py executes PH, assuming the ReferenceModel.* and ScenarioStructure.* files are present and correct.
    400399This example is probably in a directory with a name something like:
    401400
     
    419418
    420419\begin{itemize}
    421 \item phdriver.ph: executes ph. Do not modify this file unless you an algorithm developer and you
    422 need to edit a line to specify a plug-in that you have written. It is presently configured to use the WWPHExtensions.py plug-in the implements the Watson and Woodruff extensions.
    423420\item wwph.cfg: replace default algorithm parameter values for the Watson and Woodruff extensions.
    424421\item wwph.suffixes: sets algorithm parameter values at the variables level for the Watson and Woodruff extensions.
    425422\item ReferenceModel.py: a single-scenario model for the SP
    426423\item ReferenceModel.dat: a single-scenario data file for the SP (any scenario will do - used to flush out variable and constraint index sets)
    427 \item ScenarioStructure.py: defines the scenario tree structure for the SP. SHOULD NOT BE MODIFIED.
    428424\item ScenarioStructure.dat: data file defining the scenario tree.
    429425\item Scenario1.dat: one of the scenario data files.
     
    432428\end{itemize}
    433429
    434 The file phdriver.py executes PH, assuming the ReferenceModel.* and ScenarioStructure.* files are present and correct.
    435430This example is probably in a directory with a name something like:
    436431
Note: See TracChangeset for help on using the changeset viewer.