17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-01 05:42:44 +01:00
Files
maszyna/tools/vehicle_graph/examples/303e.vhg

246 lines
19 KiB
Plaintext

// electric locomotive ET22 with resistor starting, built from the 303E .fiz: the whole vehicle defined by the graph.
// series DC motors (drive.dc_series with the RList and MotorParamTable0 of the .fiz), LSt distributor, FV4a driver's
// brake valve, FD1 independent brake valve, vigilance device with cab signalling.
// the submodel names of the cab and the sound files are placeholders, to be replaced with the ones of the cab model
{
"format": "maszyna-vehicle-graph",
"version": 2,
"vehicle": { "name": "303E" },
"settings": { "low_voltage_simulation": false },
"body": {
"category": "train", "mass": 83500, "mass_rotating": 16000, "vmax": 125, "power": 2000, "sand_capacity": 500,
"length": 16.315, "height": 4.343, "width": 2.903, "cx": 0.38,
"wheel_diameter": 1.25, "wheel_inertia": 2000, "track_gauge": 1.435, "axle_arrangement": "Bo'Bo'", "axle_distance": 3.05, "bogie_distance": 8.55,
"min_radius": 80, "bearing": "roll",
"coupler_type": "Screw", "coupler_kb": 9200, "coupler_dmax_b": 0.15, "coupler_fmax_b": 740, "coupler_kc": 4800, "coupler_dmax_c": 0.15, "coupler_fmax_c": 780,
"coupler_beta": 0.58, "coupler_allowed_flag": 103, "control_type": "303E",
"max_load": 52, "load_unit": "pieces", "load_accepted": "pantstate", "load_speed": 1, "unload_speed": 0.1,
"collector_max_voltage": 3600, "collector_max_current": 1250, "collector_min_h": 0.48, "collector_max_h": 2.5, "collector_csw": 1.4,
"collector_min_voltage": 1900, "collector_layout": 3
},
"profiles": { "brake_pipe": 1, "heating": 1 },
"nodes": [
// cab controls
{ "id": "bat", "type": "cab.switch", "title": "Battery", "params": { "behaviour": "bistable", "submodel": "battery_sw", "command": "batterytoggle" } },
{ "id": "pant_f", "type": "cab.switch", "title": "Front pantograph", "params": { "behaviour": "bistable", "submodel": "pantfront_sw", "command": "pantographtogglefront" } },
{ "id": "pant_r", "type": "cab.switch", "title": "Rear pantograph", "params": { "behaviour": "bistable", "submodel": "pantrear_sw", "command": "pantographtogglerear" } },
{ "id": "ws_on", "type": "cab.switch", "title": "Line breaker on", "params": { "behaviour": "monostable", "animation": "move", "step": 4, "submodel": "main_on_bt", "command": "linebreakerclose" } },
{ "id": "ws_off", "type": "cab.switch", "title": "Line breaker off", "params": { "behaviour": "monostable", "animation": "move", "step": 4, "submodel": "main_off_bt", "command": "linebreakeropen" } },
{ "id": "conv_sw", "type": "cab.switch", "title": "Converter", "params": { "behaviour": "bistable", "submodel": "converter_sw", "command": "convertertoggle" } },
{ "id": "comp_sw", "type": "cab.switch", "title": "Compressor", "params": { "behaviour": "bistable", "submodel": "compressor_sw", "command": "compressortoggle" } },
{ "id": "heat_sw", "type": "cab.switch", "title": "Train heating", "params": { "behaviour": "bistable", "submodel": "trainheating_sw", "command": "heatingtoggle" } },
{ "id": "high_current", "type": "cab.switch", "title": "High starting current", "params": { "behaviour": "bistable", "submodel": "maxcurrent_sw", "command": "motoroverloadrelaythresholdtoggle" } },
{ "id": "relay_reset", "type": "cab.switch", "title": "Overload relay reset", "params": { "behaviour": "monostable", "animation": "move", "step": 4, "submodel": "fuse_bt", "command": "motoroverloadrelayreset" } },
{ "id": "reverser", "type": "cab.switch", "title": "Reverser", "params": { "behaviour": "multi", "positions": 3, "min": -1, "max": 1, "default": 0, "labels": "back;0;forward", "step": 45, "offset": -45, "submodel": "dirkey", "key_inc": "reverserincrease", "key_dec": "reverserdecrease" } },
{ "id": "mainctrl", "type": "cab.switch", "title": "Master controller", "params": { "behaviour": "multi", "positions": 44, "min": 0, "max": 43, "default": 0, "step": 6, "submodel": "mainctrl", "key_inc": "mastercontrollerincrease", "key_dec": "mastercontrollerdecrease" } },
{ "id": "shunt", "type": "cab.switch", "title": "Field shunting", "params": { "behaviour": "multi", "positions": 7, "min": 0, "max": 6, "default": 0, "step": 15, "submodel": "scndctrl", "key_inc": "secondcontrollerincrease", "key_dec": "secondcontrollerdecrease" } },
{ "id": "brake", "type": "cab.switch", "title": "Driver's brake valve (FV4a)", "params": { "behaviour": "multi", "positions": 9, "min": -2, "max": 6, "default": 0, "labels": "cut-off;filling;running;1;2;3;4;full;emergency", "step": 12, "offset": -24, "submodel": "brakectrl", "key_inc": "trainbrakeincrease", "key_dec": "trainbrakedecrease" } },
{ "id": "local", "type": "cab.switch", "title": "Independent brake (FD1)", "params": { "behaviour": "multi", "positions": 11, "min": 0, "max": 1, "default": 0, "step": 9, "submodel": "localbrake", "key_inc": "independentbrakeincrease", "key_dec": "independentbrakedecrease" } },
{ "id": "ca_reset", "type": "cab.switch", "title": "Vigilance reset", "params": { "behaviour": "monostable", "animation": "move", "step": 4, "submodel": "security_reset_bt", "command": "alerteracknowledge" } },
{ "id": "sand_bt", "type": "cab.switch", "title": "Sander", "params": { "behaviour": "monostable", "animation": "move", "step": 4, "submodel": "sand_bt", "command": "sandboxactivate" } },
{ "id": "horn_lo", "type": "cab.switch", "title": "Horn low", "params": { "behaviour": "monostable", "animation": "move", "step": 4, "submodel": "hornlow_bt", "command": "hornlowactivate" } },
{ "id": "horn_hi", "type": "cab.switch", "title": "Horn high", "params": { "behaviour": "monostable", "animation": "move", "step": 4, "submodel": "hornhigh_bt", "command": "hornhighactivate" } },
{ "id": "lights_sw", "type": "cab.switch", "title": "Head lights", "params": { "behaviour": "bistable", "submodel": "upperlight_sw", "command": "headlighttoggleupper" } },
// power circuit
{ "id": "pant_f_up", "type": "logic.and", "title": "Front pantograph valve" },
{ "id": "pant_r_up", "type": "logic.and", "title": "Rear pantograph valve" },
{ "id": "pf", "type": "el.pantograph", "title": "Front pantograph", "params": { "index": 0, "raise_time": 4, "lower_time": 1, "min_pressure": 3.5 } },
{ "id": "pr", "type": "el.pantograph", "title": "Rear pantograph", "params": { "index": 1, "raise_time": 4, "lower_time": 1, "min_pressure": 3.5 } },
{ "id": "hv", "type": "el.junction", "title": "Roof line" },
{ "id": "ws_close", "type": "logic.and", "title": "Closing the line breaker" },
{ "id": "ws", "type": "el.hsb", "title": "Line breaker", "params": { "trip_current": 2500, "close_time": 0.2, "min_voltage": 1900 } },
{ "id": "dir_set", "type": "logic.compare", "title": "Direction selected", "params": { "op": "ne", "value": 0 } },
{ "id": "power_req", "type": "logic.compare", "title": "Controller above zero", "params": { "op": "gt", "value": 0 } },
{ "id": "no_overload", "type": "logic.not", "title": "Overload relay not tripped" },
{ "id": "line_req", "type": "logic.and", "title": "Line contactors requested" },
{ "id": "line_req2", "type": "logic.and", "title": "Line contactors allowed" },
{ "id": "line", "type": "el.contactor", "title": "Line contactors", "params": { "delay": 0.1 } },
{ "id": "motors", "type": "drive.dc_series", "title": "Traction motors (4 in series)", "params": {
"winding_res": 0.14, "circuit_res": 0.5, "imax_lo": 600, "imax_hi": 750, "imin_lo": 350, "imin_hi": 470, "volt": 1500, "trip_delay": 0.05,
"mpt": [
[0, 21.8, 105, 0.11, 140.9, 105, 0.11],
[1, 20.22, 140, 0.07, 130.7, 140, 0.07],
[2, 21.06, 190, 0.09, 136.2, 190, 0.09],
[3, 23.95, 160, 0.25, 154.8, 160, 0.25],
[4, 21.73, 255, 0.16, 140.5, 255, 0.16],
[5, 24.66, 170, 0.35, 159.4, 170, 0.35],
[6, 23, 800, 0.02, 148.7, 800, 0.02]
],
"rlist": [
[0, 0, 0, 0, 0], [1, 24.891, 1, 4, 0], [2, 16.821, 1, 4, 0], [3, 12.301, 1, 4, 0], [4, 9.771, 1, 4, 0], [5, 8.111, 1, 4, 0],
[6, 6.915, 1, 4, 0], [7, 6.481, 1, 4, 0], [8, 6.047, 1, 4, 0], [9, 5.629, 1, 4, 0], [10, 5.211, 1, 4, 0], [11, 4.827, 1, 4, 0],
[12, 4.443, 1, 4, 0], [13, 4.099, 1, 4, 0], [14, 3.755, 1, 4, 0], [15, 3.442, 1, 4, 0], [16, 3.129, 1, 4, 0], [17, 2.838, 1, 4, 0],
[18, 2.547, 1, 4, 0], [19, 2.286, 1, 4, 0], [20, 2.025, 1, 4, 0], [21, 1.78, 1, 4, 0], [22, 1.535, 1, 4, 0], [23, 1.275, 1, 4, 0],
[24, 1.095, 1, 4, 0], [25, 0.775, 1, 4, 0], [26, 0.525, 1, 4, 0], [27, 0.275, 1, 4, 0], [28, 0, 1, 4, 0],
[29, 5.44, 2, 2, 0], [30, 4.41, 2, 2, 0], [31, 3.85, 2, 2, 0], [32, 3.29, 2, 2, 0], [33, 2.82, 2, 2, 0], [34, 2.36, 2, 2, 0],
[35, 1.93, 2, 2, 0], [36, 1.56, 2, 2, 0], [37, 1.21, 2, 2, 0], [38, 0.89, 2, 2, 0], [39, 0.61, 2, 2, 0], [40, 0.34, 2, 2, 0],
[41, 0.21, 2, 2, 0], [42, 0.1, 2, 2, 0], [43, 0, 2, 2, 0]
] } },
{ "id": "gear", "type": "drive.gear", "title": "Gear 18:79", "params": { "ratio": 4.388888889, "eff": 1.0 } },
{ "id": "axles", "type": "drive.axle", "title": "Driven axles", "params": { "powered_axles": 4 } },
{ "id": "conv", "type": "el.converter", "title": "Motor generator", "params": { "power": 40000, "start_time": 3, "min_voltage": 1900, "out_voltage": 400 } },
{ "id": "batt", "type": "el.battery", "title": "Battery", "params": { "voltage": 110, "capacity": 100, "min_voltage": 80 } },
{ "id": "heat", "type": "if.heat", "title": "Train heating", "params": { "side": "rear" } },
// air
{ "id": "comp_on", "type": "logic.and", "title": "Compressor running" },
{ "id": "comp", "type": "pn.compressor", "title": "Compressor", "params": { "flow": 0.0566, "max_pressure": 8.5, "min_voltage": 300, "power": 15000 } },
{ "id": "gov", "type": "pn.governor", "title": "Pressure governor", "params": { "min": 7.5, "max": 8.5 } },
{ "id": "res", "type": "pn.reservoir", "title": "Main reservoir", "params": { "volume": 0.828 } },
{ "id": "fv4a", "type": "br.handle", "title": "FV4a", "params": { "type": "FV4a" } },
{ "id": "pipe", "type": "br.pipe", "title": "Brake pipe" },
{ "id": "fd1", "type": "br.local_handle", "title": "FD1", "params": { "type": "FD1" } },
{ "id": "dist", "type": "br.distributor", "title": "LSt distributor", "params": {
"type": "LSt", "mode": "GPR", "max_bp": 4.4, "max_asbp": 1.1, "cyl_count": 8, "cyl_radius": 0.1143, "cyl_dist": 0.05, "volume": 278, "rm": 0.71,
"delay1": 15, "delay2": 7, "delay3": 39, "delay4": 17, "asb": "manual" } },
{ "id": "rig", "type": "br.rigging", "title": "Brake rigging", "params": { "bcm": 5.18, "bcs": 1, "bsa": 0.5, "bre": 0.85, "nbpa": 4, "material": "P10-Bgu" } },
{ "id": "pg_front", "type": "if.pg", "title": "Brake pipe, front", "params": { "side": "front" } },
{ "id": "pg_rear", "type": "if.pg", "title": "Brake pipe, rear", "params": { "side": "rear" } },
// vehicle
{ "id": "vs", "type": "veh.state", "title": "Motion" },
{ "id": "ca", "type": "sec.ca", "title": "Vigilance device (CA/SHP)", "params": {
"aware": true, "cab_signal": true, "aware_delay": 60, "sound_delay": 3, "emergency_delay": 4, "min_speed": 10, "max_hold_time": 1.0, "radio_stop": true } },
{ "id": "sand", "type": "veh.sander", "title": "Sander" },
{ "id": "pc1", "type": "logic.const", "title": "Pc1: three white lights", "params": { "value": 21 } },
{ "id": "pc_front", "type": "logic.math", "title": "Front lights when switched on", "params": { "op": "mul" } },
{ "id": "lights", "type": "veh.lights", "title": "Lights" },
// indicators
{ "id": "ws_open", "type": "logic.not", "title": "Line breaker open" },
{ "id": "ws_lamp", "type": "logic.and", "title": "Line breaker lamp powered" },
{ "id": "line_open", "type": "logic.not", "title": "Line contactors open" },
{ "id": "line_lamp", "type": "logic.and", "title": "Line contactors lamp powered" },
{ "id": "ovl_lamp", "type": "logic.and", "title": "Overload lamp powered" },
{ "id": "conv_off", "type": "logic.not", "title": "Converter stopped" },
{ "id": "conv_lamp", "type": "logic.and", "title": "Converter lamp powered" },
{ "id": "slip_lamp", "type": "logic.and", "title": "Wheel slip lamp powered" },
{ "id": "lamp_ws", "type": "fb.lamp", "title": "Line breaker", "params": { "color": "red", "submodel": "i-mainbreaker" } },
{ "id": "lamp_line", "type": "fb.lamp", "title": "Line contactors", "params": { "color": "green", "submodel": "i-contactors" } },
{ "id": "lamp_ovl", "type": "fb.lamp", "title": "Motor overload", "params": { "color": "red", "submodel": "i-motor_ovld" } },
{ "id": "lamp_conv", "type": "fb.lamp", "title": "Converter", "params": { "color": "yellow", "submodel": "i-converter" } },
{ "id": "lamp_slip", "type": "fb.lamp", "title": "Wheel slip", "params": { "color": "yellow", "submodel": "i-slippery" } },
{ "id": "lamp_ca", "type": "fb.lamp", "title": "Vigilance", "params": { "color": "white", "submodel": "i-security_aware" } },
{ "id": "lamp_shp", "type": "fb.lamp", "title": "Cab signal", "params": { "color": "white", "submodel": "i-security_cabsignal" } },
{ "id": "hv_volts", "type": "logic.math", "title": "Voltage of the roof line", "params": { "op": "max" } },
{ "id": "g_hv", "type": "fb.gauge", "title": "High voltage", "params": { "min": 0, "max": 4000, "unit": "V", "angle_min": 0, "angle_max": 270, "submodel": "hvoltage" } },
{ "id": "g_i", "type": "fb.gauge", "title": "Motor current", "params": { "min": 0, "max": 1000, "unit": "A", "angle_min": 0, "angle_max": 270, "submodel": "hvcurrent1" } },
{ "id": "g_v", "type": "fb.gauge", "title": "Speedometer", "params": { "min": 0, "max": 150, "unit": "km/h", "angle_min": 0, "angle_max": 300, "submodel": "tachometer" } },
{ "id": "g_pipes", "type": "fb.manometer", "title": "Brake pipe and main reservoir", "params": { "min": 0, "max": 10, "submodel": "pipepress", "submodel2": "compressor" } },
{ "id": "g_bc", "type": "fb.gauge", "title": "Brake cylinders", "params": { "min": 0, "max": 10, "unit": "bar", "angle_min": 0, "angle_max": 270, "submodel": "cylinder" } },
{ "id": "snd_conv", "type": "fb.sound", "title": "Motor generator", "params": { "file": "et22-przetwornica.wav", "placement": "engine", "loop": true } },
{ "id": "snd_comp", "type": "fb.sound", "title": "Compressor", "params": { "file": "et22-sprezarka.wav", "placement": "engine", "loop": true } },
{ "id": "snd_buzzer", "type": "fb.sound", "title": "Vigilance buzzer", "params": { "file": "buzzer.wav", "placement": "internal", "loop": true } },
{ "id": "snd_horn_lo", "type": "fb.sound", "title": "Horn low", "params": { "file": "horn1.wav", "placement": "external", "range": 1000, "loop": true } },
{ "id": "snd_horn_hi", "type": "fb.sound", "title": "Horn high", "params": { "file": "horn2.wav", "placement": "external", "range": 1000, "loop": true } },
{ "id": "snd_ws", "type": "fb.sound", "title": "Line breaker", "params": { "file": "wylacznik.wav", "placement": "engine", "loop": false } }
],
"connections": [
{ "from": "bat.pos", "to": "batt.on" },
{ "from": "conv.aux", "to": "batt.charge" },
{ "from": "bat.pos", "to": "pant_f_up.a" },
{ "from": "pant_f.pos", "to": "pant_f_up.b" },
{ "from": "bat.pos", "to": "pant_r_up.a" },
{ "from": "pant_r.pos", "to": "pant_r_up.b" },
{ "from": "pant_f_up.q", "to": "pf.raise" },
{ "from": "pant_r_up.q", "to": "pr.raise" },
{ "from": "res.out", "to": "pf.air" },
{ "from": "res.out", "to": "pr.air" },
{ "from": "pf.wn", "to": "hv.a" },
{ "from": "pr.wn", "to": "hv.b" },
{ "from": "hv.out", "to": "ws.in" },
{ "from": "ws_on.pos", "to": "ws_close.a" },
{ "from": "bat.pos", "to": "ws_close.b" },
{ "from": "ws_close.q", "to": "ws.close" },
{ "from": "ws_off.pos", "to": "ws.open" },
{ "from": "bat.pos", "to": "ws.hold" },
{ "from": "reverser.pos", "to": "dir_set.a" },
{ "from": "mainctrl.pos", "to": "power_req.a" },
{ "from": "motors.overload", "to": "no_overload.a" },
{ "from": "dir_set.q", "to": "line_req.a" },
{ "from": "power_req.q", "to": "line_req.b" },
{ "from": "line_req.q", "to": "line_req2.a" },
{ "from": "no_overload.q", "to": "line_req2.b" },
{ "from": "line_req2.q", "to": "line.on" },
{ "from": "ws.out", "to": "line.in" },
{ "from": "line.out", "to": "motors.wn" },
{ "from": "mainctrl.index", "to": "motors.position" },
{ "from": "shunt.index", "to": "motors.shunt" },
{ "from": "reverser.pos", "to": "motors.dir" },
{ "from": "high_current.pos", "to": "motors.high" },
{ "from": "relay_reset.pos", "to": "motors.reset" },
{ "from": "motors.shaft", "to": "gear.in" },
{ "from": "gear.out", "to": "axles.shaft" },
{ "from": "ws.out", "to": "conv.wn" },
{ "from": "conv_sw.pos", "to": "conv.on" },
{ "from": "ws.out", "to": "heat.wn" },
{ "from": "heat_sw.pos", "to": "heat.on" },
{ "from": "conv.aux", "to": "comp.power" },
{ "from": "comp_sw.pos", "to": "comp_on.a" },
{ "from": "gov.need", "to": "comp_on.b" },
{ "from": "comp_on.q", "to": "comp.on" },
{ "from": "comp.air", "to": "res.in" },
{ "from": "res.p", "to": "gov.p" },
{ "from": "res.out", "to": "fv4a.zg" },
{ "from": "brake.pos", "to": "fv4a.pos" },
{ "from": "fv4a.pg", "to": "pipe.in" },
{ "from": "ca.brake", "to": "pipe.vent" },
{ "from": "res.out", "to": "fd1.zg" },
{ "from": "local.pos", "to": "fd1.pos" },
{ "from": "pipe.dist", "to": "dist.pg" },
{ "from": "res.pz", "to": "dist.feed" },
{ "from": "fd1.bc", "to": "dist.local" },
{ "from": "dist.bc", "to": "rig.bc" },
{ "from": "pipe.couplers", "to": "pg_front.pg" },
{ "from": "pipe.couplers", "to": "pg_rear.pg" },
{ "from": "vs.v", "to": "ca.v" },
{ "from": "batt.ok", "to": "ca.power" },
{ "from": "ca_reset.pos", "to": "ca.reset" },
{ "from": "sand_bt.pos", "to": "sand.on" },
{ "from": "pc1.q", "to": "pc_front.a" },
{ "from": "lights_sw.pos", "to": "pc_front.b" },
{ "from": "pc_front.q", "to": "lights.front" },
{ "from": "ws.closed", "to": "ws_open.a" },
{ "from": "ws_open.q", "to": "ws_lamp.a" },
{ "from": "batt.ok", "to": "ws_lamp.b" },
{ "from": "ws_lamp.q", "to": "lamp_ws.on" },
{ "from": "line.closed", "to": "line_open.a" },
{ "from": "line_open.q", "to": "line_lamp.a" },
{ "from": "batt.ok", "to": "line_lamp.b" },
{ "from": "line_lamp.q", "to": "lamp_line.on" },
{ "from": "motors.overload", "to": "ovl_lamp.a" },
{ "from": "batt.ok", "to": "ovl_lamp.b" },
{ "from": "ovl_lamp.q", "to": "lamp_ovl.on" },
{ "from": "conv.run", "to": "conv_off.a" },
{ "from": "conv_off.q", "to": "conv_lamp.a" },
{ "from": "batt.ok", "to": "conv_lamp.b" },
{ "from": "conv_lamp.q", "to": "lamp_conv.on" },
{ "from": "axles.slip", "to": "slip_lamp.a" },
{ "from": "batt.ok", "to": "slip_lamp.b" },
{ "from": "slip_lamp.q", "to": "lamp_slip.on" },
{ "from": "ca.lamp", "to": "lamp_ca.on" },
{ "from": "ca.shp_lamp", "to": "lamp_shp.on" },
{ "from": "pf.u", "to": "hv_volts.a" },
{ "from": "pr.u", "to": "hv_volts.b" },
{ "from": "hv_volts.q", "to": "g_hv.value" },
{ "from": "motors.i", "to": "g_i.value" },
{ "from": "vs.v", "to": "g_v.value" },
{ "from": "pipe.p", "to": "g_pipes.black" },
{ "from": "res.p", "to": "g_pipes.red" },
{ "from": "dist.bc", "to": "g_bc.value" },
{ "from": "conv.run", "to": "snd_conv.play" },
{ "from": "comp.run", "to": "snd_comp.play" },
{ "from": "ca.buzzer", "to": "snd_buzzer.play" },
{ "from": "horn_lo.pos", "to": "snd_horn_lo.play" },
{ "from": "horn_hi.pos", "to": "snd_horn_hi.play" },
{ "from": "ws.closed", "to": "snd_ws.play" }
]
}