public void loadSim(String fileName) throws IOException {
		if (currentFile != null) {
			String parentDirectory = MiscUtil.getParentDirectory(currentFile.toString());
			if (parentDirectory != null)
				loadFile(new File(parentDirectory, fileName));
		} else if (currentModel != null) {
			String parentDirectory = MiscUtil.getParentDirectory(currentModel);
			if (parentDirectory != null)
				loadModel(parentDirectory + fileName);
		} else if (currentURL != null) {
			String parentDirectory = MiscUtil.getParentDirectory(currentURL.toString());
			if (parentDirectory != null)
				loadURL(new URL(parentDirectory + fileName));
		} else {
			URL codeBase = null;
			try {
				codeBase = getCodeBase();
			} catch (Exception e) {
			}
			if (codeBase != null) {
				try {
					loadURL(new URL(codeBase, fileName));
				} catch (IOException e) {
					throw e;
				}
			}
		}
	}