--- rat/client/Attic/code.html 2000/06/28 03:41:48 1.5
+++ rat/client/Attic/code.html 2000/08/02 15:27:10 1.10
@@ -9,7 +9,7 @@ Resource Assembly Tool
1/7,1/8,1/10,1/14,1/15,1/16,1/21,1/22,1/29,1/30,1/31,
2/2,2/3,2/10,2/12,2/13,2/14,2/15,2/17,2/18,2/19,2/20,2/21,2/22,
5/2,5/3,5/4,5/5,5/6,5/8,5/9,5/13,5/18,5/20,5/22,5/24,5/25,
-6/7,6/8,6/9,6/10,6/12,6/15
+6/7,6/8,6/9,6/10,6/12,6/15,7/4,7/26,7/28,7/31
Gerd Kortemeyer with Scott Harrison
-->
@@ -47,6 +47,7 @@ var notclear=0;
var linkmode=0;
var lastinfo='';
var graphdef='no';
+var mode='';
var mainrun=0;
var tablemode=0;
var mostrecent=0;
@@ -55,6 +56,14 @@ var zscale=3;
var disrows=0;
var discols=0;
+var finishdone=0;
+var tim=0;
+var funny='|';
+var reqaction='';
+var canceltim;
+
+var expense=0;
+
var data1=new Array(1024);
var data2=new Array(1024);
var data3=new Array(1024);
@@ -68,6 +77,7 @@ var inf;
function insertrow(j,ex1,ex2) {
var kj;
stored=0;
+ expense++; expense++;
objects1='';
objects2='';
for (kj=0;kj<=maxrow;kj++) {
@@ -213,6 +223,7 @@ function insertcol(j) {
if ( col[kj]>j ) { col[kj]++; }
}
maxcol++;
+ expense++; expense++;
col[maxcol]=j+1;
}
@@ -415,6 +426,7 @@ function insertport (obj1,d,inout,linkob
function addobj(kjid,objs) {
stored=0;
+ expense++;
if (rowcont[kjid]!='') { rowcont[kjid]+=':'; }
rowcont[kjid]+=obj.length;
obj[obj.length]=objs;
@@ -620,22 +632,64 @@ function dellink (linknr) {
// Links obj1 with obj2, creates new objlink, marks all elements with number
function joinres (obj1,obj2,cond) {
- var k; var kr; var outcol; var incol; var d;
stored=0;
+ var minexpense;
+ var best;
+
+ expense=0;
+ tryjoin(obj1,obj2,cond,1,1);
+ minexpense=expense;
+ best=0;
+ finishload();
+
+ expense=0;
+ tryjoin(obj1,obj2,cond,1,-1);
+ if (expense');
- for (kr=0;kr<=maxrow;kr++) {
+ for (kr=0;kr<=maxrow;kr++) {
message("Generating Output Row "+kr);
drawrow(rrow[kr]);
}
@@ -1618,7 +1672,7 @@ function save() {
var k;
if (graphdef=='yes') {
parent.server.document.forms.storage.output.value='graphdef<:>yes';
- for (k=0;kobj<:>'+k+'<:>'+obj[k];
}
@@ -1688,10 +1742,13 @@ function graphreset() {
insertcol(-1);
objcont[0]='';
- objcont[1]='Start::false:start:res'
- objcont[2]='Finish::false:finish:res';
- objlinks[0]='';
- objlinks[1]='1:2:0';
+ if (((objcont[1]==undefined)&&(objcont[2]==undefined)) ||
+ ((objcont[1]=='')&&(objcont[2]==''))) {
+ objcont[1]='Start::false:start:res'
+ objcont[2]='Finish::false:finish:res';
+ objlinks[0]='';
+ objlinks[1]='1:2:0';
+ }
graphdef='no';
@@ -2002,7 +2059,7 @@ function simpletabledraw() {
// ---------------------------------- Sort objects to straighten graph or table
function sortobjs() {
- message("Sorting Resources");
+ message("Sorting Resources: "+funny);
var k;
var ij;
var dol;
@@ -2020,6 +2077,8 @@ function sortobjs() {
}
if (objsort.length==0) { return ''; }
for (k=1;k