Skip to content

Commit

Permalink
Merge pull request #7286 from ORNL-AMO/develop
Browse files Browse the repository at this point in the history
Release 1.5.9
  • Loading branch information
esserhr authored Jan 24, 2025
2 parents f820bdd + 84a874e commit 9571771
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 60 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amo-tools-desktop",
"version": "1.5.8",
"version": "1.5.9",
"main": "main.js",
"license": "MIT",
"description": "MEASUR",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,9 @@ export class CompressedAirAssessmentResultsService {
if (systemInformation.multiCompressorSystemControls == 'baseTrim') {
//set base trim ordering
let trimSelection: { dayTypeId: string, compressorId: string } = systemInformation.trimSelections.find(selection => { return selection.dayTypeId == dayType.dayTypeId });
intervalData = this.setBaseTrimOrdering(intervalData, adjustedCompressors, neededAirFlow, trimSelection.compressorId, dayType, reduceRuntime);
if (trimSelection.compressorId) {
intervalData = this.setBaseTrimOrdering(intervalData, adjustedCompressors, neededAirFlow, trimSelection.compressorId, dayType, reduceRuntime);
}
} else if (systemInformation.multiCompressorSystemControls == 'loadSharing') {
//share load..
return this.shareLoad(intervalData, adjustedProfileSummary, adjustedCompressors, neededAirFlow, settings, additionalRecieverVolume, atmosphericPressure, totalAirStorage, reduceRuntime, dayType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,21 @@ export class CompressedAirAssessmentService {

updateCompressedAir(compressedAirAssessment: CompressedAirAssessment, isBaselineChange: boolean) {
if (isBaselineChange) {
let settings: Settings = this.settings.getValue();
let hasValidSystemInformation = this.systemInformationFormService.getFormFromObj(compressedAirAssessment.systemInformation, settings).valid;
let hasValidCompressors = this.inventoryService.hasValidCompressors(compressedAirAssessment);
let hasValidDayTypes = this.dayTypeService.hasValidDayTypes(compressedAirAssessment.compressedAirDayTypes);
let profileSummaryValid = this.hasValidProfileSummaryData(compressedAirAssessment);
compressedAirAssessment.setupDone = (hasValidSystemInformation && hasValidCompressors && hasValidDayTypes && profileSummaryValid.isValid);
this.setIsSetupDone(compressedAirAssessment)
}
//TODO? set modifications valid?
this.compressedAirAssessment.next(compressedAirAssessment);
}

setIsSetupDone(compressedAirAssessment: CompressedAirAssessment) {
let settings: Settings = this.settings.getValue();
let hasValidSystemInformation = this.systemInformationFormService.getFormFromObj(compressedAirAssessment.systemInformation, settings).valid;
let hasValidCompressors = this.inventoryService.hasValidCompressors(compressedAirAssessment);
let hasValidDayTypes = this.dayTypeService.hasValidDayTypes(compressedAirAssessment.compressedAirDayTypes);
let profileSummaryValid = this.hasValidProfileSummaryData(compressedAirAssessment);
compressedAirAssessment.setupDone = (hasValidSystemInformation && hasValidCompressors && hasValidDayTypes && profileSummaryValid.isValid);
}

getDefaultProfileSummaryValid(): ProfileSummaryValid {
return {
powerError: undefined,
Expand Down Expand Up @@ -105,7 +109,7 @@ export class CompressedAirAssessmentService {
};

if (summary.dayTypeId == selectedDayTypeId) {
let currentCompressor: CompressorInventoryItem = this.compressedAirAssessment.getValue().compressorInventoryItems.find(compressor => compressor.itemId === summary.compressorId);
let currentCompressor: CompressorInventoryItem = compressedAirAssessment.compressorInventoryItems.find(compressor => compressor.itemId === summary.compressorId);
summary.profileSummaryData.forEach((data, index) => {
if (data.order != 0) {
let isValidProfileData: boolean = true;
Expand Down Expand Up @@ -332,18 +336,15 @@ export class CompressedAirAssessmentService {
}

getHasMissingTrimSelection(compressedAirAssessment: CompressedAirAssessment): boolean {
let dayTypesInUse: CompressedAirDayType[] = compressedAirAssessment.compressedAirDayTypes;
let hasMissingTrimSelection: boolean = true;
dayTypesInUse.forEach(dayType => {
hasMissingTrimSelection = !compressedAirAssessment.systemInformation.trimSelections.some(selection => {
if (selection.dayTypeId == dayType.dayTypeId && selection.compressorId) {
return true;
} else {
return false;
}
});

let hasMissingTrimSelection: boolean = compressedAirAssessment.systemInformation.trimSelections.some(selection => {
let dayTypeInUse = compressedAirAssessment.compressedAirDayTypes.some(dayType => dayType.dayTypeId === selection.dayTypeId);
if (dayTypeInUse && selection.compressorId) {
return false;
} else {
return true;
}
});

return hasMissingTrimSelection;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class ExploreOpportunitiesComponent implements OnInit {
this.compressedAirAssessment.systemInformation.atmosphericPressure,
this.compressedAirAssessment.systemProfile.systemProfileSetup.dataInterval,
this.compressedAirAssessment.systemInformation.totalAirStorage,
this.settings.electricityCost,
this.compressedAirAssessment.systemBasics.electricityCost,
this.compressedAirAssessment.systemInformation
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
<tbody *ngFor="let summary of profileSummary">
<tr class="compressor-name-row">
<td colspan="100" class="bold">{{(summary.compressorId | compressorName: inventoryItems)}}
<span *ngIf="checkIsTrim(summary.compressorId)">
<span *ngIf="summary.compressorId === selectedTrimCompressorId">
(Trim)
</span>

</td>
</tr>
<tr>
Expand Down Expand Up @@ -80,12 +79,18 @@
Order
</td>
<td *ngFor="let data of summary.profileSummaryData;">
<span *ngIf="data.order != 0">
{{data.order}}
</span>
<span *ngIf="data.order == 0">
&mdash;
</span>
@if (systemInformation.multiCompressorSystemControls == 'baseTrim') {
<span *ngIf="data.order != 0 && summary.compressorId === selectedTrimCompressorId">Trim</span>
<span *ngIf="data.order != 0 && summary.compressorId !== selectedTrimCompressorId">Base</span>
<span *ngIf="data.order == 0">&mdash;</span>
} @else {
<span *ngIf="data.order != 0">
{{data.order}}
</span>
<span *ngIf="data.order == 0">
&mdash;
</span>
}
</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,25 @@ export class ProfileSummaryTableComponent implements OnInit {
systemProfileSetup: SystemProfileSetup;
@Input()
systemInformation: SystemInformation;


selectedTrimCompressorId: string;

@ViewChild('profileTable', { static: false }) profileTable: ElementRef;
allTablesString: string;
constructor() { }

ngOnInit(): void {
if (this.systemInformation.trimSelections && this.systemProfileSetup.dayTypeId) {
let selection = this.systemInformation.trimSelections.find(selection => selection.dayTypeId == this.systemProfileSetup.dayTypeId);
this.selectedTrimCompressorId = selection? selection.compressorId : undefined;
}
}

updateTableString() {
this.allTablesString = this.profileTable.nativeElement.innerText;
}


checkShowAuxiliary() {
let auxTotal: ProfileSummaryTotal = this.totals.find(totalData => { return totalData.auxiliaryPower != 0 });
return auxTotal != undefined;
}

checkIsTrim(compressorId: string): boolean {
if (this.systemInformation.multiCompressorSystemControls == 'baseTrim' && this.systemInformation.trimSelections && this.systemProfileSetup.dayTypeId) {
let selection = this.systemInformation.trimSelections.find(selection => { return selection.dayTypeId == this.systemProfileSetup.dayTypeId && selection.compressorId == compressorId });
return selection != undefined;
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@
class="btn btn-sm" *ngIf="summaryData.order == 0" (click)="toggleOn(summary, orderIndex)">Off</button>
<button id="{{'order_'+compressorIndex+orderIndex}}" name="{{'order_'+compressorIndex+orderIndex}}"
class="btn btn-sm btn-active" *ngIf="summaryData.order != 0"
(click)="toggleOn(summary, orderIndex)">{{summaryData.order}}</button>
(click)="toggleOn(summary, orderIndex)">
<span *ngIf="summary.compressorId === this.trimSelection">Trim</span>
<span *ngIf="summary.compressorId !== this.trimSelection">Base</span>
</button>
</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Assessment } from '../../../../../shared/models/assessment';
import { CompressedAirDayType, ProfileSummary, ProfileSummaryTotal } from '../../../../../shared/models/compressed-air-assessment';
import { Settings } from '../../../../../shared/models/settings';
import { AssessmentService } from '../../../../assessment.service';
import { CompressedAirAssessmentService } from '../../../../../compressed-air-assessment/compressed-air-assessment.service';

@Component({
selector: 'app-compressed-air-assessment-card',
Expand All @@ -29,9 +30,11 @@ export class CompressedAirAssessmentCardComponent implements OnInit {

constructor(private assessmentService: AssessmentService, private settingsDbService: SettingsDbService,
private compressedAirAssessmentResultsService: CompressedAirAssessmentResultsService,
private compressedAirAssessmentService: CompressedAirAssessmentService,
private exploreOpportunitiesValidationService: ExploreOpportunitiesValidationService) { }

ngOnInit(): void {
this.compressedAirAssessmentService.setIsSetupDone(this.assessment.compressedAirAssessment);
this.setupDone = this.assessment.compressedAirAssessment.setupDone;
if (this.setupDone) {
this.settings = this.settingsDbService.getByAssessmentId(this.assessment);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h3>Release Notes for v{{versionNum}}</h3>
Energy Performance certified. Based on older Department of Energy (DOE) tools, the Advanced Manufacturing
Office (AMO) has undertaken this effort to refactor the legacy tools into a modern environment.
The suite includes 7 energy system assessment modules, a Data Exploration Module, extensive help text,
comprehensive reports, data visualization, and 79 calculators!
comprehensive reports, data visualization, and 80 calculators!
</p>
<p>
MEASUR is a supported application, updates are expected and may impact previously created assessments.
Expand All @@ -34,6 +34,16 @@ <h3>Release Notes for v{{versionNum}}</h3>
not be available.</li>
</ul>

<label>Here are the details of what's new in version 1.5.9:</label>
<br>
<label>Compressed Air</label>
<ul>
<li>Enhanced: In Compressor Ordering and Profile Summary tables, trim compressors are now marked 'Base' or 'Trim'</li>
<li>Fixed: Explore Opportunities results are now calculated with user-entered electricity cost</li>
<li>Fixed: Trim compressor validation</li>
<li>Fixed: Calculation method for compressors with variable displacement</li>
</ul>

<label>Here are the details of what's new in version 1.5.8:</label>
<br>
<label>Compressed Air</label>
Expand All @@ -53,20 +63,6 @@ <h3>Release Notes for v{{versionNum}}</h3>
<li>Fixed: Performance Profiles chart displaying no data due to AMO-Tools-Suite bug</li>
</ul>

<label>Here are the details of what's new in version 1.5.6:</label>
<br>
<label>Calculators</label>
<ul>
<li>Enhanced: Motor Perforance Calc - increased decimal places and decreased data interval to 0.5%, updated help text</li>
<li>Enhanced: Pump Achieveable Efficiency - updated help and messaging pertaining to the two lines, updated help text</li>
</ul>

<label>Treasure Hunt</label>
<ul>
<li>Added: Power Factor Calculator to Treasure Hunt</li>
<li>Fixed: Display of "Other Savings" in Opportunity Card</li>
</ul>

<label>Known Issues</label>
<ul>
<li>The Auto-update feature is currently unavailable for the Mac and Linux versions</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export class CompressedAirSuiteApiService {

compressorsCalcVariableDisplacement(input: CompressorsCalcInput) {
let powerAtFullLoad = this.suiteApiHelperService.convertNullInputValueForObjectConstructor(input.powerAtFullLoad)
let capacityAtFullLoad = this.suiteApiHelperService.convertNullInputValueForObjectConstructor(input.capacityAtUnload)
let capacityAtFullLoad = this.suiteApiHelperService.convertNullInputValueForObjectConstructor(input.capacityAtFullLoad)
let receiverVolume = this.suiteApiHelperService.convertNullInputValueForObjectConstructor(input.receiverVolume)
let powerMax = this.suiteApiHelperService.convertNullInputValueForObjectConstructor(input.powerMax)
let powerAtNoLoad = this.suiteApiHelperService.convertNullInputValueForObjectConstructor(input.powerAtNoLoad)
Expand Down

0 comments on commit 9571771

Please sign in to comment.