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)
void defines(String defStr, String asStr)
void setSystemDirectory(String directory)
This example shows how special values of the programming language (e.g.
GAMSParameter addParameter(String identifier, int dimension)
GAMSDatabase addDatabase()
GAMSJob addJobFromString(String source)
void setWorkingDirectory(String directory)
T addRecord(Vector< String > keys)