minor fixes. Updated libraries

This commit is contained in:
darksnake 2016-03-30 16:01:28 +03:00
parent 8f1a01d54f
commit b768fe6186
2 changed files with 9 additions and 8 deletions

10
pom.xml
View File

@ -20,16 +20,16 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>2.6</version> <version>2.7</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version> <version>2.5.1</version>
<configuration> <configuration>
<source>1.7</source> <source>1.8</source>
<target>1.7</target> <target>1.8</target>
<showDeprecation>true</showDeprecation> <showDeprecation>true</showDeprecation>
</configuration> </configuration>
</plugin> </plugin>
@ -46,7 +46,7 @@
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId> <artifactId>commons-math3</artifactId>
<version>3.2</version> <version>3.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.java.dev.jna</groupId> <groupId>net.java.dev.jna</groupId>

View File

@ -14,9 +14,11 @@ public class Trapping {
public static void main(String[] args) throws FileNotFoundException { public static void main(String[] args) throws FileNotFoundException {
PrintWriter out = null; PrintWriter out = null;
if ((args != null) && (args[0] != null)) { if ((args.length > 0) && (args[0] != null)) {
File file = new File(args[0]); File file = new File(args[0]);
out = new PrintWriter(file); out = new PrintWriter(file);
} else {
} }
double E = 18000d; double E = 18000d;
@ -31,7 +33,7 @@ public class Trapping {
int rejected = 0; int rejected = 0;
int lowE = 0; int lowE = 0;
ArrayList<ElectronTrappingSimulator.SimulaionResult> results = simulator.simulateAll(E, 500000); ArrayList<ElectronTrappingSimulator.SimulaionResult> results = simulator.simulateAll(E, 50000);
for (Iterator<ElectronTrappingSimulator.SimulaionResult> it = results.iterator(); it.hasNext();) { for (Iterator<ElectronTrappingSimulator.SimulaionResult> it = results.iterator(); it.hasNext();) {
ElectronTrappingSimulator.SimulaionResult res = it.next(); ElectronTrappingSimulator.SimulaionResult res = it.next();
@ -86,7 +88,6 @@ public class Trapping {
out.printf("The total number of LOWENERGY events is %d.%n%n", lowE); out.printf("The total number of LOWENERGY events is %d.%n%n", lowE);
out.close(); out.close();
} }
} }
} }