@likewatt/models 1.110.0 → 1.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/Scenario.d.ts +36 -0
- package/dist/core/Scenario.js +122 -1
- package/package.json +3 -2
package/dist/core/Scenario.d.ts
CHANGED
|
@@ -109,6 +109,39 @@ export declare const PvSchema: MSchema<Pv, import("mongoose").Model<Pv, any, any
|
|
|
109
109
|
} & {
|
|
110
110
|
__v: number;
|
|
111
111
|
}>;
|
|
112
|
+
export declare class ChargingStationSlotParam {
|
|
113
|
+
months: number[];
|
|
114
|
+
days: number[];
|
|
115
|
+
startHour: string;
|
|
116
|
+
endHour: string;
|
|
117
|
+
drivable: boolean;
|
|
118
|
+
usageRate: number;
|
|
119
|
+
sellingPrice: number;
|
|
120
|
+
}
|
|
121
|
+
export declare const ChargingStationSlotParamSchema: MSchema<ChargingStationSlotParam, import("mongoose").Model<ChargingStationSlotParam, any, any, any, Document<unknown, any, ChargingStationSlotParam, any, {}> & ChargingStationSlotParam & {
|
|
122
|
+
_id: import("mongoose").Types.ObjectId;
|
|
123
|
+
} & {
|
|
124
|
+
__v: number;
|
|
125
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ChargingStationSlotParam, Document<unknown, {}, import("mongoose").FlatRecord<ChargingStationSlotParam>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<ChargingStationSlotParam> & {
|
|
126
|
+
_id: import("mongoose").Types.ObjectId;
|
|
127
|
+
} & {
|
|
128
|
+
__v: number;
|
|
129
|
+
}>;
|
|
130
|
+
export declare class ChargingStationParam {
|
|
131
|
+
numberOfUnits: number;
|
|
132
|
+
power: number;
|
|
133
|
+
capex: number;
|
|
134
|
+
settings?: ChargingStationSlotParam[];
|
|
135
|
+
}
|
|
136
|
+
export declare const ChargingStationParamSchema: MSchema<ChargingStationParam, import("mongoose").Model<ChargingStationParam, any, any, any, Document<unknown, any, ChargingStationParam, any, {}> & ChargingStationParam & {
|
|
137
|
+
_id: import("mongoose").Types.ObjectId;
|
|
138
|
+
} & {
|
|
139
|
+
__v: number;
|
|
140
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ChargingStationParam, Document<unknown, {}, import("mongoose").FlatRecord<ChargingStationParam>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<ChargingStationParam> & {
|
|
141
|
+
_id: import("mongoose").Types.ObjectId;
|
|
142
|
+
} & {
|
|
143
|
+
__v: number;
|
|
144
|
+
}>;
|
|
112
145
|
export declare class ConfigScenario {
|
|
113
146
|
debtDuration?: number;
|
|
114
147
|
debtRatio?: number;
|
|
@@ -171,6 +204,9 @@ export declare class Scenario {
|
|
|
171
204
|
workspaceId?: string;
|
|
172
205
|
technologies?: Technology[];
|
|
173
206
|
pvs?: Pv[];
|
|
207
|
+
paramsChargingStations?: Record<string, {
|
|
208
|
+
stations: ChargingStationParam[];
|
|
209
|
+
}>;
|
|
174
210
|
version?: number;
|
|
175
211
|
isFullSellOut?: boolean;
|
|
176
212
|
isACCScenario?: boolean;
|
package/dist/core/Scenario.js
CHANGED
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ScenarioTypeSchema = exports.ScenarioType = exports.ScenarioSchema = exports.Scenario = exports.ConfigSiteSchema = exports.ConfigSite = exports.ConfigScenarioSchema = exports.ConfigScenario = exports.PvSchema = exports.Pv = exports.TechnologySchema = exports.Technology = exports.RateOfGrowthSchema = exports.RateOfGrowth = exports.DistributionKeySchema = exports.DistributionKey = exports.DistributionKeyValueSchema = exports.DistributionKeyValue = exports.DemandMultiplierSlotSchema = exports.DemandMultiplierSlot = exports.ObjectiveSchema = exports.Objective = void 0;
|
|
12
|
+
exports.ScenarioTypeSchema = exports.ScenarioType = exports.ScenarioSchema = exports.Scenario = exports.ConfigSiteSchema = exports.ConfigSite = exports.ConfigScenarioSchema = exports.ConfigScenario = exports.ChargingStationParamSchema = exports.ChargingStationParam = exports.ChargingStationSlotParamSchema = exports.ChargingStationSlotParam = exports.PvSchema = exports.Pv = exports.TechnologySchema = exports.Technology = exports.RateOfGrowthSchema = exports.RateOfGrowth = exports.DistributionKeySchema = exports.DistributionKey = exports.DistributionKeyValueSchema = exports.DistributionKeyValue = exports.DemandMultiplierSlotSchema = exports.DemandMultiplierSlot = exports.ObjectiveSchema = exports.Objective = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
const uuid_1 = require("uuid");
|
|
@@ -291,6 +291,96 @@ exports.Pv = Pv = __decorate([
|
|
|
291
291
|
(0, mongoose_1.Schema)({ _id: false })
|
|
292
292
|
], Pv);
|
|
293
293
|
exports.PvSchema = mongoose_1.SchemaFactory.createForClass(Pv);
|
|
294
|
+
let ChargingStationSlotParam = class ChargingStationSlotParam {
|
|
295
|
+
};
|
|
296
|
+
exports.ChargingStationSlotParam = ChargingStationSlotParam;
|
|
297
|
+
__decorate([
|
|
298
|
+
(0, swagger_1.ApiProperty)({
|
|
299
|
+
type: [Number],
|
|
300
|
+
example: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
301
|
+
}),
|
|
302
|
+
(0, mongoose_1.Prop)({ type: [Number], required: true }),
|
|
303
|
+
(0, class_validator_1.IsArray)(),
|
|
304
|
+
__metadata("design:type", Array)
|
|
305
|
+
], ChargingStationSlotParam.prototype, "months", void 0);
|
|
306
|
+
__decorate([
|
|
307
|
+
(0, swagger_1.ApiProperty)({ type: [Number], example: [1, 2, 3, 4, 5, 6, 7] }),
|
|
308
|
+
(0, mongoose_1.Prop)({ type: [Number], required: true }),
|
|
309
|
+
(0, class_validator_1.IsArray)(),
|
|
310
|
+
__metadata("design:type", Array)
|
|
311
|
+
], ChargingStationSlotParam.prototype, "days", void 0);
|
|
312
|
+
__decorate([
|
|
313
|
+
(0, swagger_1.ApiProperty)({ example: '08:00' }),
|
|
314
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
315
|
+
(0, class_validator_1.IsString)(),
|
|
316
|
+
__metadata("design:type", String)
|
|
317
|
+
], ChargingStationSlotParam.prototype, "startHour", void 0);
|
|
318
|
+
__decorate([
|
|
319
|
+
(0, swagger_1.ApiProperty)({ example: '20:00' }),
|
|
320
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
321
|
+
(0, class_validator_1.IsString)(),
|
|
322
|
+
__metadata("design:type", String)
|
|
323
|
+
], ChargingStationSlotParam.prototype, "endHour", void 0);
|
|
324
|
+
__decorate([
|
|
325
|
+
(0, swagger_1.ApiProperty)({ example: true }),
|
|
326
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
327
|
+
(0, class_validator_1.IsBoolean)(),
|
|
328
|
+
__metadata("design:type", Boolean)
|
|
329
|
+
], ChargingStationSlotParam.prototype, "drivable", void 0);
|
|
330
|
+
__decorate([
|
|
331
|
+
(0, swagger_1.ApiProperty)({ example: 0.8 }),
|
|
332
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
333
|
+
(0, class_validator_1.IsNumber)(),
|
|
334
|
+
__metadata("design:type", Number)
|
|
335
|
+
], ChargingStationSlotParam.prototype, "usageRate", void 0);
|
|
336
|
+
__decorate([
|
|
337
|
+
(0, swagger_1.ApiProperty)({ example: 0.35 }),
|
|
338
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
339
|
+
(0, class_validator_1.IsNumber)(),
|
|
340
|
+
__metadata("design:type", Number)
|
|
341
|
+
], ChargingStationSlotParam.prototype, "sellingPrice", void 0);
|
|
342
|
+
exports.ChargingStationSlotParam = ChargingStationSlotParam = __decorate([
|
|
343
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
344
|
+
], ChargingStationSlotParam);
|
|
345
|
+
exports.ChargingStationSlotParamSchema = mongoose_1.SchemaFactory.createForClass(ChargingStationSlotParam);
|
|
346
|
+
let ChargingStationParam = class ChargingStationParam {
|
|
347
|
+
};
|
|
348
|
+
exports.ChargingStationParam = ChargingStationParam;
|
|
349
|
+
__decorate([
|
|
350
|
+
(0, swagger_1.ApiProperty)({ example: 1 }),
|
|
351
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
352
|
+
(0, class_validator_1.IsNumber)(),
|
|
353
|
+
__metadata("design:type", Number)
|
|
354
|
+
], ChargingStationParam.prototype, "numberOfUnits", void 0);
|
|
355
|
+
__decorate([
|
|
356
|
+
(0, swagger_1.ApiProperty)({ example: 11 }),
|
|
357
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
358
|
+
(0, class_validator_1.IsNumber)(),
|
|
359
|
+
__metadata("design:type", Number)
|
|
360
|
+
], ChargingStationParam.prototype, "power", void 0);
|
|
361
|
+
__decorate([
|
|
362
|
+
(0, swagger_1.ApiProperty)({ example: 0 }),
|
|
363
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
364
|
+
(0, class_validator_1.IsNumber)(),
|
|
365
|
+
__metadata("design:type", Number)
|
|
366
|
+
], ChargingStationParam.prototype, "capex", void 0);
|
|
367
|
+
__decorate([
|
|
368
|
+
(0, swagger_1.ApiProperty)({ type: [ChargingStationSlotParam] }),
|
|
369
|
+
(0, mongoose_1.Prop)({
|
|
370
|
+
type: [exports.ChargingStationSlotParamSchema],
|
|
371
|
+
required: false,
|
|
372
|
+
default: undefined,
|
|
373
|
+
}),
|
|
374
|
+
(0, class_validator_1.IsOptional)(),
|
|
375
|
+
(0, class_validator_1.IsArray)(),
|
|
376
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
377
|
+
(0, class_transformer_1.Type)(() => ChargingStationSlotParam),
|
|
378
|
+
__metadata("design:type", Array)
|
|
379
|
+
], ChargingStationParam.prototype, "settings", void 0);
|
|
380
|
+
exports.ChargingStationParam = ChargingStationParam = __decorate([
|
|
381
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
382
|
+
], ChargingStationParam);
|
|
383
|
+
exports.ChargingStationParamSchema = mongoose_1.SchemaFactory.createForClass(ChargingStationParam);
|
|
294
384
|
let ConfigScenario = class ConfigScenario {
|
|
295
385
|
};
|
|
296
386
|
exports.ConfigScenario = ConfigScenario;
|
|
@@ -627,6 +717,37 @@ __decorate([
|
|
|
627
717
|
(0, class_validator_1.IsArray)(),
|
|
628
718
|
__metadata("design:type", Array)
|
|
629
719
|
], Scenario.prototype, "pvs", void 0);
|
|
720
|
+
__decorate([
|
|
721
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
722
|
+
description: 'Bornes de recharge (IRVE) par compteur, keyed par counterId — site ACC uniquement',
|
|
723
|
+
example: {
|
|
724
|
+
'4a5de046-4e95-4456-9c9d-b03772f736d7': {
|
|
725
|
+
stations: [
|
|
726
|
+
{
|
|
727
|
+
numberOfUnits: 1,
|
|
728
|
+
power: 11,
|
|
729
|
+
capex: 0,
|
|
730
|
+
settings: [
|
|
731
|
+
{
|
|
732
|
+
months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
733
|
+
days: [1, 2, 3, 4, 5, 6, 7],
|
|
734
|
+
startHour: '08:00',
|
|
735
|
+
endHour: '20:00',
|
|
736
|
+
drivable: true,
|
|
737
|
+
usageRate: 0.8,
|
|
738
|
+
sellingPrice: 0.35,
|
|
739
|
+
},
|
|
740
|
+
],
|
|
741
|
+
},
|
|
742
|
+
],
|
|
743
|
+
},
|
|
744
|
+
},
|
|
745
|
+
}),
|
|
746
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed, required: false, default: {} }),
|
|
747
|
+
(0, class_validator_1.IsOptional)(),
|
|
748
|
+
(0, class_validator_1.IsObject)(),
|
|
749
|
+
__metadata("design:type", Object)
|
|
750
|
+
], Scenario.prototype, "paramsChargingStations", void 0);
|
|
630
751
|
__decorate([
|
|
631
752
|
(0, swagger_1.ApiPropertyOptional)({ example: 1 }),
|
|
632
753
|
(0, mongoose_1.Prop)(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likewatt/models",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.111.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"mongoose": "^8.14.2",
|
|
41
41
|
"prettier": "^3.5.3",
|
|
42
42
|
"typeorm": "^0.3.23",
|
|
43
|
-
"typescript-eslint": "^8.32.0"
|
|
43
|
+
"typescript-eslint": "^8.32.0",
|
|
44
|
+
"uuid": "^11.1.0"
|
|
44
45
|
}
|
|
45
46
|
}
|