/* SCCS %W--- 09/20/99 -- 19:17:52 */
// Copyright: Copyright (c) 1997 University of Southern California Brain Project.
// Copyright: This software may be freely copied provided the toplevel
// Copyright: COPYRIGHT file is included with each such copy.
// Copyright: Email nsl@java.usc.edu.
//
// NslMain.java
//
//////////////////////////////////////////////////////////////////////
/**
* The main routine.
Instantiate all esstential components in the simulator and
launch interpreter.
*/
//import tcl.lang.*;
import nslj.src.system.*;
import nslj.src.cmd.*;
import nslj.src.lang.*;
import nslj.src.math.*;
import nslj.src.display.*;
//import nslj.src.nsls.struct.*;
public class NslMain {
static public boolean TopLoaded =false;
static NslInterpreter interpreter;
static NslScheduler scheduler;
//static NslScheduler trainScheduler;
static NslSystem system;
static String modelname;
private static boolean noDisplay=false;
private static boolean smallScreen=false;
private static boolean stdout=true;
private static boolean stderr=false;
private static int debug=0;
private static String schedulerMethod="pre";
private static NslExecutive executive;
/**
* Main routine for NslMain application.
It calls main() with no args
to instantiate essential components in the
simulator and launch the interpreter for user input.
*/
public static void main(String argv[]) {
int dummy1,dummy2;
if (argv.length==0 || argv.length == 1 &&
(argv[0].compareTo("-0")==0 || argv[0].compareTo("-h")==0)) {
System.err.println(
"Error in NslMain: correct usage is: java NslMain ");
return;
}
modelname=argv[0];
//System.out.println("Debug: NslMain: Loading "+modelname);
// What do all of these do? aa 98/8/4
for(int i=1;i