com.gams.examples.transport.TransportModel Class Reference

This example shows the wrapper model of a transportation problem based on the simple GAMS [trnsport] model from the GAMS Model Library. More...

Pulic Methods

 TransportModel (GAMSWorkspace ws)
 TransportModel constructor. More...
 
void run (GAMSCheckpoint checkpoint)
 Executes the trnsport model. More...
 
void run (PrintStream output)
 Executes the trnsport model. More...
 
void run (GAMSCheckpoint checkpoint, PrintStream output)
 Executes the trnsport model. More...
 
GAMSSet geti ()
 i: canning plants
 
GAMSSet getj ()
 j: markets
 
GAMSParameter geta ()
 a(i): capacity of plant i in cases
 
GAMSParameter getb ()
 b(i): demand at market j in cases
 
GAMSParameter getd ()
 d(i,j): distance in thousands of miles
 
GAMSParameter getf ()
 f: freight in dollars per case per thousand miles
 
GAMSVariable getx ()
 x(i,j): shipment quantities in cases
 
GAMSVariable getz ()
 z: total transportation costs in thousands of dollars
 
GAMSOptions getopt ()
 Options for the execution of the trnsport model.
 
String getModelSource ()
 Provide the source of trnsport model.
 

Detailed Description

This example shows the wrapper model of a transportation problem based on the simple GAMS [trnsport] model from the GAMS Model Library.

Definition at line 19 of file TransportModel.java.

Constructors

◆ TransportModel()

com.gams.examples.transport.TransportModel.TransportModel ( GAMSWorkspace  ws)

TransportModel constructor.

Parameters
wsa GAMSWorkspace where the files are located

Definition at line 34 of file TransportModel.java.

Methods

◆ run() [1/3]

void com.gams.examples.transport.TransportModel.run ( GAMSCheckpoint  checkpoint)

Executes the trnsport model.

Parameters
checkpointGAMSCheckpoint to be created by GAMSJob

Definition at line 62 of file TransportModel.java.

Referenced by com.gams.examples.transport.TransportModel.run().

◆ run() [2/3]

void com.gams.examples.transport.TransportModel.run ( PrintStream  output)

Executes the trnsport model.

Parameters
outputStream to capture GAMS log

Definition at line 70 of file TransportModel.java.

◆ run() [3/3]

void com.gams.examples.transport.TransportModel.run ( GAMSCheckpoint  checkpoint,
PrintStream  output 
)

Executes the trnsport model.

Parameters
checkpointGAMSCheckpoint to be created by GAMSJob
outputStream to capture GAMS log

Definition at line 79 of file TransportModel.java.