The Official Vishnu Tutorial

author:     Reginald Harris
Table of Contents

1.       What is the Vishnu GUI?
1.1     What is the purpose of this tutorial?
1.2     The Vishnu Home Page
1.3     Creating a New Problem
1.4     The Main Page

2.        View & Edit
2.1      Intro
2.2      Creating New Object Types
2.3      Instantiating Objects from Object Types
 

1.      What is the Vishnu GUI?


1.1    What is the purpose of this tutorial?

            Vishnu is a reconfigurable, web-based, optimizing scheduling system. It performs scheduling in the sense that it assigns tasks to resources at particular times. It is reconfigurable in that it is capable of being configured purely by data specifications and not by recoding to handle a wide range of different scheduling problems with different scheduling semantics. It is optimizing insofar as it allows the specification of a criterion for evaluating how good a legal schedule is and will try to find a schedule that is as good as possible (in many cases actually finding an optimal or near optimal schedule). It is web-based since the GUI runs completely from a browser and since all interactions with the central database are via a web server.  The graphical interface allows the user to define Vishnu problems using the point-and-click interface afforded by today's web browsers.

The purpose of the following tutorial is to give a user a basic understanding of the Vishnu graphical user interface (GUI), such that she or he may begin to encode their own problems in Vishnu.  It is assumed that the user has a fairly basic understanding of how problems are structured in Vishnu.  If not, the user will find USER'S GUIDE (link here to user's guide) as a good place to gain a good grasp of the Vishnu approach to constructing scheduling problems.

1.2    The Vishnu Home Page

The following is the "Home Page" of the Vishnu Reconfigurable Scheduling System (this page can always be reached by clicking "Home" located at the menu bar on the left.)
From this screen, the user is able to:
 

1)    Select a problem from the list of already loaded problems
2)    Load a problem from a file
3)    Create a new problem
4)    Delete an old loaded problem.


<##> let's assume that selecting and loading a problem are pretty straightforward.  let's explain how to create a problem </##>
 

1.3        Creating a New Problem

To create a new problem, we need to click on the Create New Problem link directly below the "Other Operations" horizontal bar.

Clicking on the link should lead to the following page.  When first creating a new problem, we need to give it a name.  Valid names must conform to the following specifications.


 

Here, we give the problem the name 'example_problem.'  The next page (as shown below) confirms that the problem was created successfully.

By clicking on Go To Problem example_problem we arrive at the problem's "Main Page".  This "Main Page" is also accessible by clicking on the example_problem main page link on the sidebar.
 

1.4    The Main Page
 


 

This is the main page for the problem example_problem_2. All the basic actions you can perform for this problem are essentially one or two clicks away from this page, and the navigation bar will allow you to return to this page with one click from any page related to this problem.

The basic actions you can perform are:


As is apparent, it is from this page that the designing of a Vishnu problem is done.  Note the four headings (horizontal bars) on this page:

We describe each of these in its own section.
 

2.    View & Edit

2.1     Intro

Recall that when designing a Vishnu problem, we need to accomplish the following:

1) Define a task type
2) Define a resource type
3) Define global type(s)
4) Define a set of logic rules
5) Create task instances
6) Create resource instances
7) Create global instances
2.2    Creating a new object

Within the Vishnu system, all data is stored within objects.  All tasks, resources, and other user-defined data is represented as an object within the system.  In order to instantiate objects, we must first specify their type.

For instance, before we can begin creating task instances, we must first define the meta-task/task type.  The meta-task is the prototype for all task instances which occur within a particular problem.  This is analogous to the relationship between a class and objects directly belonging (i'm not sure exactly how to say "exactly" belonging to that class, and not simply being an object of some child class of a parent class) to that class (in Java), or between a user-defined type and an instance of that type (such relationships are commonly found in high-level programming languages like C).  Only one meta-task can be defined per problem.

The Vishnu system regards a meta-task as a form of metadata.  Note that currently on the "Main Page" there is a section called Objects (Metadata).  Here we are given three different options:

Note that there is no option for deleting an object.  That is, once an object has been created there is no way to delete that object.  Create objects with care!

The pulldown list to the left of these buttons allows the user to select from the previously created objects for this problem.  Once an object has been chosen from the list, the user may then click the view button to view the structure of the object or the edit button to edit the selected object.  When a new problem has just been created, there will be no objects present in the pulldown list, and the only valid selection will be to be to create an object.  When we click on the CREATE button in the Objects (Metadata) section, we arrive at a page that appears as shown below:


 

To create a new object type, you must first select a valid name for the object. A name is valid if it is different from all other object names, starts with an alphabetic character, and all characters in the name are either alphabetic, numeric, or the underscore ('_' ).

You must then decide whether the object type is the task type, the resource type, or neither. You need to define exactly one task type and one resource type per problem. If you try to define a second task type or resource type, you will receive an error.

If it is a task or resource type, you will need to select the name of the field that will be the string that serves as the unique identifier for objects of this type. It will automatically define a field of this name in the object.

<##> there really needs to be a little more explanation here of how this is represented, how Vishnu accesses this field, and what purposes this field has when specifying a problem. </##>
<##> okay, there really needs to be a way to delete an object.  all i want to do now is rename the key field of the task type, but am unable to do so.  that means that in order to simply change the name of the field, i have to scrap _the whole problem_.  that sucks. </##>
<##> by the way, why can't we give object names (or field names, or problem names), more intuitive names.  it looks like these names are used directly in the backend's code (because of all the naming restrictions).  obviously this isn't a priority -- and it may turn out to be not all that useful in the end -- but it's something to think about in the future if we want Vishnu to reach a broader range of clientele </##>
<##>now that i think about it, i want to ask a question about deleting objects.  i haven't fully played around with the logic rules, but might randomly adding and deleting objects mess around with the logic rules.  that is, might we make a logic rule that accesses some object, or some field in an object, then somehow delete or edit the objects such that the logic rule no longer makes sense?  if we are to implement arbitrary deletion of objects, this should be treated as a problem for the logic rule debugger to solve?  or should some preemptive system be in place so that when you actually go to delete the object you will be warned that this will affect existing logic rules? </##>

For this example, we've created a task type called city (similar to task type definition outlined in the USER GUIDE <##> link to the TSP problem set-up in the user guide </##>) with the key (identifying) field called name.  Remember that the key field is what Vishnu uses to identify each unique instance of this task type.  For this example, we use city's name as the key field, as each city's name is unique.  In the window above we see that after giving the task type a name and a key field we are prompted to add additional fields to the task type.  Per the task type specification outlined in the USER GUIDE, we add the fields (blah blah blah, explain each one, blah blah blah) (oh wait, i need to explain data types too).

<##> There should be some way to consolidate change, rename, and delete field options on this screen.  it looks ugly and clumsy at the moment </##>

After successively adding fields, the screen should appear as follows:

There are generally four options when editing an object, although only those options that are available at the time will be presented to the user. (For example, if there are no fields yet in the object, then there are no fields to rename and hence the "Rename Field" option will not display.) These options are:

For all the options, the following rules apply. A field name is valid if The field type is selected from a pick list of all atomic data types (string, number, datetime, boolean), predefined object types (interval, latlong, xy_coord, matrix), and all user-defined object types that are not either the task type or the resource type. If the "List" option is selected, then the data type is a list of objects of the specified type. If the "Global Ptr" option is selected, then the data type is a reference to a global data object of the specified type.

<##> there should be some kind of button on the page itself (and not on the side frame) that says something like "Click here when Finished," or "DONE."  it's not intuitively clear that when you add or change fields, the operation is automatic and saved.  </##>

<##> for the vishnu symbol, maybe we could find some very simple likeness of Vishnu, or some popular symbolic representation of Vishnu that would look cool as a product logo </##>

When we return to the "Main Page" of the problem, note that the layout looks slightly different.  We now have a task section, we were are now able to create instances of the task type that we just created.  <##> now gloss over the creation of the resource type, saying that it's creation is similar ot the creation of the task type.  in the end, this process will probably change, so i'm not going to go into detail here. </##>


 
 

2.3     Instantiating Objects
 

<##> no spaces between numbers in a list </##>


 
 
 
 
 
 
 

II.4 Defining  the Logic Rules/Scheduling Specifications for a Vishnu Problem

The scheduling logic consists of a set of named constraints/hooks. Most of the constraints/hooks have an associated formula, while a few of the hooks have instead a value selected from a multiple-choice list. Each hook also has an associated default value, and the formula-based hooks that have no associated formula will always evaluated to this default value.
 

At the bottom of the page are the color specifications. These are in a separate table because they work a little differently. You can add and delete colors as well as modifying existing ones. Like the other constraints/hooks, each color has an associated formula. Unlike the others, each color also has a legend entry used to identify what this color means and what type of object to apply it to.
 

Hints for page viewspecs.php

       This page displays the current state of the problem-specific
       scheduling logic and provides links for editing of this logic. It is best
       to familiarize yourself with how the problem-specific scheduling
       logic works before attempting to use this page.

       The scheduling logic consists of a set of named constraints/hooks.
       Most of the constraints/hooks have an associated formula, while a
       few of the hooks have instead a value selected from a
       multiple-choice list. Each hook also has an associated default value,
       and the formula-based hooks that have no associated formula will
       always evaluated to this default value.

       To edit the value of a hook, just click on the name and you will be
       taken to a page for editing the formula or picking a value. This page
       will also explain briefly about the purpose of the constraint. An
       alternative means of selecting a hook to edit is the pick list under the
       table.

       At the bottom of the page are the color specifications. These are in a
       separate table because they work a little differently. You can add and
       delete colors as well as modifying existing ones. Like the other
       constraints/hooks, each color has an associated formula. Unlike the
       others, each color also has a legend entry used to identify what this
       color means and what type of object to apply it to.
 
 
 
 
 
 
 
 
 

 ------------------------------------------------------
<##> here is where i start describing how to create object instances </##>
<##> this is where i ended 6:10pm 10/10/01 </##>

------------------------------------------------------
 
 

This is where the user will be able to view, create, and edit the metadata that has been created.  The leftmost button under the Objects (Metadata) section <##> these headings really need to be called something else.  it's just really unintuitive.  argh. we need something more straightforward than "Objects (Metadata) </##>

Only one meta-task may be defined per problem.  To define a meta-task is to itemize all the data that will be stored in a given task.  A meta-data object consists of fields of information.  These fields will be used by logic rules in performing the optimization.

------------------------------------------------------

## I logged into vishnu earlier, then I closed the window.  When I opened up vishnu.bbn.com again, I was not prompted for a username and password.
## So, we need to remember to expire the login information stored, so that whenever the user opens vishnu they must always enter a username and password.

## Stand-alone tutorial on how to create a problem using the vishnu GUI

(## i'm using the terminology as used by Vishnu itself.  if i had the choice, i would probably call this page something other than "main page" as that term is ambiguous in the context of the series of web pages within the vishnu system.)

## Ok, so I actually created a new problem.  The process to do so seems very awkward.  When I first arrived at the page I asked myself, "Hey, where are the task and resource
     sections?"
## It turns out that you have to create them under the objects sections before those sections are actually created.  weird.)

## here, the create button needs to somehow be set apart (more than it is now) from the two buttons view and edit.  the reason for this
##  is because the pull-down list doesn't apply when you are creating an object.   so, you want to separation between these buttons
##  to illustrate this fact, showing that the pull-down list is associated with the view and edit buttons, and that the create button is on it's own.

## maybe in the interface, we can always disable buttons on the page that are not applicable /##

-------------------------------------------------------
separate section

Once a task meta-data is created, individual task objects must be instantiated.  Each individual task will be assigned the appropriate data.  This data will set up the relationships between the task and other tasks.

For example, one may store the name of another task in a field called "prior".  The information in "prior" may later be used in a logic rule to determine what the pre-requisites of the task are.  Thus, dependencies must be manually entered within the data fields of a task and exploited by the logic rules.
 
 

II.3 Designing the meta-resource

Create a  meta-resource description (Here we explain what to click on the http://vishnu.bbn.com/vishnu/problem.php page in order to create, add fields, and generally edit a meta-task description).