Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/855'
Browse files Browse the repository at this point in the history
  • Loading branch information
1fifoto committed Oct 15, 2023
2 parents 3e6159f + 90eed7a commit 6d41098
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 28 deletions.
6 changes: 6 additions & 0 deletions client/src/designtypes/Spring/Compression/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ export function migrate(design) {
// FDCL definition in initialState for COMPRESSION. The user cannot create
// FDCL if it is not already configured in initialState.
// ***************************************************************
if (element.lmin === undefined) {
element.lmin = 0;
}
if (element.lmax === undefined) {
element.lmax = 0;
}
if (element.cmin === undefined) {
element.cmin = element.value;
}
Expand Down
6 changes: 6 additions & 0 deletions client/src/designtypes/Spring/Extension/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ export function migrate(design) {
sink.cmaxchoice = sink.cmaxchoices.indexOf(source.name);
// console.log('In migrate.propgate source.name=',source.name,'sink.cmaxchoices=',sink.cmaxchoices,'sink.cmaxchoice=',sink.cmaxchoice);
}
if (element.lmin === undefined) {
element.lmin = 0;
}
if (element.lmax === undefined) {
element.lmax = 0;
}
if (element.cmin === undefined) {
element.cmin = element.value;
}
Expand Down
6 changes: 6 additions & 0 deletions client/src/designtypes/Spring/Torsion/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ export function migrate(design) {
// FDCL definition in initialState for TORSION. The user cannot create
// FDCL if it is not already configured in initialState.
// ***************************************************************
if (element.lmin === undefined) {
element.lmin = 0;
}
if (element.lmax === undefined) {
element.lmax = 0;
}
if (element.cmin === undefined) {
element.cmin = element.value;
}
Expand Down
26 changes: 12 additions & 14 deletions client/src/menus/View/ViewObjectiveValue.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ class ViewObjectiveValue extends Component {
}

renderElement(viol_sum, element, i) {
var flags = [
'','CONSTRAINED','FIXED','CONSTRAINED|FIXED',
'FDCL','CONSTRAINED|FDCL','FIXED|FDCL','CONSTRAINED|FIXED|FDCL']
var flags = ['','CONSTRAINED','FIXED','CONSTRAINED|FIXED','FDCL','CONSTRAINED|FDCL','FIXED|FDCL','CONSTRAINED|FIXED|FDCL']
var validity_vmin;
var validity_vmax;
var feasibility_vmin;
Expand Down Expand Up @@ -249,17 +247,17 @@ class ViewObjectiveValue extends Component {
<td>{feasibility_vmin <= 0.0 ? '' : feasibility_vmin}</td>
<td>{feasibility_vmax <= 0.0 ? '' : feasibility_vmax}</td>
<td>{element.value}</td>
<td>{element.lmin !== undefined ? element.validmin : ''}</td>
<td>{element.lmin !== undefined ? element.validmax : ''}</td>
<td>{element.lmin !== undefined ? flags[element.lmin] : ''}</td>
<td>{element.lmin !== undefined ? flags[element.lmax] : ''}</td>
<td>{element.lmin !== undefined ? element.cmin : ''}</td>
<td>{element.lmin !== undefined ? element.cmax : ''}</td>
<td>{element.lmin !== undefined ? element.vmin : ''}</td>
<td>{element.lmin !== undefined ? element.vmax : ''}</td>
<td>{element.lmin !== undefined ? element.sdlim : ''}</td>
<td>{element.lmin !== undefined ? element.smin : ''}</td>
<td>{element.lmin !== undefined ? element.smax : ''}</td>
<td>{String(element.validmin)}</td>
<td>{String(element.validmax)}</td>
<td>{String(element.lmin)+'='+flags[element.lmin]}</td>
<td>{String(element.lmax)+'='+flags[element.lmax]}</td>
<td>{String(element.cmin)}</td>
<td>{String(element.cmax)}</td>
<td>{String(element.vmin)}</td>
<td>{String(element.vmax)}</td>
<td>{element.sdlim}</td>
<td>{String(element.smin)}</td>
<td>{String(element.smax)}</td>
</tr>
);
}
Expand Down
4 changes: 2 additions & 2 deletions client/src/menus/View/ViewSymbolTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ class ViewSymbolTable extends Component {
<td>{JSON.stringify(element.propagate)}</td>
<td>{String(element.validmin)}</td>
<td>{String(element.validmax)}</td>
<td>{flags[element.lmin]}</td>
<td>{flags[element.lmax]}</td>
<td>{String(element.lmin)}={String(flags[element.lmin])}</td>
<td>{String(element.lmax)}={String(flags[element.lmax])}</td>
<td>{String(element.cmin)}</td>
<td>{String(element.cmax)}</td>
<td>{String(element.vmin)}</td>
Expand Down
25 changes: 13 additions & 12 deletions scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,24 @@ connection.query(stmt, function(err, rows, fields) {
value.forEach((row) => {
// console.log('symbol_table=',row.value.symbol_table)
row.value.symbol_table.forEach((entry) => {
if (entry.lmin === undefined && entry.lmax === undefined) {
console.log('1 filetype=',row.type,'filename=',row.name,'user=',row.user,'version=',row.value.version,'name=',entry.name,'No lmin and lmax');
count++;
} else if (entry.lmin === undefined) {
console.log('2 filetype=',row.type,'filename=',row.name,'user=',row.user,'version=',row.value.version,'name=',entry.name,'No lmax');
count++;
} else if (entry.lmax === undefined) {
console.log('3 filetype=',row.type,'filename=',row.name,'user=',row.user,'version=',row.value.version,'name=',entry.name,'No lmax');
count++;
}
if (entry.cmin === undefined && entry.cmax === undefined) {
console.log('1 filetype=',row.type,'filename=',row.name,'user=',row.user,'version=',row.value.version,'No cmin and cmax','name=',entry.name);
if (!(entry.lmin & FIXED) && !(entry.lmax & FIXED)) {
console.log('@@@','lmin=',entry.lmin,'lmax=',entry.lmax);
}
console.log('4 filetype=',row.type,'filename=',row.name,'user=',row.user,'version=',row.value.version,'name=',entry.name,'No cmin and cmax');
count++;
} else if (entry.cmin === undefined) {
console.log('2 filetype=',row.type,'filename=',row.name,'user=',row.user,'version=',row.value.version,'No cmax','name=',entry.name);
if (!(entry.lmin & FIXED) && !(entry.lmax & FIXED)) {
console.log('@@@','lmin=',entry.lmin,'lmax=',entry.lmax);
}
console.log('5 filetype=',row.type,'filename=',row.name,'user=',row.user,'version=',row.value.version,'name=',entry.name,'No cmax');
count++;
} else if (entry.cmax === undefined) {
console.log('3 filetype=',row.type,'filename=',row.name,'user=',row.user,'version=',row.value.version,'No cmax','name=',entry.name);
if (!(entry.lmin & FIXED) && !(entry.lmax & FIXED)) {
console.log('@@@','lmin=',entry.lmin,'lmax=',entry.lmax);
}
console.log('6 filetype=',row.type,'filename=',row.name,'user=',row.user,'version=',row.value.version,'name=',entry.name,'No cmax');
count++;
}
})
Expand Down

0 comments on commit 6d41098

Please sign in to comment.