DomainCheck.java
67 distance.put( new Vector<String>( Arrays.asList(new String[]{"Seattle", "New-York"}) ), Double.valueOf(2.5));
68 distance.put( new Vector<String>( Arrays.asList(new String[]{"Seattle", "Chicago"}) ), Double.valueOf(1.7));
69 distance.put( new Vector<String>( Arrays.asList(new String[]{"Seattle", "Topeka"}) ), Double.valueOf(1.8));
70 distance.put( new Vector<String>( Arrays.asList(new String[]{"San-Diego", "New-York"}) ), Double.valueOf(2.5));
71 distance.put( new Vector<String>( Arrays.asList(new String[]{"San-Diego", "Chicago"}) ), Double.valueOf(1.8));
72 distance.put( new Vector<String>( Arrays.asList(new String[]{"San-Diego", "Topeka"}) ), Double.valueOf(1.4));
152 // b in contrast was defined with relaxed domain info only, therefore we should never see a domain violation
172 System.out.print("***ABORT*** Expected 3 domain violation records of a, but found [" + dvCnt+"]");
192 System.out.println("***ABORT*** Expected 3 domain violation records of d, but found [" + dvCnt+"]");
198 System.out.println("Database Domain Violations of db without maximum limit of record numbers :");
214 System.out.println("***ABORT*** Expected 5 domain violation records of db, but found [" + dvCnt+"]");
236 System.out.println("***ABORT*** Expected 3 domain violation records of db, but found [" + dvCnt+"]");
242 System.out.println("Database Domain Violations of db with no more than 1 violation record per 1 symbol :");
257 System.out.println("***ABORT*** Expected 2 domain violation records of a, but found [" + dvCnt+"]");
271 System.out.println("***ABORT*** It should not be possible to export a GAMSDatabase containing domain violations by default");
298 System.out.println("***ABORT*** Expected GAMSSet i and j but found " + ((GAMSSet)item).getName());
304 System.out.println("***ABORT*** Expected GAMSSet as domain but found relaxed domain " + (String)item);
337 testSet.addRecord("123456789012345678901234567890123456789012345678901234567890123 ").setText("OK");
340 testSet.addRecord("1234567890123456789012345678901234567890123456789012345678901234").setText("not OK");
341 System.out.println("*** It should not be possible to add a record with more than 63 characters");
346 testDB.addSet("textOK", "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345");
348 testDB.addSet("textNotOK", "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456");
349 System.out.println("*** It should not be possible to add an explanatory text with more than 255 characters");
353 testSet.addRecord("OK").setText("123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345");
355 testSet.addRecord("notOK").setText("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456");
356 System.out.println("*** It should not be possible to add an explanatory text with more than 255 characters");
GAMSParameter getParameter(String identifier)
GAMSSet addSet(String identifier, int dimension)
void suppressAutoDomainChecking(boolean value)
GAMSParameter addParameter(String identifier, int dimension)
void export()
List< GAMSDatabaseDomainViolation > getDatabaseDomainViolations(int maxViolation, int maxViolationPerSymbol)
boolean checkDomains()
GAMSSet getSet(String identifier)
GAMSDatabase OutDB()
void run()
void setValue(double value)
void setText(String value)
String getText()
boolean checkDomains()
int getNumberOfRecords()
List< GAMSSymbolDomainViolation > getSymbolDomainViolations(int maxNoViolation)
T findRecord(String ... keys)
T addRecord(Vector< String > keys)
List< Object > getDomains()
void setSystemDirectory(String directory)
void setWorkingDirectory(String directory)
GAMSDatabase addDatabaseFromGDX(String gdxFileName)
GAMSJob addJobFromString(String source)
GAMSDatabase addDatabase()
The example enforces referential integrity also known in the GAMS lingo as domain checking.
Definition: DomainCheck.java:36
Provides package namespace for Java interface and examples to General Algebraic Model System (GAMS).