Sets

GamsStructure.GamsSetType
GamsSet(Elements::Vector{GamsElement}, description = "")

Container to hold GamsElements.

Best way to create a new set is using the @set macro.

source
GamsStructure.GamsSetMethod
GamsSet(x::Tuple...;description = "")

GamsSet constructor for a tuple of the form (name,description) which will be made into GamsElements

source
GamsStructure.GamsSetMethod
GamsSet(x::Vector{Tuple{Symbol,String}};description = "")

GamsSet constructor for a vector of tuples of the form (name,description) which will be made into GamsElements

source
GamsStructure.GamsSetMethod
GamsSet(e::Vector{Symbol};description = "")

GamsSet constructor for a tuple of symbols which will be made into GamsElements with empty description.

source
GamsStructure.GamsDomainSetMethod
GamsDomainSet(base_path::String,set_info::Tuple;description = "")

Load data from a single column of a CSV into a GamsSet.

The variable set_info is a tuple of the form (Symbol,Int) where the Int is the column to load.

#Should be modified to be separate inputs.

source
GamsStructure.@setMacro
@set(GU, set_name, description, block)

Macro to create a GamsSet.

@set(GU,I,"example set",begin
    element_1, "Description 1"
    element_2, "Description 2"
    element_3, "Description 3"
end)

This will put the set I in the local name space as well.

source
GamsStructure.load_setFunction
load_set(path::String;description = "",aliases=[])

Load a GamsSet from a CSV file at the given location.

Sets must be one dimensional (at least for now) and it's assumed the first column are the elements and the second column is the description. If the second column is missing, the description is ""

source
GamsStructure.load_set!Function
load_set!(GU::GamsUniverse,set_name::Symbol,path::String;description="",aliases=[])

Same as load_set, except the set gets added to the universe.

source
GamsStructure.@load_sets!Macro
@GamsSets(GU,base_path,block)

Load a collection of sets from a file. This will search for the file base_path\name.csv where name is the first entry of each line in the block.

@GamsSets(GU,"sets",begin :i, "Set 1", filepath => "othername.csv" :j, "Set 2" end)

source