Idea Number Two
What is the GPSS language?
The GPSS simulation language was chosen as a simple, understandable language accessible even to people without an advanced technical background, while still allowing the reproduction of natural processes.
Function descriptions
GENERATE function
Generates one or more transactions with a specified interval between generations.
Syntax: GENERATE interArrivalTime, interArrivalDeviation, minTransactions, maxTransactions $baseCost, deviation
Parameters:
- interArrivalTime (required): Time between transaction generations.
- interArrivalDeviation (optional, default 0): Deviation of the inter-arrival time.
- minTransactions (optional, default 1): Minimum number of transactions that may be generated.
- maxTransactions (optional, default 1): Maximum number of transactions that may be generated.
- $baseCost (optional, default 0): Base cost of generating a transaction.
- deviation (optional, default 0): Cost deviation.
Example:
GENERATE 5, 1, 2 $10, 1
QUEUE function
Description: Places a transaction into the specified queue.
Syntax: QUEUE queueName $baseCost, deviation
Parameters:
- queueName (required): Name of the queue the transaction is placed into.
- $baseCost (optional, default 0): Base cost of queue placement.
- deviation (optional, default 0): Cost deviation.
Example:
QUEUE A $5, 1
DEPART function
Description: Removes a transaction from the specified queue.
Syntax: DEPART queueName $baseCost, deviation
Parameters:
- queueName (required): Name of the queue the transaction is removed from.
- $baseCost (optional, default 0): Base cost of queue removal.
- deviation (optional, default 0): Cost deviation.
Example:
DEPART A $2, 0.5
SEIZE function
Description: Seizes the specified resource.
Syntax: SEIZE resourceName $baseCost, deviation
Parameters:
- resourceName (required): Name of the resource to be seized.
- $baseCost (optional, default 0): Base cost of seizing the resource.
- deviation (optional, default 0): Cost deviation.
Example:
SEIZE B $15, 5
RELEASE function
Description: Releases the specified resource.
Syntax: RELEASE resourceName $baseCost, deviation
Parameters:
- resourceName (required): Name of the resource being released.
- $baseCost (optional, default 0): Base cost of releasing the resource.
- deviation (optional, default 0): Cost deviation.
Example:
RELEASE B $5, 1
ADVANCE
Description: Waits for the specified amount of time.
Syntax: ADVANCE time, deviation $baseCost, deviationCost
Parameters:
- time (required): Waiting time.
- deviation (optional, default 0): Deviation of the waiting time.
- $baseCost (optional, default 0): Base waiting cost.
deviationCost (optional, default 0): Deviation of the waiting cost.
Example:
ADVANCE 5, 2 $10, 3
TERMINATE function
Description: Terminates the specified number of transactions.
Syntax: TERMINATE num $baseCost, deviation
Parameters:
- num (required): Number of transactions to terminate.
- $baseCost (optional, default 0): Base cost of terminating a transaction.
- deviation (optional, default 0): Cost deviation.
Example:
TERMINATE 1 $1, 0.1
ENTER function
Description: Adds the specified number of units to a resource.
Syntax: ENTER resourceName, units $baseCost, deviation
Parameters:
- resourceName (required): Name of the resource to which units are added.
- units (required): Number of units being added.
- $baseCost (optional, default 0): Base cost of adding units to the resource.
- deviation (optional, default 0): Cost deviation.
Example:
ENTER B, 5 $20, 2
LEAVE function
Description: Removes the specified number of units from a resource.
Syntax: LEAVE resourceName, units $baseCost, deviation
Parameters:
- resourceName (required): Name of the resource from which units are removed.
- units (required): Number of units being removed.
- $baseCost (optional, default 0): Base cost of removing units from the resource.
- deviation (optional, default 0): Cost deviation.
Example:
LEAVE B, 5 $15, 1
TRANSFER function
Description: Transfers control to the specified label under the given condition.
Syntax: TRANSFER condition, label $baseCost, deviation
Parameters:
- condition (required): Condition for performing the transfer (for example, ALWAYS).
- label (required): Label to transfer to.
- $baseCost (optional, default 0): Base transfer cost.
- deviation (optional, default 0): Cost deviation.
Example:
TRANSFER ALWAYS, LOOP $0
IRRIGATE function
Description: Performs an irrigation operation for the specified duration.
Syntax: IRRIGATE time, deviation $baseCost, deviationCost
Parameters:
- time (required): Irrigation time.
- deviation (optional, default 0): Deviation of the irrigation time.
- $baseCost (optional, default 0): Base irrigation cost.
- deviationCost (optional, default 0): Deviation of the irrigation cost.
Example:
IRRIGATE 5, 2 $10, 3
HARVEST function
Description: Performs a harvesting operation for the specified duration.
Syntax: HARVEST time, deviation $baseCost, deviationCost
Parameters:
- time (required): Harvesting time.
- deviation (optional, default 0): Deviation of the harvesting time.
- $baseCost (optional, default 0): Base harvesting cost.
- deviationCost (optional, default 0): Deviation of the harvesting cost.
Example:
HARVEST 7, 1 $15, 4
PESTCONTROL function
Description: Performs a pest-control operation for the specified duration.
Syntax: PESTCONTROL time, deviation $baseCost, deviationCost
Parameters:
- time (required): Pest-control time.
- deviation (optional, default 0): Deviation of the pest-control time.
- $baseCost (optional, default 0): Base pest-control cost.
- deviationCost (optional, default 0): Deviation of the pest-control cost.
Example:
PESTCONTROL 3, 1 $12, 2
SOILTEST function
Description: Performs a soil analysis operation for the specified duration.
Syntax: SOILTEST time, deviation $baseCost, deviationCost
Parameters:
- time (required): Soil analysis time.
- deviation (optional, default 0): Deviation of the soil-analysis time.
- $baseCost (optional, default 0): Base soil-analysis cost.
- deviationCost (optional, default 0): Deviation of the soil-analysis cost.
Example:
SOILTEST 4, 1 $8, 2
Where can I see it?