4.3. Make Deposits

Now you can make some deposits (see Making Deposits).

Example 4-3. Let's deposit 100 million credits for use by the biology project. We are going to establish a use-it-or-lose-it policy here in which one fourth of the credits expire each quarter. Since there is only one account for the biology project, we can specify the project name in the deposit.

$ gdeposit -s 2005-01-01 -e 2005-04-01 -z 25000000 -p biology

Successfully deposited 25000000 credits into account 1
        

$ gdeposit -s 2005-04-01 -e 2005-07-01 -z 25000000 -p biology

Successfully deposited 25000000 credits into account 1
        

$ gdeposit -s 2005-07-01 -e 2005-10-01 -z 25000000 -p biology

Successfully deposited 25000000 credits into account 1
        

$ gdeposit -s 2005-10-01 -e 2006-01-01 -z 25000000 -p biology

Successfully deposited 25000000 credits into account 1
        

Example 4-4. Next we will make some deposits valid toward the chemistry project for the entire year. Since there are multiple accounts for the chemistry project, we must specify the appropriate account id in the deposit.

First, we'll dedicate 50 million credits for use on colony.

$ gdeposit -s 2005-01-01 -e 2006-01-01 -z 50000000 -a 2

Successfully deposited 50000000 credits into account 2
        

Then we'll give amy special access to 10 million credits that she can use anywhere — with 9 million credits prepaid, and a million credits of overdraft.

$ gdeposit -s 2005-01-01 -e 2006-01-01 -z 9000000 -L 1000000 -a 3

Successfully deposited 9000000 credits into account 3
        

Finally, we'll give all the other members except amy access to the remaining 40 million credits.

$ gdeposit -s 2005-01-01 -e 2006-01-01 -z 40000000 -a 4

Successfully deposited 40000000 credits into account 4
        

Example 4-5. We can now take a closer look at the accounts and the allocations that we have created.

$ glsaccount

Id Name                Amount   Projects  Users        Machines Description 
--- ---------------------------- ------------ ------------- ------------------ ------------ ---------------- 
1  biology             25000000 biology   MEMBERS      MEMBERS              
2  chemistry on colony 50000000 chemistry MEMBERS      colony               
3  chemistry for amy    9000000 chemistry amy          ANY                  
4  chemistry not amy   40000000 chemistry MEMBERS,-amy ANY     
        

Let's examine the allocations we just created with the time period information.

$ glsalloc

Id Account StartTime  EndTime    Amount   CreditLimit Deposited Description 
--- ---------- --------------- --------------- ------------ ---------------- ------------- ---------------- 
1  1       2005-01-01 2005-04-01 25000000           0  25000000             
2  1       2005-04-01 2005-07-01 25000000           0  25000000             
3  1       2005-07-01 2005-10-01 25000000           0  25000000             
4  1       2005-10-01 2006-01-01 25000000           0  25000000             
5  2       2005-01-01 2006-01-01 50000000           0  50000000             
6  3       2005-01-01 2006-01-01  9000000     1000000   9000000             
7  4       2005-01-01 2006-01-01 40000000           0  40000000