1package com.gams.examples.specialvalues;
18 public static void main(String[] args)
throws Exception {
22 File workingDirectory =
new File(System.getProperty(
"user.dir"),
"sp");
23 workingDirectory.mkdir();
43 if (GUndef != 1.0E300 )
44 throw new Exception(
"GUndef not as expected: " + GUndef);
46 if (!Double.isNaN(GNA))
47 throw new Exception(
"GNA not as expected: " + GNA);
49 if (GPInf != Double.POSITIVE_INFINITY)
50 throw new Exception(
"GPInf not as expected: " + GPInf);
52 if (GMInf != Double.NEGATIVE_INFINITY)
53 throw new Exception(
"GMInf not as expected: " + GMInf);
55 if (GEps != 4.94066E-324)
56 throw new Exception(
"GEps not as expected: " + GEps);
64 " GPInf / +Inf / \n" +
65 " GMInf / -Inf / \n" +
74 "$gdxIn %gdxincname% \n" +
75 "$load javaUndef javaNA javaPInf javaMInf javaEps \n" +
81 "abort$(GUndef <> javaUndef) 'javaUndef not as expected', GUndef, javaUndef;\n" +
82 "abort$(GNA <> javaNA ) 'javaNA not as expected', GNA, javaNA; \n" +
83 "abort$(GPInf <> javaPInf ) 'javaPInf not as expected', GPInf, javaPInf; \n" +
84 "abort$(GMInf <> javaMInf ) 'javaMInf not as expected', GMInf, javaMInf; \n" +
85 "abort$(GEps <> javaEps ) 'javaEps not as expected', GEps, javaEps \n";
GAMSParameter getParameter(String identifier)
GAMSParameter addParameter(String identifier, int dimension)
void defines(String defStr, String asStr)
void setValue(double value)
T addRecord(Vector< String > keys)
void setSystemDirectory(String directory)
void setWorkingDirectory(String directory)
GAMSJob addJobFromString(String source)
GAMSDatabase addDatabase()
This example shows how special values of the programming language (e.g.
Provides package namespace for Java interface and examples to General Algebraic Model System (GAMS).