Index: DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/_downloads/3d69bc6df7967e9ed2df1ce3626dd073/surfacelines.csv
===================================================================
diff -u
--- DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/_downloads/3d69bc6df7967e9ed2df1ce3626dd073/surfacelines.csv (revision 0)
+++ DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/_downloads/3d69bc6df7967e9ed2df1ce3626dd073/surfacelines.csv (revision 3556)
@@ -0,0 +1,2 @@
+LOCATIONID;X1;Y1;Z1;.....;Xn;Yn;Zn;(Profiel);
+Profiel 1;0.000;0.000;1.000;10.000;0.000;1.000;19.000;0.000;4.000;20.500;0.000;4.000;23.000;0.000;4.000;35.000;0.000;0.000;100.000;0.000;0.000;
Index: DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/_static/underscore-1.13.1.js
===================================================================
diff -u
--- DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/_static/underscore-1.13.1.js (revision 0)
+++ DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/_static/underscore-1.13.1.js (revision 3556)
@@ -0,0 +1,2042 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define('underscore', factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {
+ var current = global._;
+ var exports = global._ = factory();
+ exports.noConflict = function () { global._ = current; return exports; };
+ }()));
+}(this, (function () {
+ // Underscore.js 1.13.1
+ // https://underscorejs.org
+ // (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
+ // Underscore may be freely distributed under the MIT license.
+
+ // Current version.
+ var VERSION = '1.13.1';
+
+ // Establish the root object, `window` (`self`) in the browser, `global`
+ // on the server, or `this` in some virtual machines. We use `self`
+ // instead of `window` for `WebWorker` support.
+ var root = typeof self == 'object' && self.self === self && self ||
+ typeof global == 'object' && global.global === global && global ||
+ Function('return this')() ||
+ {};
+
+ // Save bytes in the minified (but not gzipped) version:
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype;
+ var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
+
+ // Create quick reference variables for speed access to core prototypes.
+ var push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+
+ // Modern feature detection.
+ var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
+ supportsDataView = typeof DataView !== 'undefined';
+
+ // All **ECMAScript 5+** native function implementations that we hope to use
+ // are declared here.
+ var nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeCreate = Object.create,
+ nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
+
+ // Create references to these builtin functions because we override them.
+ var _isNaN = isNaN,
+ _isFinite = isFinite;
+
+ // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
+ var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
+ var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
+ 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
+
+ // The largest integer that can be represented exactly.
+ var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
+
+ // Some functions take a variable number of arguments, or a few expected
+ // arguments at the beginning and then a variable number of values to operate
+ // on. This helper accumulates all remaining arguments past the function’s
+ // argument length (or an explicit `startIndex`), into an array that becomes
+ // the last argument. Similar to ES6’s "rest parameter".
+ function restArguments(func, startIndex) {
+ startIndex = startIndex == null ? func.length - 1 : +startIndex;
+ return function() {
+ var length = Math.max(arguments.length - startIndex, 0),
+ rest = Array(length),
+ index = 0;
+ for (; index < length; index++) {
+ rest[index] = arguments[index + startIndex];
+ }
+ switch (startIndex) {
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, arguments[0], rest);
+ case 2: return func.call(this, arguments[0], arguments[1], rest);
+ }
+ var args = Array(startIndex + 1);
+ for (index = 0; index < startIndex; index++) {
+ args[index] = arguments[index];
+ }
+ args[startIndex] = rest;
+ return func.apply(this, args);
+ };
+ }
+
+ // Is a given variable an object?
+ function isObject(obj) {
+ var type = typeof obj;
+ return type === 'function' || type === 'object' && !!obj;
+ }
+
+ // Is a given value equal to null?
+ function isNull(obj) {
+ return obj === null;
+ }
+
+ // Is a given variable undefined?
+ function isUndefined(obj) {
+ return obj === void 0;
+ }
+
+ // Is a given value a boolean?
+ function isBoolean(obj) {
+ return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
+ }
+
+ // Is a given value a DOM element?
+ function isElement(obj) {
+ return !!(obj && obj.nodeType === 1);
+ }
+
+ // Internal function for creating a `toString`-based type tester.
+ function tagTester(name) {
+ var tag = '[object ' + name + ']';
+ return function(obj) {
+ return toString.call(obj) === tag;
+ };
+ }
+
+ var isString = tagTester('String');
+
+ var isNumber = tagTester('Number');
+
+ var isDate = tagTester('Date');
+
+ var isRegExp = tagTester('RegExp');
+
+ var isError = tagTester('Error');
+
+ var isSymbol = tagTester('Symbol');
+
+ var isArrayBuffer = tagTester('ArrayBuffer');
+
+ var isFunction = tagTester('Function');
+
+ // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
+ // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
+ var nodelist = root.document && root.document.childNodes;
+ if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+ isFunction = function(obj) {
+ return typeof obj == 'function' || false;
+ };
+ }
+
+ var isFunction$1 = isFunction;
+
+ var hasObjectTag = tagTester('Object');
+
+ // In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.
+ // In IE 11, the most common among them, this problem also applies to
+ // `Map`, `WeakMap` and `Set`.
+ var hasStringTagBug = (
+ supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))
+ ),
+ isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));
+
+ var isDataView = tagTester('DataView');
+
+ // In IE 10 - Edge 13, we need a different heuristic
+ // to determine whether an object is a `DataView`.
+ function ie10IsDataView(obj) {
+ return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer);
+ }
+
+ var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView);
+
+ // Is a given value an array?
+ // Delegates to ECMA5's native `Array.isArray`.
+ var isArray = nativeIsArray || tagTester('Array');
+
+ // Internal function to check whether `key` is an own property name of `obj`.
+ function has$1(obj, key) {
+ return obj != null && hasOwnProperty.call(obj, key);
+ }
+
+ var isArguments = tagTester('Arguments');
+
+ // Define a fallback version of the method in browsers (ahem, IE < 9), where
+ // there isn't any inspectable "Arguments" type.
+ (function() {
+ if (!isArguments(arguments)) {
+ isArguments = function(obj) {
+ return has$1(obj, 'callee');
+ };
+ }
+ }());
+
+ var isArguments$1 = isArguments;
+
+ // Is a given object a finite number?
+ function isFinite$1(obj) {
+ return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
+ }
+
+ // Is the given value `NaN`?
+ function isNaN$1(obj) {
+ return isNumber(obj) && _isNaN(obj);
+ }
+
+ // Predicate-generating function. Often useful outside of Underscore.
+ function constant(value) {
+ return function() {
+ return value;
+ };
+ }
+
+ // Common internal logic for `isArrayLike` and `isBufferLike`.
+ function createSizePropertyCheck(getSizeProperty) {
+ return function(collection) {
+ var sizeProperty = getSizeProperty(collection);
+ return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
+ }
+ }
+
+ // Internal helper to generate a function to obtain property `key` from `obj`.
+ function shallowProperty(key) {
+ return function(obj) {
+ return obj == null ? void 0 : obj[key];
+ };
+ }
+
+ // Internal helper to obtain the `byteLength` property of an object.
+ var getByteLength = shallowProperty('byteLength');
+
+ // Internal helper to determine whether we should spend extensive checks against
+ // `ArrayBuffer` et al.
+ var isBufferLike = createSizePropertyCheck(getByteLength);
+
+ // Is a given value a typed array?
+ var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
+ function isTypedArray(obj) {
+ // `ArrayBuffer.isView` is the most future-proof, so use it when available.
+ // Otherwise, fall back on the above regular expression.
+ return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) :
+ isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
+ }
+
+ var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);
+
+ // Internal helper to obtain the `length` property of an object.
+ var getLength = shallowProperty('length');
+
+ // Internal helper to create a simple lookup structure.
+ // `collectNonEnumProps` used to depend on `_.contains`, but this led to
+ // circular imports. `emulatedSet` is a one-off solution that only works for
+ // arrays of strings.
+ function emulatedSet(keys) {
+ var hash = {};
+ for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
+ return {
+ contains: function(key) { return hash[key]; },
+ push: function(key) {
+ hash[key] = true;
+ return keys.push(key);
+ }
+ };
+ }
+
+ // Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't
+ // be iterated by `for key in ...` and thus missed. Extends `keys` in place if
+ // needed.
+ function collectNonEnumProps(obj, keys) {
+ keys = emulatedSet(keys);
+ var nonEnumIdx = nonEnumerableProps.length;
+ var constructor = obj.constructor;
+ var proto = isFunction$1(constructor) && constructor.prototype || ObjProto;
+
+ // Constructor is a special case.
+ var prop = 'constructor';
+ if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop);
+
+ while (nonEnumIdx--) {
+ prop = nonEnumerableProps[nonEnumIdx];
+ if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
+ keys.push(prop);
+ }
+ }
+ }
+
+ // Retrieve the names of an object's own properties.
+ // Delegates to **ECMAScript 5**'s native `Object.keys`.
+ function keys(obj) {
+ if (!isObject(obj)) return [];
+ if (nativeKeys) return nativeKeys(obj);
+ var keys = [];
+ for (var key in obj) if (has$1(obj, key)) keys.push(key);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
+ return keys;
+ }
+
+ // Is a given array, string, or object empty?
+ // An "empty" object has no enumerable own-properties.
+ function isEmpty(obj) {
+ if (obj == null) return true;
+ // Skip the more expensive `toString`-based type checks if `obj` has no
+ // `.length`.
+ var length = getLength(obj);
+ if (typeof length == 'number' && (
+ isArray(obj) || isString(obj) || isArguments$1(obj)
+ )) return length === 0;
+ return getLength(keys(obj)) === 0;
+ }
+
+ // Returns whether an object has a given set of `key:value` pairs.
+ function isMatch(object, attrs) {
+ var _keys = keys(attrs), length = _keys.length;
+ if (object == null) return !length;
+ var obj = Object(object);
+ for (var i = 0; i < length; i++) {
+ var key = _keys[i];
+ if (attrs[key] !== obj[key] || !(key in obj)) return false;
+ }
+ return true;
+ }
+
+ // If Underscore is called as a function, it returns a wrapped object that can
+ // be used OO-style. This wrapper holds altered versions of all functions added
+ // through `_.mixin`. Wrapped objects may be chained.
+ function _$1(obj) {
+ if (obj instanceof _$1) return obj;
+ if (!(this instanceof _$1)) return new _$1(obj);
+ this._wrapped = obj;
+ }
+
+ _$1.VERSION = VERSION;
+
+ // Extracts the result from a wrapped and chained object.
+ _$1.prototype.value = function() {
+ return this._wrapped;
+ };
+
+ // Provide unwrapping proxies for some methods used in engine operations
+ // such as arithmetic and JSON stringification.
+ _$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value;
+
+ _$1.prototype.toString = function() {
+ return String(this._wrapped);
+ };
+
+ // Internal function to wrap or shallow-copy an ArrayBuffer,
+ // typed array or DataView to a new view, reusing the buffer.
+ function toBufferView(bufferSource) {
+ return new Uint8Array(
+ bufferSource.buffer || bufferSource,
+ bufferSource.byteOffset || 0,
+ getByteLength(bufferSource)
+ );
+ }
+
+ // We use this string twice, so give it a name for minification.
+ var tagDataView = '[object DataView]';
+
+ // Internal recursive comparison function for `_.isEqual`.
+ function eq(a, b, aStack, bStack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
+ if (a === b) return a !== 0 || 1 / a === 1 / b;
+ // `null` or `undefined` only equal to itself (strict comparison).
+ if (a == null || b == null) return false;
+ // `NaN`s are equivalent, but non-reflexive.
+ if (a !== a) return b !== b;
+ // Exhaust primitive checks
+ var type = typeof a;
+ if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ return deepEq(a, b, aStack, bStack);
+ }
+
+ // Internal recursive comparison function for `_.isEqual`.
+ function deepEq(a, b, aStack, bStack) {
+ // Unwrap any wrapped objects.
+ if (a instanceof _$1) a = a._wrapped;
+ if (b instanceof _$1) b = b._wrapped;
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className !== toString.call(b)) return false;
+ // Work around a bug in IE 10 - Edge 13.
+ if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {
+ if (!isDataView$1(b)) return false;
+ className = tagDataView;
+ }
+ switch (className) {
+ // These types are compared by value.
+ case '[object RegExp]':
+ // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
+ case '[object String]':
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+ // equivalent to `new String("5")`.
+ return '' + a === '' + b;
+ case '[object Number]':
+ // `NaN`s are equivalent, but non-reflexive.
+ // Object(NaN) is equivalent to NaN.
+ if (+a !== +a) return +b !== +b;
+ // An `egal` comparison is performed for other numeric values.
+ return +a === 0 ? 1 / +a === 1 / b : +a === +b;
+ case '[object Date]':
+ case '[object Boolean]':
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+ // millisecond representations. Note that invalid dates with millisecond representations
+ // of `NaN` are not equivalent.
+ return +a === +b;
+ case '[object Symbol]':
+ return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
+ case '[object ArrayBuffer]':
+ case tagDataView:
+ // Coerce to typed array so we can fall through.
+ return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
+ }
+
+ var areArrays = className === '[object Array]';
+ if (!areArrays && isTypedArray$1(a)) {
+ var byteLength = getByteLength(a);
+ if (byteLength !== getByteLength(b)) return false;
+ if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
+ areArrays = true;
+ }
+ if (!areArrays) {
+ if (typeof a != 'object' || typeof b != 'object') return false;
+
+ // Objects with different constructors are not equivalent, but `Object`s or `Array`s
+ // from different frames are.
+ var aCtor = a.constructor, bCtor = b.constructor;
+ if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&
+ isFunction$1(bCtor) && bCtor instanceof bCtor)
+ && ('constructor' in a && 'constructor' in b)) {
+ return false;
+ }
+ }
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+
+ // Initializing stack of traversed objects.
+ // It's done here since we only need them for objects and arrays comparison.
+ aStack = aStack || [];
+ bStack = bStack || [];
+ var length = aStack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (aStack[length] === a) return bStack[length] === b;
+ }
+
+ // Add the first object to the stack of traversed objects.
+ aStack.push(a);
+ bStack.push(b);
+
+ // Recursively compare objects and arrays.
+ if (areArrays) {
+ // Compare array lengths to determine if a deep comparison is necessary.
+ length = a.length;
+ if (length !== b.length) return false;
+ // Deep compare the contents, ignoring non-numeric properties.
+ while (length--) {
+ if (!eq(a[length], b[length], aStack, bStack)) return false;
+ }
+ } else {
+ // Deep compare objects.
+ var _keys = keys(a), key;
+ length = _keys.length;
+ // Ensure that both objects contain the same number of properties before comparing deep equality.
+ if (keys(b).length !== length) return false;
+ while (length--) {
+ // Deep compare each member
+ key = _keys[length];
+ if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
+ }
+ }
+ // Remove the first object from the stack of traversed objects.
+ aStack.pop();
+ bStack.pop();
+ return true;
+ }
+
+ // Perform a deep comparison to check if two objects are equal.
+ function isEqual(a, b) {
+ return eq(a, b);
+ }
+
+ // Retrieve all the enumerable property names of an object.
+ function allKeys(obj) {
+ if (!isObject(obj)) return [];
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
+ return keys;
+ }
+
+ // Since the regular `Object.prototype.toString` type tests don't work for
+ // some types in IE 11, we use a fingerprinting heuristic instead, based
+ // on the methods. It's not great, but it's the best we got.
+ // The fingerprint method lists are defined below.
+ function ie11fingerprint(methods) {
+ var length = getLength(methods);
+ return function(obj) {
+ if (obj == null) return false;
+ // `Map`, `WeakMap` and `Set` have no enumerable keys.
+ var keys = allKeys(obj);
+ if (getLength(keys)) return false;
+ for (var i = 0; i < length; i++) {
+ if (!isFunction$1(obj[methods[i]])) return false;
+ }
+ // If we are testing against `WeakMap`, we need to ensure that
+ // `obj` doesn't have a `forEach` method in order to distinguish
+ // it from a regular `Map`.
+ return methods !== weakMapMethods || !isFunction$1(obj[forEachName]);
+ };
+ }
+
+ // In the interest of compact minification, we write
+ // each string in the fingerprints only once.
+ var forEachName = 'forEach',
+ hasName = 'has',
+ commonInit = ['clear', 'delete'],
+ mapTail = ['get', hasName, 'set'];
+
+ // `Map`, `WeakMap` and `Set` each have slightly different
+ // combinations of the above sublists.
+ var mapMethods = commonInit.concat(forEachName, mapTail),
+ weakMapMethods = commonInit.concat(mapTail),
+ setMethods = ['add'].concat(commonInit, forEachName, hasName);
+
+ var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');
+
+ var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');
+
+ var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');
+
+ var isWeakSet = tagTester('WeakSet');
+
+ // Retrieve the values of an object's properties.
+ function values(obj) {
+ var _keys = keys(obj);
+ var length = _keys.length;
+ var values = Array(length);
+ for (var i = 0; i < length; i++) {
+ values[i] = obj[_keys[i]];
+ }
+ return values;
+ }
+
+ // Convert an object into a list of `[key, value]` pairs.
+ // The opposite of `_.object` with one argument.
+ function pairs(obj) {
+ var _keys = keys(obj);
+ var length = _keys.length;
+ var pairs = Array(length);
+ for (var i = 0; i < length; i++) {
+ pairs[i] = [_keys[i], obj[_keys[i]]];
+ }
+ return pairs;
+ }
+
+ // Invert the keys and values of an object. The values must be serializable.
+ function invert(obj) {
+ var result = {};
+ var _keys = keys(obj);
+ for (var i = 0, length = _keys.length; i < length; i++) {
+ result[obj[_keys[i]]] = _keys[i];
+ }
+ return result;
+ }
+
+ // Return a sorted list of the function names available on the object.
+ function functions(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (isFunction$1(obj[key])) names.push(key);
+ }
+ return names.sort();
+ }
+
+ // An internal function for creating assigner functions.
+ function createAssigner(keysFunc, defaults) {
+ return function(obj) {
+ var length = arguments.length;
+ if (defaults) obj = Object(obj);
+ if (length < 2 || obj == null) return obj;
+ for (var index = 1; index < length; index++) {
+ var source = arguments[index],
+ keys = keysFunc(source),
+ l = keys.length;
+ for (var i = 0; i < l; i++) {
+ var key = keys[i];
+ if (!defaults || obj[key] === void 0) obj[key] = source[key];
+ }
+ }
+ return obj;
+ };
+ }
+
+ // Extend a given object with all the properties in passed-in object(s).
+ var extend = createAssigner(allKeys);
+
+ // Assigns a given object with all the own properties in the passed-in
+ // object(s).
+ // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+ var extendOwn = createAssigner(keys);
+
+ // Fill in a given object with default properties.
+ var defaults = createAssigner(allKeys, true);
+
+ // Create a naked function reference for surrogate-prototype-swapping.
+ function ctor() {
+ return function(){};
+ }
+
+ // An internal function for creating a new object that inherits from another.
+ function baseCreate(prototype) {
+ if (!isObject(prototype)) return {};
+ if (nativeCreate) return nativeCreate(prototype);
+ var Ctor = ctor();
+ Ctor.prototype = prototype;
+ var result = new Ctor;
+ Ctor.prototype = null;
+ return result;
+ }
+
+ // Creates an object that inherits from the given prototype object.
+ // If additional properties are provided then they will be added to the
+ // created object.
+ function create(prototype, props) {
+ var result = baseCreate(prototype);
+ if (props) extendOwn(result, props);
+ return result;
+ }
+
+ // Create a (shallow-cloned) duplicate of an object.
+ function clone(obj) {
+ if (!isObject(obj)) return obj;
+ return isArray(obj) ? obj.slice() : extend({}, obj);
+ }
+
+ // Invokes `interceptor` with the `obj` and then returns `obj`.
+ // The primary purpose of this method is to "tap into" a method chain, in
+ // order to perform operations on intermediate results within the chain.
+ function tap(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+ }
+
+ // Normalize a (deep) property `path` to array.
+ // Like `_.iteratee`, this function can be customized.
+ function toPath$1(path) {
+ return isArray(path) ? path : [path];
+ }
+ _$1.toPath = toPath$1;
+
+ // Internal wrapper for `_.toPath` to enable minification.
+ // Similar to `cb` for `_.iteratee`.
+ function toPath(path) {
+ return _$1.toPath(path);
+ }
+
+ // Internal function to obtain a nested property in `obj` along `path`.
+ function deepGet(obj, path) {
+ var length = path.length;
+ for (var i = 0; i < length; i++) {
+ if (obj == null) return void 0;
+ obj = obj[path[i]];
+ }
+ return length ? obj : void 0;
+ }
+
+ // Get the value of the (deep) property on `path` from `object`.
+ // If any property in `path` does not exist or if the value is
+ // `undefined`, return `defaultValue` instead.
+ // The `path` is normalized through `_.toPath`.
+ function get(object, path, defaultValue) {
+ var value = deepGet(object, toPath(path));
+ return isUndefined(value) ? defaultValue : value;
+ }
+
+ // Shortcut function for checking if an object has a given property directly on
+ // itself (in other words, not on a prototype). Unlike the internal `has`
+ // function, this public version can also traverse nested properties.
+ function has(obj, path) {
+ path = toPath(path);
+ var length = path.length;
+ for (var i = 0; i < length; i++) {
+ var key = path[i];
+ if (!has$1(obj, key)) return false;
+ obj = obj[key];
+ }
+ return !!length;
+ }
+
+ // Keep the identity function around for default iteratees.
+ function identity(value) {
+ return value;
+ }
+
+ // Returns a predicate for checking whether an object has a given set of
+ // `key:value` pairs.
+ function matcher(attrs) {
+ attrs = extendOwn({}, attrs);
+ return function(obj) {
+ return isMatch(obj, attrs);
+ };
+ }
+
+ // Creates a function that, when passed an object, will traverse that object’s
+ // properties down the given `path`, specified as an array of keys or indices.
+ function property(path) {
+ path = toPath(path);
+ return function(obj) {
+ return deepGet(obj, path);
+ };
+ }
+
+ // Internal function that returns an efficient (for current engines) version
+ // of the passed-in callback, to be repeatedly applied in other Underscore
+ // functions.
+ function optimizeCb(func, context, argCount) {
+ if (context === void 0) return func;
+ switch (argCount == null ? 3 : argCount) {
+ case 1: return function(value) {
+ return func.call(context, value);
+ };
+ // The 2-argument case is omitted because we’re not using it.
+ case 3: return function(value, index, collection) {
+ return func.call(context, value, index, collection);
+ };
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(context, accumulator, value, index, collection);
+ };
+ }
+ return function() {
+ return func.apply(context, arguments);
+ };
+ }
+
+ // An internal function to generate callbacks that can be applied to each
+ // element in a collection, returning the desired result — either `_.identity`,
+ // an arbitrary callback, a property matcher, or a property accessor.
+ function baseIteratee(value, context, argCount) {
+ if (value == null) return identity;
+ if (isFunction$1(value)) return optimizeCb(value, context, argCount);
+ if (isObject(value) && !isArray(value)) return matcher(value);
+ return property(value);
+ }
+
+ // External wrapper for our callback generator. Users may customize
+ // `_.iteratee` if they want additional predicate/iteratee shorthand styles.
+ // This abstraction hides the internal-only `argCount` argument.
+ function iteratee(value, context) {
+ return baseIteratee(value, context, Infinity);
+ }
+ _$1.iteratee = iteratee;
+
+ // The function we call internally to generate a callback. It invokes
+ // `_.iteratee` if overridden, otherwise `baseIteratee`.
+ function cb(value, context, argCount) {
+ if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context);
+ return baseIteratee(value, context, argCount);
+ }
+
+ // Returns the results of applying the `iteratee` to each element of `obj`.
+ // In contrast to `_.map` it returns an object.
+ function mapObject(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var _keys = keys(obj),
+ length = _keys.length,
+ results = {};
+ for (var index = 0; index < length; index++) {
+ var currentKey = _keys[index];
+ results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
+ }
+ return results;
+ }
+
+ // Predicate-generating function. Often useful outside of Underscore.
+ function noop(){}
+
+ // Generates a function for a given object that returns a given property.
+ function propertyOf(obj) {
+ if (obj == null) return noop;
+ return function(path) {
+ return get(obj, path);
+ };
+ }
+
+ // Run a function **n** times.
+ function times(n, iteratee, context) {
+ var accum = Array(Math.max(0, n));
+ iteratee = optimizeCb(iteratee, context, 1);
+ for (var i = 0; i < n; i++) accum[i] = iteratee(i);
+ return accum;
+ }
+
+ // Return a random integer between `min` and `max` (inclusive).
+ function random(min, max) {
+ if (max == null) {
+ max = min;
+ min = 0;
+ }
+ return min + Math.floor(Math.random() * (max - min + 1));
+ }
+
+ // A (possibly faster) way to get the current timestamp as an integer.
+ var now = Date.now || function() {
+ return new Date().getTime();
+ };
+
+ // Internal helper to generate functions for escaping and unescaping strings
+ // to/from HTML interpolation.
+ function createEscaper(map) {
+ var escaper = function(match) {
+ return map[match];
+ };
+ // Regexes for identifying a key that needs to be escaped.
+ var source = '(?:' + keys(map).join('|') + ')';
+ var testRegexp = RegExp(source);
+ var replaceRegexp = RegExp(source, 'g');
+ return function(string) {
+ string = string == null ? '' : '' + string;
+ return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
+ };
+ }
+
+ // Internal list of HTML entities for escaping.
+ var escapeMap = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+ };
+
+ // Function for escaping strings to HTML interpolation.
+ var _escape = createEscaper(escapeMap);
+
+ // Internal list of HTML entities for unescaping.
+ var unescapeMap = invert(escapeMap);
+
+ // Function for unescaping strings from HTML interpolation.
+ var _unescape = createEscaper(unescapeMap);
+
+ // By default, Underscore uses ERB-style template delimiters. Change the
+ // following template settings to use alternative delimiters.
+ var templateSettings = _$1.templateSettings = {
+ evaluate: /<%([\s\S]+?)%>/g,
+ interpolate: /<%=([\s\S]+?)%>/g,
+ escape: /<%-([\s\S]+?)%>/g
+ };
+
+ // When customizing `_.templateSettings`, if you don't want to define an
+ // interpolation, evaluation or escaping regex, we need one that is
+ // guaranteed not to match.
+ var noMatch = /(.)^/;
+
+ // Certain characters need to be escaped so that they can be put into a
+ // string literal.
+ var escapes = {
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
+
+ function escapeChar(match) {
+ return '\\' + escapes[match];
+ }
+
+ // In order to prevent third-party code injection through
+ // `_.templateSettings.variable`, we test it against the following regular
+ // expression. It is intentionally a bit more liberal than just matching valid
+ // identifiers, but still prevents possible loopholes through defaults or
+ // destructuring assignment.
+ var bareIdentifier = /^\s*(\w|\$)+\s*$/;
+
+ // JavaScript micro-templating, similar to John Resig's implementation.
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
+ // and correctly escapes quotes within interpolated code.
+ // NB: `oldSettings` only exists for backwards compatibility.
+ function template(text, settings, oldSettings) {
+ if (!settings && oldSettings) settings = oldSettings;
+ settings = defaults({}, settings, _$1.templateSettings);
+
+ // Combine delimiters into one regular expression via alternation.
+ var matcher = RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
+
+ // Compile the template source, escaping string literals appropriately.
+ var index = 0;
+ var source = "__p+='";
+ text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+ source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
+ index = offset + match.length;
+
+ if (escape) {
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ } else if (interpolate) {
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ } else if (evaluate) {
+ source += "';\n" + evaluate + "\n__p+='";
+ }
+
+ // Adobe VMs need the match returned to produce the correct offset.
+ return match;
+ });
+ source += "';\n";
+
+ var argument = settings.variable;
+ if (argument) {
+ // Insure against third-party code injection. (CVE-2021-23358)
+ if (!bareIdentifier.test(argument)) throw new Error(
+ 'variable is not a bare identifier: ' + argument
+ );
+ } else {
+ // If a variable is not specified, place data values in local scope.
+ source = 'with(obj||{}){\n' + source + '}\n';
+ argument = 'obj';
+ }
+
+ source = "var __t,__p='',__j=Array.prototype.join," +
+ "print=function(){__p+=__j.call(arguments,'');};\n" +
+ source + 'return __p;\n';
+
+ var render;
+ try {
+ render = new Function(argument, '_', source);
+ } catch (e) {
+ e.source = source;
+ throw e;
+ }
+
+ var template = function(data) {
+ return render.call(this, data, _$1);
+ };
+
+ // Provide the compiled source as a convenience for precompilation.
+ template.source = 'function(' + argument + '){\n' + source + '}';
+
+ return template;
+ }
+
+ // Traverses the children of `obj` along `path`. If a child is a function, it
+ // is invoked with its parent as context. Returns the value of the final
+ // child, or `fallback` if any child is undefined.
+ function result(obj, path, fallback) {
+ path = toPath(path);
+ var length = path.length;
+ if (!length) {
+ return isFunction$1(fallback) ? fallback.call(obj) : fallback;
+ }
+ for (var i = 0; i < length; i++) {
+ var prop = obj == null ? void 0 : obj[path[i]];
+ if (prop === void 0) {
+ prop = fallback;
+ i = length; // Ensure we don't continue iterating.
+ }
+ obj = isFunction$1(prop) ? prop.call(obj) : prop;
+ }
+ return obj;
+ }
+
+ // Generate a unique integer id (unique within the entire client session).
+ // Useful for temporary DOM ids.
+ var idCounter = 0;
+ function uniqueId(prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+ }
+
+ // Start chaining a wrapped Underscore object.
+ function chain(obj) {
+ var instance = _$1(obj);
+ instance._chain = true;
+ return instance;
+ }
+
+ // Internal function to execute `sourceFunc` bound to `context` with optional
+ // `args`. Determines whether to execute a function as a constructor or as a
+ // normal function.
+ function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
+ if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
+ var self = baseCreate(sourceFunc.prototype);
+ var result = sourceFunc.apply(self, args);
+ if (isObject(result)) return result;
+ return self;
+ }
+
+ // Partially apply a function by creating a version that has had some of its
+ // arguments pre-filled, without changing its dynamic `this` context. `_` acts
+ // as a placeholder by default, allowing any combination of arguments to be
+ // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
+ var partial = restArguments(function(func, boundArgs) {
+ var placeholder = partial.placeholder;
+ var bound = function() {
+ var position = 0, length = boundArgs.length;
+ var args = Array(length);
+ for (var i = 0; i < length; i++) {
+ args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
+ }
+ while (position < arguments.length) args.push(arguments[position++]);
+ return executeBound(func, bound, this, this, args);
+ };
+ return bound;
+ });
+
+ partial.placeholder = _$1;
+
+ // Create a function bound to a given object (assigning `this`, and arguments,
+ // optionally).
+ var bind = restArguments(function(func, context, args) {
+ if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');
+ var bound = restArguments(function(callArgs) {
+ return executeBound(func, bound, context, this, args.concat(callArgs));
+ });
+ return bound;
+ });
+
+ // Internal helper for collection methods to determine whether a collection
+ // should be iterated as an array or as an object.
+ // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
+ // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
+ var isArrayLike = createSizePropertyCheck(getLength);
+
+ // Internal implementation of a recursive `flatten` function.
+ function flatten$1(input, depth, strict, output) {
+ output = output || [];
+ if (!depth && depth !== 0) {
+ depth = Infinity;
+ } else if (depth <= 0) {
+ return output.concat(input);
+ }
+ var idx = output.length;
+ for (var i = 0, length = getLength(input); i < length; i++) {
+ var value = input[i];
+ if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
+ // Flatten current level of array or arguments object.
+ if (depth > 1) {
+ flatten$1(value, depth - 1, strict, output);
+ idx = output.length;
+ } else {
+ var j = 0, len = value.length;
+ while (j < len) output[idx++] = value[j++];
+ }
+ } else if (!strict) {
+ output[idx++] = value;
+ }
+ }
+ return output;
+ }
+
+ // Bind a number of an object's methods to that object. Remaining arguments
+ // are the method names to be bound. Useful for ensuring that all callbacks
+ // defined on an object belong to it.
+ var bindAll = restArguments(function(obj, keys) {
+ keys = flatten$1(keys, false, false);
+ var index = keys.length;
+ if (index < 1) throw new Error('bindAll must be passed function names');
+ while (index--) {
+ var key = keys[index];
+ obj[key] = bind(obj[key], obj);
+ }
+ return obj;
+ });
+
+ // Memoize an expensive function by storing its results.
+ function memoize(func, hasher) {
+ var memoize = function(key) {
+ var cache = memoize.cache;
+ var address = '' + (hasher ? hasher.apply(this, arguments) : key);
+ if (!has$1(cache, address)) cache[address] = func.apply(this, arguments);
+ return cache[address];
+ };
+ memoize.cache = {};
+ return memoize;
+ }
+
+ // Delays a function for the given number of milliseconds, and then calls
+ // it with the arguments supplied.
+ var delay = restArguments(function(func, wait, args) {
+ return setTimeout(function() {
+ return func.apply(null, args);
+ }, wait);
+ });
+
+ // Defers a function, scheduling it to run after the current call stack has
+ // cleared.
+ var defer = partial(delay, _$1, 1);
+
+ // Returns a function, that, when invoked, will only be triggered at most once
+ // during a given window of time. Normally, the throttled function will run
+ // as much as it can, without ever going more than once per `wait` duration;
+ // but if you'd like to disable the execution on the leading edge, pass
+ // `{leading: false}`. To disable execution on the trailing edge, ditto.
+ function throttle(func, wait, options) {
+ var timeout, context, args, result;
+ var previous = 0;
+ if (!options) options = {};
+
+ var later = function() {
+ previous = options.leading === false ? 0 : now();
+ timeout = null;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ };
+
+ var throttled = function() {
+ var _now = now();
+ if (!previous && options.leading === false) previous = _now;
+ var remaining = wait - (_now - previous);
+ context = this;
+ args = arguments;
+ if (remaining <= 0 || remaining > wait) {
+ if (timeout) {
+ clearTimeout(timeout);
+ timeout = null;
+ }
+ previous = _now;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ } else if (!timeout && options.trailing !== false) {
+ timeout = setTimeout(later, remaining);
+ }
+ return result;
+ };
+
+ throttled.cancel = function() {
+ clearTimeout(timeout);
+ previous = 0;
+ timeout = context = args = null;
+ };
+
+ return throttled;
+ }
+
+ // When a sequence of calls of the returned function ends, the argument
+ // function is triggered. The end of a sequence is defined by the `wait`
+ // parameter. If `immediate` is passed, the argument function will be
+ // triggered at the beginning of the sequence instead of at the end.
+ function debounce(func, wait, immediate) {
+ var timeout, previous, args, result, context;
+
+ var later = function() {
+ var passed = now() - previous;
+ if (wait > passed) {
+ timeout = setTimeout(later, wait - passed);
+ } else {
+ timeout = null;
+ if (!immediate) result = func.apply(context, args);
+ // This check is needed because `func` can recursively invoke `debounced`.
+ if (!timeout) args = context = null;
+ }
+ };
+
+ var debounced = restArguments(function(_args) {
+ context = this;
+ args = _args;
+ previous = now();
+ if (!timeout) {
+ timeout = setTimeout(later, wait);
+ if (immediate) result = func.apply(context, args);
+ }
+ return result;
+ });
+
+ debounced.cancel = function() {
+ clearTimeout(timeout);
+ timeout = args = context = null;
+ };
+
+ return debounced;
+ }
+
+ // Returns the first function passed as an argument to the second,
+ // allowing you to adjust arguments, run code before and after, and
+ // conditionally execute the original function.
+ function wrap(func, wrapper) {
+ return partial(wrapper, func);
+ }
+
+ // Returns a negated version of the passed-in predicate.
+ function negate(predicate) {
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+ }
+
+ // Returns a function that is the composition of a list of functions, each
+ // consuming the return value of the function that follows.
+ function compose() {
+ var args = arguments;
+ var start = args.length - 1;
+ return function() {
+ var i = start;
+ var result = args[start].apply(this, arguments);
+ while (i--) result = args[i].call(this, result);
+ return result;
+ };
+ }
+
+ // Returns a function that will only be executed on and after the Nth call.
+ function after(times, func) {
+ return function() {
+ if (--times < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ }
+
+ // Returns a function that will only be executed up to (but not including) the
+ // Nth call.
+ function before(times, func) {
+ var memo;
+ return function() {
+ if (--times > 0) {
+ memo = func.apply(this, arguments);
+ }
+ if (times <= 1) func = null;
+ return memo;
+ };
+ }
+
+ // Returns a function that will be executed at most one time, no matter how
+ // often you call it. Useful for lazy initialization.
+ var once = partial(before, 2);
+
+ // Returns the first key on an object that passes a truth test.
+ function findKey(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = keys(obj), key;
+ for (var i = 0, length = _keys.length; i < length; i++) {
+ key = _keys[i];
+ if (predicate(obj[key], key, obj)) return key;
+ }
+ }
+
+ // Internal function to generate `_.findIndex` and `_.findLastIndex`.
+ function createPredicateIndexFinder(dir) {
+ return function(array, predicate, context) {
+ predicate = cb(predicate, context);
+ var length = getLength(array);
+ var index = dir > 0 ? 0 : length - 1;
+ for (; index >= 0 && index < length; index += dir) {
+ if (predicate(array[index], index, array)) return index;
+ }
+ return -1;
+ };
+ }
+
+ // Returns the first index on an array-like that passes a truth test.
+ var findIndex = createPredicateIndexFinder(1);
+
+ // Returns the last index on an array-like that passes a truth test.
+ var findLastIndex = createPredicateIndexFinder(-1);
+
+ // Use a comparator function to figure out the smallest index at which
+ // an object should be inserted so as to maintain order. Uses binary search.
+ function sortedIndex(array, obj, iteratee, context) {
+ iteratee = cb(iteratee, context, 1);
+ var value = iteratee(obj);
+ var low = 0, high = getLength(array);
+ while (low < high) {
+ var mid = Math.floor((low + high) / 2);
+ if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
+ }
+ return low;
+ }
+
+ // Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.
+ function createIndexFinder(dir, predicateFind, sortedIndex) {
+ return function(array, item, idx) {
+ var i = 0, length = getLength(array);
+ if (typeof idx == 'number') {
+ if (dir > 0) {
+ i = idx >= 0 ? idx : Math.max(idx + length, i);
+ } else {
+ length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
+ }
+ } else if (sortedIndex && idx && length) {
+ idx = sortedIndex(array, item);
+ return array[idx] === item ? idx : -1;
+ }
+ if (item !== item) {
+ idx = predicateFind(slice.call(array, i, length), isNaN$1);
+ return idx >= 0 ? idx + i : -1;
+ }
+ for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
+ if (array[idx] === item) return idx;
+ }
+ return -1;
+ };
+ }
+
+ // Return the position of the first occurrence of an item in an array,
+ // or -1 if the item is not included in the array.
+ // If the array is large and already in sort order, pass `true`
+ // for **isSorted** to use binary search.
+ var indexOf = createIndexFinder(1, findIndex, sortedIndex);
+
+ // Return the position of the last occurrence of an item in an array,
+ // or -1 if the item is not included in the array.
+ var lastIndexOf = createIndexFinder(-1, findLastIndex);
+
+ // Return the first value which passes a truth test.
+ function find(obj, predicate, context) {
+ var keyFinder = isArrayLike(obj) ? findIndex : findKey;
+ var key = keyFinder(obj, predicate, context);
+ if (key !== void 0 && key !== -1) return obj[key];
+ }
+
+ // Convenience version of a common use case of `_.find`: getting the first
+ // object containing specific `key:value` pairs.
+ function findWhere(obj, attrs) {
+ return find(obj, matcher(attrs));
+ }
+
+ // The cornerstone for collection functions, an `each`
+ // implementation, aka `forEach`.
+ // Handles raw objects in addition to array-likes. Treats all
+ // sparse array-likes as if they were dense.
+ function each(obj, iteratee, context) {
+ iteratee = optimizeCb(iteratee, context);
+ var i, length;
+ if (isArrayLike(obj)) {
+ for (i = 0, length = obj.length; i < length; i++) {
+ iteratee(obj[i], i, obj);
+ }
+ } else {
+ var _keys = keys(obj);
+ for (i = 0, length = _keys.length; i < length; i++) {
+ iteratee(obj[_keys[i]], _keys[i], obj);
+ }
+ }
+ return obj;
+ }
+
+ // Return the results of applying the iteratee to each element.
+ function map(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length,
+ results = Array(length);
+ for (var index = 0; index < length; index++) {
+ var currentKey = _keys ? _keys[index] : index;
+ results[index] = iteratee(obj[currentKey], currentKey, obj);
+ }
+ return results;
+ }
+
+ // Internal helper to create a reducing function, iterating left or right.
+ function createReduce(dir) {
+ // Wrap code that reassigns argument variables in a separate function than
+ // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
+ var reducer = function(obj, iteratee, memo, initial) {
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length,
+ index = dir > 0 ? 0 : length - 1;
+ if (!initial) {
+ memo = obj[_keys ? _keys[index] : index];
+ index += dir;
+ }
+ for (; index >= 0 && index < length; index += dir) {
+ var currentKey = _keys ? _keys[index] : index;
+ memo = iteratee(memo, obj[currentKey], currentKey, obj);
+ }
+ return memo;
+ };
+
+ return function(obj, iteratee, memo, context) {
+ var initial = arguments.length >= 3;
+ return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
+ };
+ }
+
+ // **Reduce** builds up a single result from a list of values, aka `inject`,
+ // or `foldl`.
+ var reduce = createReduce(1);
+
+ // The right-associative version of reduce, also known as `foldr`.
+ var reduceRight = createReduce(-1);
+
+ // Return all the elements that pass a truth test.
+ function filter(obj, predicate, context) {
+ var results = [];
+ predicate = cb(predicate, context);
+ each(obj, function(value, index, list) {
+ if (predicate(value, index, list)) results.push(value);
+ });
+ return results;
+ }
+
+ // Return all the elements for which a truth test fails.
+ function reject(obj, predicate, context) {
+ return filter(obj, negate(cb(predicate)), context);
+ }
+
+ // Determine whether all of the elements pass a truth test.
+ function every(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length;
+ for (var index = 0; index < length; index++) {
+ var currentKey = _keys ? _keys[index] : index;
+ if (!predicate(obj[currentKey], currentKey, obj)) return false;
+ }
+ return true;
+ }
+
+ // Determine if at least one element in the object passes a truth test.
+ function some(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length;
+ for (var index = 0; index < length; index++) {
+ var currentKey = _keys ? _keys[index] : index;
+ if (predicate(obj[currentKey], currentKey, obj)) return true;
+ }
+ return false;
+ }
+
+ // Determine if the array or object contains a given item (using `===`).
+ function contains(obj, item, fromIndex, guard) {
+ if (!isArrayLike(obj)) obj = values(obj);
+ if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+ return indexOf(obj, item, fromIndex) >= 0;
+ }
+
+ // Invoke a method (with arguments) on every item in a collection.
+ var invoke = restArguments(function(obj, path, args) {
+ var contextPath, func;
+ if (isFunction$1(path)) {
+ func = path;
+ } else {
+ path = toPath(path);
+ contextPath = path.slice(0, -1);
+ path = path[path.length - 1];
+ }
+ return map(obj, function(context) {
+ var method = func;
+ if (!method) {
+ if (contextPath && contextPath.length) {
+ context = deepGet(context, contextPath);
+ }
+ if (context == null) return void 0;
+ method = context[path];
+ }
+ return method == null ? method : method.apply(context, args);
+ });
+ });
+
+ // Convenience version of a common use case of `_.map`: fetching a property.
+ function pluck(obj, key) {
+ return map(obj, property(key));
+ }
+
+ // Convenience version of a common use case of `_.filter`: selecting only
+ // objects containing specific `key:value` pairs.
+ function where(obj, attrs) {
+ return filter(obj, matcher(attrs));
+ }
+
+ // Return the maximum element (or element-based computation).
+ function max(obj, iteratee, context) {
+ var result = -Infinity, lastComputed = -Infinity,
+ value, computed;
+ if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
+ obj = isArrayLike(obj) ? obj : values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value != null && value > result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = cb(iteratee, context);
+ each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
+ result = v;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+ }
+
+ // Return the minimum element (or element-based computation).
+ function min(obj, iteratee, context) {
+ var result = Infinity, lastComputed = Infinity,
+ value, computed;
+ if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
+ obj = isArrayLike(obj) ? obj : values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value != null && value < result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = cb(iteratee, context);
+ each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed < lastComputed || computed === Infinity && result === Infinity) {
+ result = v;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+ }
+
+ // Sample **n** random values from a collection using the modern version of the
+ // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
+ // If **n** is not specified, returns a single random element.
+ // The internal `guard` argument allows it to work with `_.map`.
+ function sample(obj, n, guard) {
+ if (n == null || guard) {
+ if (!isArrayLike(obj)) obj = values(obj);
+ return obj[random(obj.length - 1)];
+ }
+ var sample = isArrayLike(obj) ? clone(obj) : values(obj);
+ var length = getLength(sample);
+ n = Math.max(Math.min(n, length), 0);
+ var last = length - 1;
+ for (var index = 0; index < n; index++) {
+ var rand = random(index, last);
+ var temp = sample[index];
+ sample[index] = sample[rand];
+ sample[rand] = temp;
+ }
+ return sample.slice(0, n);
+ }
+
+ // Shuffle a collection.
+ function shuffle(obj) {
+ return sample(obj, Infinity);
+ }
+
+ // Sort the object's values by a criterion produced by an iteratee.
+ function sortBy(obj, iteratee, context) {
+ var index = 0;
+ iteratee = cb(iteratee, context);
+ return pluck(map(obj, function(value, key, list) {
+ return {
+ value: value,
+ index: index++,
+ criteria: iteratee(value, key, list)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria;
+ var b = right.criteria;
+ if (a !== b) {
+ if (a > b || a === void 0) return 1;
+ if (a < b || b === void 0) return -1;
+ }
+ return left.index - right.index;
+ }), 'value');
+ }
+
+ // An internal function used for aggregate "group by" operations.
+ function group(behavior, partition) {
+ return function(obj, iteratee, context) {
+ var result = partition ? [[], []] : {};
+ iteratee = cb(iteratee, context);
+ each(obj, function(value, index) {
+ var key = iteratee(value, index, obj);
+ behavior(result, value, key);
+ });
+ return result;
+ };
+ }
+
+ // Groups the object's values by a criterion. Pass either a string attribute
+ // to group by, or a function that returns the criterion.
+ var groupBy = group(function(result, value, key) {
+ if (has$1(result, key)) result[key].push(value); else result[key] = [value];
+ });
+
+ // Indexes the object's values by a criterion, similar to `_.groupBy`, but for
+ // when you know that your index values will be unique.
+ var indexBy = group(function(result, value, key) {
+ result[key] = value;
+ });
+
+ // Counts instances of an object that group by a certain criterion. Pass
+ // either a string attribute to count by, or a function that returns the
+ // criterion.
+ var countBy = group(function(result, value, key) {
+ if (has$1(result, key)) result[key]++; else result[key] = 1;
+ });
+
+ // Split a collection into two arrays: one whose elements all pass the given
+ // truth test, and one whose elements all do not pass the truth test.
+ var partition = group(function(result, value, pass) {
+ result[pass ? 0 : 1].push(value);
+ }, true);
+
+ // Safely create a real, live array from anything iterable.
+ var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
+ function toArray(obj) {
+ if (!obj) return [];
+ if (isArray(obj)) return slice.call(obj);
+ if (isString(obj)) {
+ // Keep surrogate pair characters together.
+ return obj.match(reStrSymbol);
+ }
+ if (isArrayLike(obj)) return map(obj, identity);
+ return values(obj);
+ }
+
+ // Return the number of elements in a collection.
+ function size(obj) {
+ if (obj == null) return 0;
+ return isArrayLike(obj) ? obj.length : keys(obj).length;
+ }
+
+ // Internal `_.pick` helper function to determine whether `key` is an enumerable
+ // property name of `obj`.
+ function keyInObj(value, key, obj) {
+ return key in obj;
+ }
+
+ // Return a copy of the object only containing the allowed properties.
+ var pick = restArguments(function(obj, keys) {
+ var result = {}, iteratee = keys[0];
+ if (obj == null) return result;
+ if (isFunction$1(iteratee)) {
+ if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
+ keys = allKeys(obj);
+ } else {
+ iteratee = keyInObj;
+ keys = flatten$1(keys, false, false);
+ obj = Object(obj);
+ }
+ for (var i = 0, length = keys.length; i < length; i++) {
+ var key = keys[i];
+ var value = obj[key];
+ if (iteratee(value, key, obj)) result[key] = value;
+ }
+ return result;
+ });
+
+ // Return a copy of the object without the disallowed properties.
+ var omit = restArguments(function(obj, keys) {
+ var iteratee = keys[0], context;
+ if (isFunction$1(iteratee)) {
+ iteratee = negate(iteratee);
+ if (keys.length > 1) context = keys[1];
+ } else {
+ keys = map(flatten$1(keys, false, false), String);
+ iteratee = function(value, key) {
+ return !contains(keys, key);
+ };
+ }
+ return pick(obj, iteratee, context);
+ });
+
+ // Returns everything but the last entry of the array. Especially useful on
+ // the arguments object. Passing **n** will return all the values in
+ // the array, excluding the last N.
+ function initial(array, n, guard) {
+ return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
+ }
+
+ // Get the first element of an array. Passing **n** will return the first N
+ // values in the array. The **guard** check allows it to work with `_.map`.
+ function first(array, n, guard) {
+ if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
+ if (n == null || guard) return array[0];
+ return initial(array, array.length - n);
+ }
+
+ // Returns everything but the first entry of the `array`. Especially useful on
+ // the `arguments` object. Passing an **n** will return the rest N values in the
+ // `array`.
+ function rest(array, n, guard) {
+ return slice.call(array, n == null || guard ? 1 : n);
+ }
+
+ // Get the last element of an array. Passing **n** will return the last N
+ // values in the array.
+ function last(array, n, guard) {
+ if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
+ if (n == null || guard) return array[array.length - 1];
+ return rest(array, Math.max(0, array.length - n));
+ }
+
+ // Trim out all falsy values from an array.
+ function compact(array) {
+ return filter(array, Boolean);
+ }
+
+ // Flatten out an array, either recursively (by default), or up to `depth`.
+ // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
+ function flatten(array, depth) {
+ return flatten$1(array, depth, false);
+ }
+
+ // Take the difference between one array and a number of other arrays.
+ // Only the elements present in just the first array will remain.
+ var difference = restArguments(function(array, rest) {
+ rest = flatten$1(rest, true, true);
+ return filter(array, function(value){
+ return !contains(rest, value);
+ });
+ });
+
+ // Return a version of the array that does not contain the specified value(s).
+ var without = restArguments(function(array, otherArrays) {
+ return difference(array, otherArrays);
+ });
+
+ // Produce a duplicate-free version of the array. If the array has already
+ // been sorted, you have the option of using a faster algorithm.
+ // The faster algorithm will not work with an iteratee if the iteratee
+ // is not a one-to-one function, so providing an iteratee will disable
+ // the faster algorithm.
+ function uniq(array, isSorted, iteratee, context) {
+ if (!isBoolean(isSorted)) {
+ context = iteratee;
+ iteratee = isSorted;
+ isSorted = false;
+ }
+ if (iteratee != null) iteratee = cb(iteratee, context);
+ var result = [];
+ var seen = [];
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var value = array[i],
+ computed = iteratee ? iteratee(value, i, array) : value;
+ if (isSorted && !iteratee) {
+ if (!i || seen !== computed) result.push(value);
+ seen = computed;
+ } else if (iteratee) {
+ if (!contains(seen, computed)) {
+ seen.push(computed);
+ result.push(value);
+ }
+ } else if (!contains(result, value)) {
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ // Produce an array that contains the union: each distinct element from all of
+ // the passed-in arrays.
+ var union = restArguments(function(arrays) {
+ return uniq(flatten$1(arrays, true, true));
+ });
+
+ // Produce an array that contains every item shared between all the
+ // passed-in arrays.
+ function intersection(array) {
+ var result = [];
+ var argsLength = arguments.length;
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var item = array[i];
+ if (contains(result, item)) continue;
+ var j;
+ for (j = 1; j < argsLength; j++) {
+ if (!contains(arguments[j], item)) break;
+ }
+ if (j === argsLength) result.push(item);
+ }
+ return result;
+ }
+
+ // Complement of zip. Unzip accepts an array of arrays and groups
+ // each array's elements on shared indices.
+ function unzip(array) {
+ var length = array && max(array, getLength).length || 0;
+ var result = Array(length);
+
+ for (var index = 0; index < length; index++) {
+ result[index] = pluck(array, index);
+ }
+ return result;
+ }
+
+ // Zip together multiple lists into a single array -- elements that share
+ // an index go together.
+ var zip = restArguments(unzip);
+
+ // Converts lists into objects. Pass either a single array of `[key, value]`
+ // pairs, or two parallel arrays of the same length -- one of keys, and one of
+ // the corresponding values. Passing by pairs is the reverse of `_.pairs`.
+ function object(list, values) {
+ var result = {};
+ for (var i = 0, length = getLength(list); i < length; i++) {
+ if (values) {
+ result[list[i]] = values[i];
+ } else {
+ result[list[i][0]] = list[i][1];
+ }
+ }
+ return result;
+ }
+
+ // Generate an integer Array containing an arithmetic progression. A port of
+ // the native Python `range()` function. See
+ // [the Python documentation](https://docs.python.org/library/functions.html#range).
+ function range(start, stop, step) {
+ if (stop == null) {
+ stop = start || 0;
+ start = 0;
+ }
+ if (!step) {
+ step = stop < start ? -1 : 1;
+ }
+
+ var length = Math.max(Math.ceil((stop - start) / step), 0);
+ var range = Array(length);
+
+ for (var idx = 0; idx < length; idx++, start += step) {
+ range[idx] = start;
+ }
+
+ return range;
+ }
+
+ // Chunk a single array into multiple arrays, each containing `count` or fewer
+ // items.
+ function chunk(array, count) {
+ if (count == null || count < 1) return [];
+ var result = [];
+ var i = 0, length = array.length;
+ while (i < length) {
+ result.push(slice.call(array, i, i += count));
+ }
+ return result;
+ }
+
+ // Helper function to continue chaining intermediate results.
+ function chainResult(instance, obj) {
+ return instance._chain ? _$1(obj).chain() : obj;
+ }
+
+ // Add your own custom functions to the Underscore object.
+ function mixin(obj) {
+ each(functions(obj), function(name) {
+ var func = _$1[name] = obj[name];
+ _$1.prototype[name] = function() {
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return chainResult(this, func.apply(_$1, args));
+ };
+ });
+ return _$1;
+ }
+
+ // Add all mutator `Array` functions to the wrapper.
+ each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _$1.prototype[name] = function() {
+ var obj = this._wrapped;
+ if (obj != null) {
+ method.apply(obj, arguments);
+ if ((name === 'shift' || name === 'splice') && obj.length === 0) {
+ delete obj[0];
+ }
+ }
+ return chainResult(this, obj);
+ };
+ });
+
+ // Add all accessor `Array` functions to the wrapper.
+ each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _$1.prototype[name] = function() {
+ var obj = this._wrapped;
+ if (obj != null) obj = method.apply(obj, arguments);
+ return chainResult(this, obj);
+ };
+ });
+
+ // Named Exports
+
+ var allExports = {
+ __proto__: null,
+ VERSION: VERSION,
+ restArguments: restArguments,
+ isObject: isObject,
+ isNull: isNull,
+ isUndefined: isUndefined,
+ isBoolean: isBoolean,
+ isElement: isElement,
+ isString: isString,
+ isNumber: isNumber,
+ isDate: isDate,
+ isRegExp: isRegExp,
+ isError: isError,
+ isSymbol: isSymbol,
+ isArrayBuffer: isArrayBuffer,
+ isDataView: isDataView$1,
+ isArray: isArray,
+ isFunction: isFunction$1,
+ isArguments: isArguments$1,
+ isFinite: isFinite$1,
+ isNaN: isNaN$1,
+ isTypedArray: isTypedArray$1,
+ isEmpty: isEmpty,
+ isMatch: isMatch,
+ isEqual: isEqual,
+ isMap: isMap,
+ isWeakMap: isWeakMap,
+ isSet: isSet,
+ isWeakSet: isWeakSet,
+ keys: keys,
+ allKeys: allKeys,
+ values: values,
+ pairs: pairs,
+ invert: invert,
+ functions: functions,
+ methods: functions,
+ extend: extend,
+ extendOwn: extendOwn,
+ assign: extendOwn,
+ defaults: defaults,
+ create: create,
+ clone: clone,
+ tap: tap,
+ get: get,
+ has: has,
+ mapObject: mapObject,
+ identity: identity,
+ constant: constant,
+ noop: noop,
+ toPath: toPath$1,
+ property: property,
+ propertyOf: propertyOf,
+ matcher: matcher,
+ matches: matcher,
+ times: times,
+ random: random,
+ now: now,
+ escape: _escape,
+ unescape: _unescape,
+ templateSettings: templateSettings,
+ template: template,
+ result: result,
+ uniqueId: uniqueId,
+ chain: chain,
+ iteratee: iteratee,
+ partial: partial,
+ bind: bind,
+ bindAll: bindAll,
+ memoize: memoize,
+ delay: delay,
+ defer: defer,
+ throttle: throttle,
+ debounce: debounce,
+ wrap: wrap,
+ negate: negate,
+ compose: compose,
+ after: after,
+ before: before,
+ once: once,
+ findKey: findKey,
+ findIndex: findIndex,
+ findLastIndex: findLastIndex,
+ sortedIndex: sortedIndex,
+ indexOf: indexOf,
+ lastIndexOf: lastIndexOf,
+ find: find,
+ detect: find,
+ findWhere: findWhere,
+ each: each,
+ forEach: each,
+ map: map,
+ collect: map,
+ reduce: reduce,
+ foldl: reduce,
+ inject: reduce,
+ reduceRight: reduceRight,
+ foldr: reduceRight,
+ filter: filter,
+ select: filter,
+ reject: reject,
+ every: every,
+ all: every,
+ some: some,
+ any: some,
+ contains: contains,
+ includes: contains,
+ include: contains,
+ invoke: invoke,
+ pluck: pluck,
+ where: where,
+ max: max,
+ min: min,
+ shuffle: shuffle,
+ sample: sample,
+ sortBy: sortBy,
+ groupBy: groupBy,
+ indexBy: indexBy,
+ countBy: countBy,
+ partition: partition,
+ toArray: toArray,
+ size: size,
+ pick: pick,
+ omit: omit,
+ first: first,
+ head: first,
+ take: first,
+ initial: initial,
+ last: last,
+ rest: rest,
+ tail: rest,
+ drop: rest,
+ compact: compact,
+ flatten: flatten,
+ without: without,
+ uniq: uniq,
+ unique: uniq,
+ union: union,
+ intersection: intersection,
+ difference: difference,
+ unzip: unzip,
+ transpose: unzip,
+ zip: zip,
+ object: object,
+ range: range,
+ chunk: chunk,
+ mixin: mixin,
+ 'default': _$1
+ };
+
+ // Default Export
+
+ // Add all of the Underscore functions to the wrapper object.
+ var _ = mixin(allExports);
+ // Legacy Node.js API.
+ _._ = _;
+
+ return _;
+
+})));
+//# sourceMappingURL=underscore-umd.js.map
Index: DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/objects.inv
===================================================================
diff -u
Binary files differ
Index: DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/genindex.html
===================================================================
diff -u
--- DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/genindex.html (revision 0)
+++ DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/genindex.html (revision 3556)
@@ -0,0 +1,898 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/.doctrees/tutorial_sections/surface_lines_csv_tutorial.doctree
===================================================================
diff -u
Binary files differ
Index: DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/.doctrees/tutorial_sections/locations_tutorial_snippet.doctree
===================================================================
diff -u
Binary files differ
Index: DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/.doctrees/tutorial_sections/locations_csv_tutorial.doctree
===================================================================
diff -u
Binary files differ
Index: DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/_sources/tutorial_sections/segment_csv_tutorial.rst.txt
===================================================================
diff -u
--- DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/_sources/tutorial_sections/segment_csv_tutorial.rst.txt (revision 0)
+++ DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/_sources/tutorial_sections/segment_csv_tutorial.rst.txt (revision 3556)
@@ -0,0 +1,87 @@
+Creating Segment class from segments.csv
+----------------------------------------
+In this example the segments.csv is imported by using pandas.
+The user can follow the following example to get the result of a list of Segments which can be later used as input of the DAM model.
+
+In the segments.csv it can be seen that the calculation_type is given by string value.
+For example "Stability" or "Piping". The first step to read the csv successfully is for the user
+to create a function that will transform this string input to the correct enumeration class
+:py:class:`dampythoninterface.segment.SegmentFailureMechanismTypeClass`. The following code snippet
+shows how
+
+.. code-block:: python
+
+ def get_failure_mechanism(soil_profile):
+ import dampythoninterface as dpi
+
+ output_dictionary = {
+ "All": dpi.SegmentFailureMechanismTypeClass.All,
+ "Stability": dpi.SegmentFailureMechanismTypeClass.Stability,
+ "Piping": dpi.SegmentFailureMechanismTypeClass.Piping,
+ "Liquefaction": dpi.SegmentFailureMechanismTypeClass.Liquefaction,
+ }
+ return output_dictionary[soil_profile]
+
+Then the user can read the csv file using pandas.
+
+.. code-block:: python
+
+ import pandas as pd
+ # read csv file using pandas
+ segment_csv = pd.read_csv("segments.csv", delimiter=";")
+
+There are several ways to extract the values from the csv file.
+In this case the user loops through unique id segments.
+The second loop of the code lets the user loop through all the different rows of the csv
+file that have the same segment_id. For each segment a new list of probabilities is
+created.
+
+.. code-block:: python
+
+ import dampythoninterface as dpi
+ # initialize segment list that will be used for the dam input
+ segments_list = []
+ # Loop through all unique segment names of the csv
+ for segment_id in segment_csv["segment_id"].unique():
+ # loop through all different probabilities and create a list of the SoilGeometryProbabilityElement
+ list_of_probability_elements = []
+ for csv_row in segment_csv[segment_csv["segment_id"] == segment_id].index:
+
+In the second loop, a dictionary of the values that are contained in a certain row of the csv
+is created.
+
+.. code-block:: python
+
+ dictionary_probability_element = {
+ "SoilProfileName": segment_csv["soilprofile_id"][csv_row],
+ "SoilProfileType": dpi.SoilProfileTypeClass.ProfileType1D,
+ "Probability": segment_csv["probability"][csv_row],
+ "SegmentFailureMechanismType": get_failure_mechanism(
+ segment_csv["calculation_type"][csv_row]
+ ),
+ }
+
+
+This dictionary can be used to initialize class :py:class:`dampythoninterface.segment.SoilGeometryProbabilityElement`,
+which can be directly appended to the list_of_probability_elements of the segment
+
+.. code-block:: python
+
+ list_of_probability_elements.append(
+ dpi.SoilGeometryProbabilityElement(
+ **dictionary_probability_element
+ )
+ )
+
+After running the second loop the :py:class:`dampythoninterface.segment.Segment` class is initiazed
+and appended to the segments list.
+
+.. code-block:: python
+
+ # create segment and append it to the segment list
+ segments_list.append(
+ Segment(
+ Name=str(segment_id),
+ SoilGeometryProbability=list_of_probability_elements,
+ )
+ )
\ No newline at end of file
Index: DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/.doctrees/tutorial_sections/setting_up_dam_input_and_executing.doctree
===================================================================
diff -u
Binary files differ
Index: DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/tutorial_sections/soil_profile_1d_coders_snippet.html
===================================================================
diff -u
--- DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/tutorial_sections/soil_profile_1d_coders_snippet.html (revision 0)
+++ DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/tutorial_sections/soil_profile_1d_coders_snippet.html (revision 3556)
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+ Creating profiles class from soilprofiles.csv file code snippet — DamPythonInterface 0.1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Creating profiles class from soilprofiles.csv file code snippet¶
+
importdampythoninterfaceasdpi
+importpandasaspd
+
+defread_profile(file_name:str):
+ # read csv file using pandas
+ profile_csv=pd.read_csv(file_name,delimiter=";")
+ # initialize profile list that will be used for the dam input
+ profile_list=[]
+ # Loop through all unique profile names of the csv
+ forprofile_idinprofile_csv["soilprofile_id"].unique():
+ list_of_1D_layers=[]
+ forcsv_rowinprofile_csv[profile_csv["soilprofile_id"]==profile_id].index:
+ if"zand"inprofile_csv["soil_name"][csv_row]:
+ is_aquifer=True
+ else:
+ is_aquifer=False
+ list_of_1D_layers.append(
+ dpi.Layer1D(
+ **{
+ "Name":profile_csv["soil_name"][csv_row],
+ "SoilName":profile_csv["soil_name"][csv_row],
+ "TopLevel":profile_csv["top_level"][csv_row],
+ "IsAquifer":is_aquifer,
+ "WaterpressureInterpolationModel":dpi.WaterpressureInterpolationModelType.Automatic,
+ }
+ )
+ )
+ # create profile and append it to the profile list
+ profile_list.append(
+ dpi.SoilProfile1D(
+ Name=str(profile_id),
+ BottomLevel=-30,
+ Layers1D=list_of_1D_layers,
+ )
+ )
+ returnprofile_list
+
+ if__name__=="__main__":
+ # In this case only 1D segments will be inputted
+ profiles=read_profile("soilprofiles.csv")
+
The DamPythonInterface tool uses the Pydantic module to define the types of inputs a class should have.
+However, creating a class instance is the same as with any python class.
+To know more about how you can do that refer to PythonClasses were several examples are given.
+The first example in the Pydantic page ia also a good resource.
+
+
+
+
+
+
+
\ No newline at end of file
Index: DamClients/DamPythonInterface/branches/21.1/doc/source/release_notes.rst
===================================================================
diff -u -r3543 -r3556
--- DamClients/DamPythonInterface/branches/21.1/doc/source/release_notes.rst (.../release_notes.rst) (revision 3543)
+++ DamClients/DamPythonInterface/branches/21.1/doc/source/release_notes.rst (.../release_notes.rst) (revision 3556)
@@ -1,8 +1,8 @@
Release notes
=============
-Version 21.1.500.xxx
---------------------
+Version 21.1.500.3550.57
+------------------------
First version of the DamPythonInterface a Python API to create and run a DAMEngine input xml.
The following functionality is implemented:
Index: DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/tutorial_sections/setting_up_dam_input_and_executing.html
===================================================================
diff -u
--- DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/tutorial_sections/setting_up_dam_input_and_executing.html (revision 0)
+++ DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/tutorial_sections/setting_up_dam_input_and_executing.html (revision 3556)
@@ -0,0 +1,172 @@
+
+
+
+
+
+
+
+
+ Setting up the input class and executing the calculation — DamPythonInterface 0.1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Setting up the input class and executing the calculation¶
+
Finally the user cab set up the more general settings of the
+dampythoninterface.stability_parameters.StabilityParameters class.
+An example is shown in the following code snippet.
+Note that despite the grid determination being Automatic the user DamPythonInterface tool cannot determine
+the Uplift Van grid values. Thus, they should be manually inputted.
After the calculation is run the user can access the output by parsing the xml in Python.
+The user can also use the output.
+For example, in this case the user outputs the safety factor.
+
importxml.etree.cElementTreeaset
+
+# read output xml
+tree=et.parse(str(xml_dam_output))
+root=tree.getroot()
+stability_results=(
+ root.find("Results")
+ .find("CalculationResults")
+ .find("DesignResults")
+ .find("StabilityDesignResults")
+)
+safety_factor=stability_results.get("SafetyFactor")
+print("DAM produced a safety factor of ",safety_factor)
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/.doctrees/dev/input.doctree
===================================================================
diff -u
Binary files differ
Index: DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/searchindex.js
===================================================================
diff -u
--- DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/searchindex.js (revision 0)
+++ DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/searchindex.js (revision 3556)
@@ -0,0 +1 @@
+Search.setIndex({docnames:["dev/input","dev/tips","index","release_notes","tutorial","tutorial_sections/full_tutorial_snippet","tutorial_sections/locations_csv_tutorial","tutorial_sections/locations_tutorial_snippet","tutorial_sections/segment_csv_tutorial","tutorial_sections/segment_tutorial_snippet","tutorial_sections/setting_up_dam_input_and_executing","tutorial_sections/soil_materials_code_snippet","tutorial_sections/soil_materials_tutorial","tutorial_sections/soil_profile_1d_coders_snippet","tutorial_sections/soil_profile_1d_csv_tutorial","tutorial_sections/surface_lines_csv_tutorial","tutorial_sections/surface_lines_snippet"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,sphinx:56},filenames:["dev\\input.rst","dev\\tips.rst","index.rst","release_notes.rst","tutorial.rst","tutorial_sections\\full_tutorial_snippet.rst","tutorial_sections\\locations_csv_tutorial.rst","tutorial_sections\\locations_tutorial_snippet.rst","tutorial_sections\\segment_csv_tutorial.rst","tutorial_sections\\segment_tutorial_snippet.rst","tutorial_sections\\setting_up_dam_input_and_executing.rst","tutorial_sections\\soil_materials_code_snippet.rst","tutorial_sections\\soil_materials_tutorial.rst","tutorial_sections\\soil_profile_1d_coders_snippet.rst","tutorial_sections\\soil_profile_1d_csv_tutorial.rst","tutorial_sections\\surface_lines_csv_tutorial.rst","tutorial_sections\\surface_lines_snippet.rst"],objects:{"dampythoninterface.input":{DamInput:[0,1,1,""],FailureMechanismSystem:[0,1,1,""],StabilityType:[0,1,1,""]},"dampythoninterface.input.DamInput":{CalculationMap:[0,2,1,""],ExportToXml:[0,3,1,""],FailureMechanismSystemType:[0,2,1,""],Locations:[0,2,1,""],MaxCalculationCores:[0,2,1,""],ProjectPath:[0,2,1,""],Segments:[0,2,1,""],SoilProfiles1D:[0,2,1,""],Soils:[0,2,1,""],StabilityModelType:[0,2,1,""],StabilityParameters:[0,2,1,""],SurfaceLines:[0,2,1,""],execute:[0,3,1,""],segment_contains_existing_profile:[0,3,1,""],soil_profiles_contain_soils:[0,3,1,""]},"dampythoninterface.input.FailureMechanismSystem":{HorizontalBalance:[0,2,1,""],Piping:[0,2,1,""],StabilityInside:[0,2,1,""],StabilityOutside:[0,2,1,""]},"dampythoninterface.input.StabilityType":{Bishop:[0,2,1,""],BishopUpliftVan:[0,2,1,""],UpliftVan:[0,2,1,""],UpliftVanWti:[0,2,1,""]},"dampythoninterface.location":{DesignOptions:[0,1,1,""],DesignScenario:[0,1,1,""],DikeSoilScenarioType:[0,1,1,""],General:[0,1,1,""],IntrusionVerticalWaterPressureType:[0,1,1,""],Location:[0,1,1,""],PhreaticLineCreationMethodType:[0,1,1,""],StabilityDesignMethodType:[0,1,1,""],StabilityOptions:[0,1,1,""],WaternetOptions:[0,1,1,""],ZoneTypeClass:[0,1,1,""]},"dampythoninterface.location.DesignOptions":{NewDepthDitch:[0,2,1,""],NewDikeSlopeInside:[0,2,1,""],NewDikeSlopeOutside:[0,2,1,""],NewDikeTopWidth:[0,2,1,""],NewMaxHeightShoulderAsFraction:[0,2,1,""],NewMinDistanceDikeToeStartDitch:[0,2,1,""],NewShoulderBaseSlope:[0,2,1,""],NewShoulderTopSlope:[0,2,1,""],NewSlopeAngleDitch:[0,2,1,""],NewWidthDitchBottom:[0,2,1,""],RedesignDikeHeight:[0,2,1,""],RedesignDikeShoulder:[0,2,1,""],ShoulderEmbankmentMaterial:[0,2,1,""],SlopeAdaptionEndCotangent:[0,2,1,""],SlopeAdaptionStartCotangent:[0,2,1,""],SlopeAdaptionStepCotangent:[0,2,1,""],StabilityDesignMethod:[0,2,1,""],StabilityShoulderGrowDeltaX:[0,2,1,""],StabilityShoulderGrowSlope:[0,2,1,""],StabilitySlopeAdaptionDeltaX:[0,2,1,""],UseNewDitchDefinition:[0,2,1,""]},"dampythoninterface.location.DesignScenario":{DikeTableHeight:[0,2,1,""],HeadPl2:[0,2,1,""],HeadPl3:[0,2,1,""],HeadPl4:[0,2,1,""],Id:[0,2,1,""],PlLineOffsetBelowDikeCrestMiddle:[0,2,1,""],PlLineOffsetBelowDikeToeAtPolder:[0,2,1,""],PlLineOffsetBelowDikeTopAtPolder:[0,2,1,""],PlLineOffsetBelowDikeTopAtRiver:[0,2,1,""],PlLineOffsetBelowShoulderBaseInside:[0,2,1,""],PlLineOffsetFactorBelowShoulderCrest:[0,2,1,""],PolderLevel:[0,2,1,""],RequiredSafetyFactorPiping:[0,2,1,""],RequiredSafetyFactorStabilityInnerSlope:[0,2,1,""],RequiredSafetyFactorStabilityOuterSlope:[0,2,1,""],RiverLevel:[0,2,1,""],RiverLevelLow:[0,2,1,""],UpliftCriterionPiping:[0,2,1,""],UpliftCriterionStability:[0,2,1,""]},"dampythoninterface.location.DikeSoilScenarioType":{ClayDikeOnClay:[0,2,1,""],ClayDikeOnSand:[0,2,1,""],SandDikeOnClay:[0,2,1,""],SandDikeOnSand:[0,2,1,""]},"dampythoninterface.location.General":{Description:[0,2,1,""],HeadPL2:[0,2,1,""],HeadPL3:[0,2,1,""],HeadPL4:[0,2,1,""]},"dampythoninterface.location.IntrusionVerticalWaterPressureType":{FullHydroStatic:[0,2,1,""],HydroStatic:[0,2,1,""],Linear:[0,2,1,""],SemiTimeDependent:[0,2,1,""],Standard:[0,2,1,""]},"dampythoninterface.location.Location":{DesignOptions:[0,2,1,""],DesignScenarios:[0,2,1,""],DikeEmbankmentMaterial:[0,2,1,""],DistanceToEntryPoint:[0,2,1,""],General:[0,2,1,""],Name:[0,2,1,""],SegmentName:[0,2,1,""],StabilityOptions:[0,2,1,""],SurfaceLineName:[0,2,1,""],WaternetOptions:[0,2,1,""],XSoilGeometry2DOrigin:[0,2,1,""],serialize:[0,3,1,""]},"dampythoninterface.location.PhreaticLineCreationMethodType":{ExpertKnowledgeLinearInDike:[0,2,1,""],ExpertKnowledgeRRD:[0,2,1,""],GaugesWithFallbackToExpertKnowledgeRRD:[0,2,1,""],NONE:[0,2,1,""],Sensors:[0,2,1,""]},"dampythoninterface.location.StabilityDesignMethodType":{OptimizedSlopeAndShoulderAdaption:[0,2,1,""],SlopeAdaptionBeforeShoulderAdaption:[0,2,1,""]},"dampythoninterface.location.StabilityOptions":{ForbiddenZoneFactor:[0,2,1,""],MapForSoilgeometries2D:[0,2,1,""],MinimumCircleDepth:[0,2,1,""],SoilDatabaseName:[0,2,1,""],TrafficLoad:[0,2,1,""],TrafficLoadDegreeOfConsolidation:[0,2,1,""],ZoneAreaRestSlopeCrestWidth:[0,2,1,""],ZoneType:[0,2,1,""]},"dampythoninterface.location.WaternetOptions":{DampingFactorPl3:[0,2,1,""],DampingFactorPl4:[0,2,1,""],DikeSoilScenario:[0,2,1,""],IntrusionVerticalWaterPressure:[0,2,1,""],PenetrationLength:[0,2,1,""],PhreaticLineCreationMethod:[0,2,1,""],SlopeDampingFactor:[0,2,1,""]},"dampythoninterface.location.ZoneTypeClass":{ForbiddenZones:[0,2,1,""],NoZones:[0,2,1,""],ZoneAreas:[0,2,1,""]},"dampythoninterface.segment":{Segment:[0,1,1,""],SegmentFailureMechanismTypeClass:[0,1,1,""],SoilGeometryProbabilityElement:[0,1,1,""],SoilProfileTypeClass:[0,1,1,""]},"dampythoninterface.segment.Segment":{Name:[0,2,1,""],SoilGeometryProbability:[0,2,1,""],serialize:[0,3,1,""]},"dampythoninterface.segment.SegmentFailureMechanismTypeClass":{All:[0,2,1,""],Liquefaction:[0,2,1,""],Piping:[0,2,1,""],Stability:[0,2,1,""]},"dampythoninterface.segment.SoilGeometryProbabilityElement":{Probability:[0,2,1,""],SegmentFailureMechanismType:[0,2,1,""],SoilProfileName:[0,2,1,""],SoilProfileType:[0,2,1,""],serialize:[0,3,1,""]},"dampythoninterface.segment.SoilProfileTypeClass":{ProfileType1D:[0,2,1,""],ProfileType2D:[0,2,1,""],ProfileTypeStiFile:[0,2,1,""]},"dampythoninterface.soil":{DilatancyTypeModel:[0,1,1,""],ShearStrengthModelType:[0,1,1,""],Soil:[0,1,1,""]},"dampythoninterface.soil.DilatancyTypeModel":{MinusPhi:[0,2,1,""],Phi:[0,2,1,""],Zero:[0,2,1,""]},"dampythoninterface.soil.ShearStrengthModelType":{CPhi:[0,2,1,""],CPhiOrSuCalculated:[0,2,1,""],NONE:[0,2,1,""],PseudoValues:[0,2,1,""],StressTable:[0,2,1,""],SuCalculated:[0,2,1,""],SuCalculatedWithYield:[0,2,1,""],SuGradient:[0,2,1,""],SuMeasured:[0,2,1,""]},"dampythoninterface.soil.Soil":{AbovePhreaticLevel:[0,2,1,""],BeddingAngle:[0,2,1,""],BelowPhreaticLevel:[0,2,1,""],Cohesion:[0,2,1,""],DiameterD70:[0,2,1,""],DiameterD90:[0,2,1,""],DilatancyType:[0,2,1,""],DryUnitWeight:[0,2,1,""],FrictionAngle:[0,2,1,""],Name:[0,2,1,""],Ocr:[0,2,1,""],PermeabKx:[0,2,1,""],RRatio:[0,2,1,""],RatioCuPc:[0,2,1,""],ShearStrengthModel:[0,2,1,""],SlopeRestProfile:[0,2,1,""],StrengthIncreaseExponent:[0,2,1,""],UseDefaultShearStrengthModel:[0,2,1,""],WhitesConstant:[0,2,1,""],serialize_soil:[0,3,1,""]},"dampythoninterface.soilprofile1D":{Layer1D:[0,1,1,""],SoilProfile1D:[0,1,1,""],WaterpressureInterpolationModelType:[0,1,1,""]},"dampythoninterface.soilprofile1D.Layer1D":{IsAquifer:[0,2,1,""],Name:[0,2,1,""],SoilName:[0,2,1,""],TopLevel:[0,2,1,""],WaterpressureInterpolationModel:[0,2,1,""],serialize:[0,3,1,""]},"dampythoninterface.soilprofile1D.SoilProfile1D":{BottomLevel:[0,2,1,""],Layers1D:[0,2,1,""],Name:[0,2,1,""],serialize:[0,3,1,""]},"dampythoninterface.soilprofile1D.WaterpressureInterpolationModelType":{Automatic:[0,2,1,""],Hydrostatic:[0,2,1,""]},"dampythoninterface.stability_parameters":{BishopTangentLinesDefinitionType:[0,1,1,""],GridDeterminationType:[0,1,1,""],SearchMethodType:[0,1,1,""],StabilityParameters:[0,1,1,""],UpliftVanTangentLinesDefinitionType:[0,1,1,""]},"dampythoninterface.stability_parameters.BishopTangentLinesDefinitionType":{OnBoundaryLines:[0,2,1,""],Specified:[0,2,1,""]},"dampythoninterface.stability_parameters.GridDeterminationType":{Automatic:[0,2,1,""],Specified:[0,2,1,""]},"dampythoninterface.stability_parameters.SearchMethodType":{Calculationgrid:[0,2,1,""],GeneticAlgorithm:[0,2,1,""]},"dampythoninterface.stability_parameters.StabilityParameters":{BishopGridHorizontalPointsCount:[0,2,1,""],BishopGridHorizontalPointsDistance:[0,2,1,""],BishopGridVerticalPointsCount:[0,2,1,""],BishopGridVerticalPointsDistance:[0,2,1,""],BishopTangentLinesDefinition:[0,2,1,""],BishopTangentLinesDistance:[0,2,1,""],GridDetermination:[0,2,1,""],SearchMethod:[0,2,1,""],UpliftVanGridLeftHorizontalPointsCount:[0,2,1,""],UpliftVanGridLeftHorizontalPointsDistance:[0,2,1,""],UpliftVanGridLeftVerticalPointsCount:[0,2,1,""],UpliftVanGridLeftVerticalPointsDistance:[0,2,1,""],UpliftVanGridRightHorizontalPointsCount:[0,2,1,""],UpliftVanGridRightHorizontalPointsDistance:[0,2,1,""],UpliftVanGridRightVerticalPointsCount:[0,2,1,""],UpliftVanGridRightVerticalPointsDistance:[0,2,1,""],UpliftVanTangentLinesDefinition:[0,2,1,""],UpliftVanTangentLinesDistance:[0,2,1,""],serialize:[0,3,1,""]},"dampythoninterface.stability_parameters.UpliftVanTangentLinesDefinitionType":{OnBoundaryLines:[0,2,1,""],Specified:[0,2,1,""]},"dampythoninterface.surface_line":{Point:[0,1,1,""],PointTypeEnum:[0,1,1,""],SurfaceLine:[0,1,1,""]},"dampythoninterface.surface_line.Point":{PointType:[0,2,1,""],X:[0,2,1,""],Z:[0,2,1,""]},"dampythoninterface.surface_line.PointTypeEnum":{BottomDitchDikeSide:[0,2,1,""],BottomDitchPolderSide:[0,2,1,""],DikeLine:[0,2,1,""],DikeToeAtPolder:[0,2,1,""],DikeToeAtRiver:[0,2,1,""],DikeTopAtPolder:[0,2,1,""],DikeTopAtRiver:[0,2,1,""],DitchDikeSide:[0,2,1,""],DitchPolderSide:[0,2,1,""],NONE:[0,2,1,""],ShoulderBaseInside:[0,2,1,""],ShoulderBaseOutside:[0,2,1,""],ShoulderTopInside:[0,2,1,""],ShoulderTopOutside:[0,2,1,""],SurfaceLevelInside:[0,2,1,""],SurfaceLevelOutside:[0,2,1,""],TrafficLoadInside:[0,2,1,""],TrafficLoadOutside:[0,2,1,""]},"dampythoninterface.surface_line.SurfaceLine":{Name:[0,2,1,""],Points:[0,2,1,""],check_that_necessary_points_exist:[0,3,1,""],is_type_in_list:[0,3,1,""],raise_error_if_point_does_not_exist:[0,3,1,""],serialize:[0,3,1,""]},dampythoninterface:{input:[0,0,0,"-"],location:[0,0,0,"-"],segment:[0,0,0,"-"],soil:[0,0,0,"-"],soilprofile1D:[0,0,0,"-"],stability_parameters:[0,0,0,"-"],surface_line:[0,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","attribute","Python attribute"],"3":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:class","2":"py:attribute","3":"py:method"},terms:{"0":[0,2,4,6,7,10,15,16],"1":[0,2,4,6,7,15,16],"10":0,"11":0,"12":0,"13":0,"14":[0,4,10],"15":0,"16":0,"17":0,"18":0,"19":0,"1d":[2,4,13,14],"2":[0,4,10],"208":0,"25":[0,4,10],"2d":0,"3":[0,4,10,15,16],"30":[4,13,14],"36":[4,10],"37":0,"5":0,"518":2,"6":[0,4,10],"7":0,"70":0,"8":0,"9":0,"90":0,"case":[4,6,8,10,13,15],"class":[0,2],"default":[0,2],"do":[0,1,4,15],"enum":[0,4,15],"export":[0,4,10,12],"final":[4,6,10,15],"float":0,"function":[0,2,3,4,6,8,12,14,15],"import":[4,6,7,8,9,10,13,14,15,16],"int":0,"new":[0,4,8],"return":[4,7,8,9,11,13,14,15,16],"static":0,"true":[4,13,14],A:[2,4,14,15],And:[4,12],For:[2,4,8,10,15],If:[4,14],In:[4,6,8,13,15],That:[4,14],The:[0,1,3,4,6,8,10,12,14,15],Then:[4,6,8,14,15],There:[4,8],These:[4,15],To:[1,4,6,12,14,15],_:[4,15,16],__analysistype__:0,__damprojecttype__:0,__main__:[7,9,11,13,16],__name__:[7,9,11,13,16],__xmlns_xsd__:0,__xmlns_xsi__:0,abil:2,about:[1,4],abov:[0,4,6],abovephreaticlevel:[0,11],access:[4,10],actual:[4,15],adapt:0,after:[4,8,10,15],all:[0,2,4,6,7,8,9,11,13,14,15,16],also:[1,2,4,10,15],an:[0,2,4,10,15],analysi:0,angl:0,ani:[1,2],anyth:2,api:[3,4],append:[4,6,7,8,9,11,13,14,15,16],aquif:0,ar:[0,1,2,4,6,8,12,15,16],area:0,ascend:[4,15],assign:[0,4,15],automat:[0,4,10,13,14],avail:0,base:[0,4,6,15,16],basic:2,bed:0,beddingangl:0,being:[4,10],below:[0,4,12,15],belowphreaticlevel:[0,11],between:[0,4,15],binnenberm:[4,15,16],binnentalud:[4,15,16],binnenwaart:[4,15,16],bishop:0,bishopgridhorizontalpointscount:0,bishopgridhorizontalpointsdist:0,bishopgridverticalpointscount:0,bishopgridverticalpointsdist:0,bishoptangentlinesdefinit:[0,4,10],bishoptangentlinesdefinitiontyp:[0,4,10],bishoptangentlinesdist:0,bishopupliftvan:0,bool:0,bottom:0,bottomditchdikesid:[0,4,15,16],bottomditchpoldersid:[0,4,15,16],bottomlevel:[0,4,13,14],buitenberm:[4,15,16],buitentalud:[4,15,16],buitenwaart:[4,15,16],bypass:2,cab:[4,10],calcul:[0,14],calculation_typ:[4,8,9],calculationgrid:[0,4,10],calculationmap:0,calculationresult:[4,10],can:[0,1,2,3,4,6,8,10,12,14,15,16],cannot:[4,10,14],care:2,celementtre:[4,10],certain:[4,8,14,15],char_point:[4,15,16],char_type_point:[4,15,16],characterist:[0,4,15],characteristic_point:[4,15,16],characteristic_point_typ:[4,15,16],characteristic_points_csv:[4,15,16],characteristic_points_result:[4,15,16],check:[4,15,16],check_that_necessary_points_exist:0,circl:0,classmethod:0,claydikeonclai:[0,4,6,7],claydikeonsand:0,code:[4,6,8,10,12,15],cohes:[0,11],collect:4,column:[4,6,15,16],column_group:[4,15,16],combin:[4,15],consolid:0,constant:0,contain:[0,2,4,8,15],coordin:[0,4,15,16],core:0,correct:[4,8],correspond:0,cotang:0,cover:2,cphi:[0,11],cphiorsucalcul:0,creat:[2,3,10],creation:0,crest:0,criterion:0,csv_row:[4,8,9,13,14],csv_zone_typ:7,cu:0,d:[0,4,15,16],dam:[2,6,7,8,9,10,11,12,13,14,15],dam_input:[4,10],damengin:[0,2,3],daminput:[2,4,6,10],damp:0,dampingfactorpl3:[0,4,6,7],dampingfactorpl4:[0,4,6,7],dampythoninterfac:[0,3,4,6,7,8,9,10,12,13,14,15,16],damui:[4,12],databas:0,dataclass:0,def:[4,7,8,9,11,13,15,16],defin:[1,2,4,6,10,15,16],definit:0,degre:0,delimit:[4,6,7,8,9,11,13,14,15,16],delta:0,dempingsfactor_pl3:[4,6,7],dempingsfactor_pl4:[4,6,7],deped:2,depth:0,descript:0,design:[0,4,6,7],design_opt:[4,6,7],design_scenario:[4,6,7],designopt:[0,4,6,7],designresult:[4,10],designscenario:[0,4,6,7],despit:[4,10],determin:[0,4,10],diameterd70:[0,11],diameterd90:0,dict:[4,15,16],dictionari:[4,7,8,15,16],dictionary_probability_el:[4,8],differ:[0,2,4,8,9,15],dijk:[4,15,16],dijkzijd:[4,15,16],dike:0,dike_table_height:[4,6,7],dikeembankmentmateri:[0,4,6,7],dikelin:[0,4,15,16],dikesoilscenario:[0,4,6,7],dikesoilscenariotyp:[0,4,6,7],diketableheight:[0,4,6,7],diketoeatpold:[0,4,15,16],diketoeatriv:[0,4,15,16],diketopatpold:[0,4,15,16],diketopatriv:[0,4,15,16],dilat:0,dilatancytyp:0,dilatancytypemodel:0,direct:0,directli:[4,8,12],distanc:0,distancetoentrypoint:0,distribut:0,ditch:0,ditchdikesid:[0,4,15,16],ditchpoldersid:[0,4,15,16],document:4,don:2,done:[4,15],download:[2,4],dpi:[4,6,7,8,9,10,11,13,14,15,16],dry:0,dryunitweight:0,duplic:[4,15,16],each:[4,6,8,12,14,15,16],element:0,els:[4,13,14],embank:0,empti:[4,15],end:0,engin:2,entri:0,enumer:[0,4,8],establish:[4,15],et:[4,10],etre:[0,4,10],everi:[4,15],exampl:[1,4,8,10],execut:0,expertknowledgelinearindik:0,expertknowledgerrd:0,expon:0,exporttoxml:[0,4,10],extract:[4,8,14,15],factor:[0,4,10],failur:0,failuremechanismsystem:[0,4,10],failuremechanismsystemtyp:[0,4,10],fals:[0,4,13,14,16],file:[0,2,3,6,7,8,9,10,11,12,15,16],file_nam:[4,13,14,15,16],fill:[4,15],find:[4,10],first:[1,2,3,4,8,15],firstli:[4,6],folder:0,follow:[3,4,8,10,15],forbidden:0,forbiddenzon:[0,7],forbiddenzonefactor:0,format:0,found:[2,4,15],fractil:0,fraction:0,friction:0,frictionangl:[0,11],from:[2,15],fromkei:[4,15,16],full:4,fullhydrostat:0,gaugeswithfallbacktoexpertknowledgerrd:0,gener:[0,2,4,10],geneticalgorithm:0,geolib:2,geometri:0,get:[2,4,8,10,15,16],get_characteristic_point_typ:[4,15,16],get_failure_mechan:[4,8,9],get_x:[4,15,16],get_zone_typ:[4,6,7],getroot:[4,10],given:[1,4,6,8,15],go:4,goe:[4,14],good:1,grain:0,grid:[0,4,10],griddetermin:[0,4,10],griddeterminationtyp:[0,4,10],grow:0,ha:[0,4,15],hardcod:[4,14],have:[1,4,8,15,16],head_pl2:[4,6,7],head_pl3:[4,6,7],headpl2:[0,4,6,7],headpl3:[0,4,6,7],headpl4:0,heavi:2,height:0,helper:[4,15],here:4,horizont:0,horizontalbal:0,how:[4,8],howev:1,hydrostat:0,ia:1,id:[0,4,6,7,8,12,14,15],implement:3,includ:[0,4,15],increas:0,index:[2,4,6,7,8,9,11,13,14],index_col:16,inform:0,initi:[4,6,7,8,9,11,13,14,15],initiaz:[4,8],inner:0,input:[1,2,3,6,7,8,9,11,12,13,14,15],inputtutorialfil:[4,10],insid:0,insteek:[4,15,16],intent:[4,15],intermedi:0,interpol:0,intrus:0,intrusionverticalwaterpressur:[0,4,6,7],intrusionverticalwaterpressuretyp:[0,4,6,7],is_aquif:[4,13,14],is_type_in_list:0,isaquif:[0,4,13,14],isin:[4,15,16],item:[4,15,16],iterrow:[4,6,7,11],kant:[4,15,16],kei:[4,15,16],know:1,kruin:[4,15,16],kwarg:0,later:[4,6,8,12,14],layer1d:[0,4,13,14],layer:[0,4,14],layers1d:[0,4,13,14],left:0,length:0,let:[4,8],level:0,limit:2,line:0,linear:0,liquefact:[0,4,8,9],list:[0,4,6,7,8,9,11,12,13,14,15,16],list_of_1d_lay:[4,13,14],list_of_point:0,list_of_probability_el:[4,8,9],load:0,locat:[2,3,10,12,15,16],location_csv:[4,6,7],location_csv_nam:[4,6,7],location_id:[4,6,7,15,16],locationid:[4,15,16],locations_list:[4,6,7],loop:[4,6,7,8,9,11,13,14,15,16],lower:0,lowest:0,lxml:0,m:[0,11],maaiveld:[4,15,16],main:2,manag:2,manual:[2,4,10],map:0,mapforsoilgeometries2d:0,materi:[0,11],max:2,maxcalculationcor:0,maximum:0,mechan:0,merg:[4,6,7,15,16],merged_csv:[4,6,7],method:0,middl:0,min:2,minimal_circle_depth:[4,6,7],minimum:0,minimumcircledepth:[0,4,6,7],minusphi:0,model:[0,4,8],modul:[1,2,4,14,15],more:[1,2,4,10],name:[0,4,6,7,8,9,10,11,13,14,15,16],nan:[4,15,16],need:[2,4,15],newdepthditch:[0,4,6,7],newdikeslopeinsid:[0,4,6,7],newdikeslopeoutsid:[0,4,6,7],newdiketopwidth:[0,4,6,7],newmaxheightshoulderasfract:[0,4,6,7],newmindistancediketoestartditch:[0,4,6,7],newshoulderbaseslop:[0,4,6,7],newshouldertopslop:[0,4,6,7],newslopeangleditch:[0,4,6,7],newwidthditchbottom:[0,4,6,7],none:[0,2,4,15,16],normal:4,note:[4,10,14,15],nozon:[0,7],number:[0,2],occur:0,ocr:0,od:[4,12],offset:0,onboundarylin:[0,4,10],one:[1,4,6,15,16],onli:[4,6,13],ophoogmateriaalberm:[4,6,7],ophoogmateriaaldijk:[4,6,7],optimizedslopeandshoulderadapt:[0,4,6,7],option:[0,4,6,7],order:[4,15],origin:0,otherwis:[4,14],outdat:0,outer:0,output:[4,10],output_dictionari:[4,8,9,15,16],outputtutorialxml:[4,10],outsid:0,overconsolid:0,page:[1,2],panda:[4,6,7,8,9,11,12,13,14,15,16],paramet:[2,4,10],pars:[4,10],part:2,path:[0,4,10],pathlib:0,pc:[0,11],pd:[4,6,7,8,9,11,13,14,15,16],penetr:0,penetrationlength:[0,4,6,7],pep:2,perform:[4,14],permeabilityx:11,permeabkx:[0,11],permeabl:0,phi:0,phreatic:0,phreaticlinecreationmethod:[0,4,6,7],phreaticlinecreationmethodtyp:0,pip:2,pipe:[0,4,8,9,14],pl3:0,pl4:0,placehold:1,plline:0,pllinecreationmethod:[4,6,7],pllineoffsetbelowdikecrestmiddl:0,pllineoffsetbelowdiketoeatpold:[0,4,6,7],pllineoffsetbelowdiketopatpold:[0,4,6,7],pllineoffsetbelowdiketopatriv:[0,4,6,7],pllineoffsetbelowshoulderbaseinsid:[0,4,6,7],pllineoffsetfactorbelowshouldercrest:0,poetri:2,point:[0,4,15,16],point_typ:[4,15,16],pointtyp:[0,4,15,16],pointtypeenum:[0,4,15,16],polder:0,polderlevel:[0,4,6,7],polderzijd:[4,15,16],pore:0,pressur:0,print:[4,10],probabl:[0,4,8,9],produc:[4,10],profil:[2,6,7,10],profile_csv:[4,13,14],profile_id:[4,13,14],profile_list:[4,13,14],profiletype1d:[0,4,8,9],profiletype2d:0,profiletypestifil:0,project:0,projectpath:[0,4,10],propabl:0,properli:2,properti:[0,4,14],pseudovalu:0,py3:2,pydant:[1,2],python:[3,4,10],pythonclass:1,r:0,raise_error_if_point_does_not_exist:0,ratio:0,ratiocupc:[0,11],ratiosu:11,read:[6,7,8,9,10,11,12,13,14],read_characteristic_point:[4,15,16],read_characteristic_points_csv:[4,15],read_csv:[4,6,7,8,9,11,13,14,15,16],read_locations_csv:[4,6,7],read_profil:13,read_soilmaterials_csv:[4,11,12],read_surface_lines_csv:[4,15,16],reader:[4,12],redesign:0,redesigndikeheight:[0,4,6,7],redesigndikeshould:[0,4,6,7],refer:[1,2,4,12],referentielijn:[4,15,16],relat:0,relationship:[4,15],relev:[4,15,16],relevant_column:[4,15,16],remov:[4,15,16],replac:2,requir:[0,2],required_point_typ:0,requiredsafetyfactorpip:[0,4,6,7],requiredsafetyfactorstabilityinnerslop:[0,4,6,7],requiredsafetyfactorstabilityouterslop:[0,4,6,7],reshap:[4,15,16],resourc:1,rest:0,result:[4,8,10],result_cod:[4,10],retriev:[4,15],right:0,river:0,riverlevel:[0,4,6,7],riverlevellow:[0,4,6,7],root:[4,10],row:[4,6,7,8,11,12,14,15,16],row_csv:[4,15,16],rratio:0,run:[0,2,3,4,8,10],s:0,safeti:[0,4,10],safety_factor:[4,10],safety_factor_pip:[4,6,7],safety_factor_stability_inner_slop:[4,6,7],safety_factor_stability_outer_slop:[4,6,7],safetyfactor:[4,10],same:[1,4,8],sand:[4,14],sanddikeonclai:0,sanddikeonsand:0,saturatedunitweight:11,scenario:[0,4,6,7],scenario_csv:[4,6,7],scenario_csv_nam:[4,6,7],search:[0,2],searchmethod:[0,4,10],searchmethodtyp:[0,4,10],second:[4,8,14],section:[3,4,15],see:2,seen:[4,8,15],segment:[2,3,10,13],segment_contains_existing_profil:0,segment_csv:[4,8,9],segment_id:[4,6,7,8,9],segmentfailuremechanismtyp:[0,4,8,9],segmentfailuremechanismtypeclass:[0,4,8,9],segmentnam:[0,4,6,7],segments_list:[4,8,9,10],select:0,semitimedepend:0,sensor:0,separ:[4,15,16],serial:0,serialize_soil:0,set:[0,14],setuptool:2,sever:[1,4,8],shear:0,shearstrengthmodel:[0,11],shearstrengthmodeltyp:[0,11],should:[0,1,2,4,10],shoulder:0,shoulderbaseinsid:[0,4,15,16],shoulderbaseoutsid:[0,4,15,16],shoulderembankmentmateri:[0,4,6,7],shouldertopinsid:[0,4,15,16],shouldertopoutsid:[0,4,15,16],show:[4,8],shown:[4,10],side:0,simpl:[4,15],size:0,skeleton:2,sloot:[4,15,16],slootbodem:[4,15,16],slope:0,slopeadaptionbeforeshoulderadapt:0,slopeadaptionendcotang:[0,4,6,7],slopeadaptionstartcotang:[0,4,6,7],slopeadaptionstepcotang:[0,4,6,7],slopedampingfactor:[0,4,6,7],sloperestprofil:0,snippet:[4,6,8,10,12,15],so:[4,15,16],softwar:2,soil:[2,3,10,14],soil_nam:[4,13,14],soil_profil:[4,8,9],soil_profiles_contain_soil:0,soildatabasenam:0,soilgeometryprob:[0,4,8,9],soilgeometryprobabilityel:[0,4,8,9],soilmaterials_csv_nam:11,soilnam:[0,4,13,14],soilprofile1d:[0,4,13,14],soilprofile_id:[4,8,9,13,14],soilprofilenam:[0,4,8,9],soilprofiles1d:[0,3,4,10],soilprofiletyp:[0,4,8,9],soilprofiletypeclass:[0,4,8,9],soils_csv:11,soils_list:11,some:2,sort:[4,15,16],specifi:[0,2,3],split:[4,15,16],stabil:[2,4,6,7,8,9,10],stability_opt:[4,6,7],stability_paramet:[0,4,10],stability_result:[4,10],stabilitydesignmethod:[0,4,6,7],stabilitydesignmethodtyp:[0,4,6,7],stabilitydesignresult:[4,10],stabilityinsid:[0,4,10],stabilitymodeltyp:[0,4,10],stabilityopt:[0,4,6,7],stabilityoutsid:0,stabilityparamet:[0,3,4,10],stabilityshouldergrowdeltax:[0,4,6,7],stabilityshouldergrowslop:[0,4,6,7],stabilityslopeadaptiondeltax:[0,4,6,7],stabilitytyp:[0,4,10],standard:[0,4,6,7],start:0,step:[0,2,4,8,15],str:[0,4,6,7,8,9,10,11,13,14,15,16],strength:0,strengthincreaseexp:11,strengthincreaseexpon:[0,11],stresstabl:0,string:[4,8],sucalcul:0,sucalculatedwithyield:0,successfulli:[4,8],sugradi:0,sum:[4,15,16],sumeasur:0,surfac:0,surface_lin:[0,4,15,16],surface_lines_csv:[4,15,16],surface_lines_dam_input:[4,10,15,16],surfacelevelinsid:[0,4,15,16],surfaceleveloutsid:[0,4,15,16],surfacelin:[2,3,10],surfaceline_id:[4,6,7],surfacelinenam:[0,4,6,7],t:2,tabl:0,take:[2,4,12],tangent:0,teen:[4,15,16],thei:[4,10],them:[4,15],therefor:[2,4,14,15],thi:[1,2,4,6,8,10,12,13,14,15],though:[4,15,16],three:2,through:[4,6,7,8,9,11,13,14,15],thu:[4,10],titl:[4,15],toe:0,tool:[2,4,10],top:0,top_level:[4,13,14],toplevel:[0,4,13,14],traffic:0,trafficload:[0,4,6,7],trafficloaddegreeofconsolid:0,trafficloadinsid:[0,4,15,16],trafficloadoutsid:[0,4,15,16],transform:[4,8],tree:[4,10],tri:2,tupl:0,two:[4,6,15,16],type:[0,1,2,4,14,15,16],ui:[2,4],uniqu:[4,6,7,8,9,11,13,14],unit:0,unsaturatedunitweight:11,uplift:[0,4,10],uplift_criterion_pip:[4,6,7],uplift_criterion_st:[4,6,7],upliftcriterionpip:[0,4,6,7],upliftcriterionst:[0,4,6,7],upliftvan:[0,4,10],upliftvangridlefthorizontalpointscount:[0,4,10],upliftvangridlefthorizontalpointsdist:[0,4,10],upliftvangridleftverticalpointscount:[0,4,10],upliftvangridleftverticalpointsdist:[0,4,10],upliftvangridrighthorizontalpointscount:[0,4,10],upliftvangridrighthorizontalpointsdist:[0,4,10],upliftvangridrightverticalpointscount:[0,4,10],upliftvangridrightverticalpointsdist:[0,4,10],upliftvantangentlinesdefinit:[0,4,10],upliftvantangentlinesdefinitiontyp:0,upliftvantangentlinesdist:[0,4,10],upliftvanwti:0,us:[0,1,3,4,6,7,8,9,10,11,12,13,14,15,16],usedefaultshearstrengthmodel:0,usenewditchdefinit:[0,4,6,7],user:[2,3,4,8,10,14,15],v:[0,2],valid:[0,2],valu:[0,4,8,10,12,15,16],van:[0,4,10],verkeersbelast:[4,15,16],vertic:0,wai:[4,8],water:0,water_height:[4,6,7],water_height_low:[4,6,7],waternet:[0,7],waternet_opt:[4,6,7],waternetopt:[0,4,6,7],waterpressureinterpolationmodel:[0,4,13,14],waterpressureinterpolationmodeltyp:[0,4,13,14],weight:0,were:[1,3,4,6],when:1,where:[4,15],which:[4,6,8,12],white:0,whitesconst:0,whl:2,whole:0,width:0,would:4,write:[2,3],x:[0,4,15,16],x_:[4,15,16],x_soilgeometry2d_origin:[4,6,7],xml:[0,2,3,4,10],xml_dam_input:[4,10],xml_dam_output:[4,10],xml_file:[0,4,10],xml_input_fil:[0,4,10],xml_output_fil:[0,4,10],xsoilgeometry2dorigin:[0,4,6,7],y:[4,15],you:[1,2],z:[0,4,15,16],z_:[4,15,16],zand:[4,13,14],zero:0,zone:0,zonearea:[0,7],zonearearestslopecrestwidth:0,zonetyp:[0,4,6,7],zonetypeclass:[0,7]},titles:["Input for DAM engine","Tips for developing with the DamPythonInterface tool","Welcome to DamPythonInterface\u2019s documentation!","Release notes","Tutorial: Setting up a DAM project from pre-existing csv files","Tutorial code snippet","Creating Location class from locations.csv","Creating Location class from locations.csv code snippet","Creating Segment class from segments.csv","Creating Segment class from segments.csv code snippet","Setting up the input class and executing the calculation","Creating Soil class from soilmaterials.csv code snippet","Creating Soil class from soilmaterials.csv","Creating profiles class from soilprofiles.csv file code snippet","Creating profiles class from soilprofiles.csv file","Creating Surface Line class by reading surfacelines.csv and characteristicpoints.csv","Creating Surface Line class by reading surfacelines.csv and characteristicpoints.csv from code snippet"],titleterms:{"1":3,"1d":0,"21":3,"500":3,"class":[1,4,6,7,8,9,10,11,12,13,14,15,16],The:2,an:1,calcul:[4,10],characteristicpoint:[4,15,16],code:[5,7,9,11,13,16],creat:[1,4,6,7,8,9,11,12,13,14,15,16],csv:[4,6,7,8,9,11,12,13,14,15,16],dam:[0,4],daminput:0,dampythoninterfac:[1,2],develop:[1,2],document:2,engin:0,execut:[4,10],exist:4,file:[4,13,14],from:[4,6,7,8,9,11,12,13,14,16],how:1,indic:2,input:[0,4,10],instal:2,instanc:1,interfac:2,introduct:[2,4],line:[4,15,16],locat:[0,4,6,7],note:[2,3],packag:2,paramet:0,pre:4,profil:[0,4,13,14],project:4,python:[1,2],read:[4,15,16],releas:[2,3],s:2,segment:[0,4,8,9],set:[4,10],snippet:[5,7,9,11,13,16],soil:[0,4,11,12],soilmateri:[4,11,12],soilprofil:[4,13,14],stabil:0,surfac:[4,15,16],surfacelin:[0,4,15,16],tabl:2,tip:[1,2],tool:1,total:2,tutori:[2,4,5],up:[4,10],us:2,version:3,welcom:2,xxx:3}})
\ No newline at end of file
Index: DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/dev/input.html
===================================================================
diff -u
--- DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/dev/input.html (revision 0)
+++ DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/dev/input.html (revision 3556)
@@ -0,0 +1,1701 @@
+
+
+
+
+
+
+
+
+ Input for DAM engine — DamPythonInterface 0.1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
importpandasaspd
+# read csv file using pandas
+profile_csv=pd.read_csv(file_name,delimiter=";")
+
+
+
Then a loop is created that goes through all unique profile ids.
+A list of all 1D layers for a certain profile is initialized.
+
list_of_1D_layers=[]
+
+
+
Then a second loop is created that loops all csv rows with a certain profile id.
+A dampythoninterface.soilprofile1D.Layer1D class is initialized for each row.
+If the soil type is sand the the IsAquifer property is set to True otherwise is set to False,
+otherwise the Piping calculation cannot be performed.
+This is append to the list of the 1D layers.
The created list can be inputted in the profile list.
+That will be later used as dam input.
+Therefore, dampythoninterface.soilprofile1D.SoilProfile1D class is initialized.
+Note that the input of BottomLevel is hardcoded by the user and not extracted from a csv file.
+
# create profile and append it to the profile list
+profile_list.append(
+ dpi.SoilProfile1D(
+ Name=str(profile_id),
+ BottomLevel=-30,
+ Layers1D=list_of_1D_layers,
+ )
+)
+returnprofile_list
+
To create a list of dampythoninterface.soil.Soil class list that can later be inputted in the dam input a read_soilmaterials_csv function is created.
+This function takes as input the location od the soilmaterials csv file which is exported from the DamUI.
+The csv id read using pandas. And values of each row are used as inputs of the soil class.
+The reader is referred directly to the code snippet referred below.
Creating Segment class from segments.csv code snippet¶
+
importdampythoninterfaceasdpi
+importpandasaspd
+
+
+defget_failure_mechanism(soil_profile:str):
+ output_dictionary={
+ "All":dpi.SegmentFailureMechanismTypeClass.All,
+ "Stability":dpi.SegmentFailureMechanismTypeClass.Stability,
+ "Piping":dpi.SegmentFailureMechanismTypeClass.Piping,
+ "Liquefaction":dpi.SegmentFailureMechanismTypeClass.Liquefaction,
+ }
+ returnoutput_dictionary[soil_profile]
+
+
+if__name__=="__main__":
+ # read csv file using pandas
+ segment_csv=pd.read_csv(
+ "segments.csv",delimiter=";"
+ )
+ # initialize segment list that will be used for the dam input
+ segments_list=[]
+ # Loop through all unique segment names of the csv
+ forsegment_idinsegment_csv["segment_id"].unique():
+ # loop through all different probabilities and create a list of the SoilGeometryProbabilityElement
+ list_of_probability_elements=[]
+ forcsv_rowinsegment_csv[segment_csv["segment_id"]==segment_id].index:
+ list_of_probability_elements.append(
+ dpi.SoilGeometryProbabilityElement(
+ **{
+ "SoilProfileName":segment_csv["soilprofile_id"][csv_row],
+ "SoilProfileType":dpi.SoilProfileTypeClass.ProfileType1D,
+ "Probability":segment_csv["probability"][csv_row],
+ "SegmentFailureMechanismType":get_failure_mechanism(
+ segment_csv["calculation_type"][csv_row]
+ ),
+ }
+ )
+ )
+ # create segment and append it to the segment list
+ segments_list.append(
+ Segment(
+ Name=str(segment_id),
+ SoilGeometryProbability=list_of_probability_elements,
+ )
+ )
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/tutorial_sections/surface_lines_csv_tutorial.html
===================================================================
diff -u
--- DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/tutorial_sections/surface_lines_csv_tutorial.html (revision 0)
+++ DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/tutorial_sections/surface_lines_csv_tutorial.html (revision 3556)
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+
+
+ Creating Surface Line class by reading surfacelines.csv and characteristicpoints.csv — DamPythonInterface 0.1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Creating Surface Line class by reading surfacelines.csv and characteristicpoints.csv¶
+
In this section the user will read the surfacelines.csv and characteristicpoints.csv
+and combine them to create a list of Surface Lines to input in the dam input.
+In this case two different functions are created the read_surface_lines_csv and
+read_characteristic_points_csv.
+
The read_surface_lines_csv has as input the location of the surfacelines.csv.
+First the surfacelines.csv is read using the pandas modules.
+
importpandasaspd
+# read csv file using pandas
+surface_lines_csv=pd.read_csv(file_name,delimiter=";")
+
+
+
An empty dictionary is initialized that will be filled with the points contained in the surfacelines.csv.
+
surface_lines={}
+
+
+
Then a loop is defined that loops through each different location contained in the csv.
+The row that is defined for each location is extracted.
+Finally the row is reshaped so that every point is separated.
+
# loop though all locations
+forlocation_idinsurface_lines_csv["LOCATIONID"]:
+ # get row of one of the locations
+ row_csv=surface_lines_csv[surface_lines_csv["LOCATIONID"]==location_id]
+ row_csv=row_csv.values[0][1:]
+ # reshape row so that each point is separated
+ row_csv=row_csv.reshape((-1,3))
+
+
+
Finally, for each point location a list is initialized with the intention of appending
+all points in that certain location.
+Note that point that with a NaN value are not included.
+Also these points are not given a certain characteristic point type and therefore the
+enum type NONE is used from the dampythoninterface.surface_line.PointTypeEnum.
+
# create list of points all values all values have a none type
+surface_lines[location_id]=[]
+forpointinrow_csv:
+ # check if point is defined or if it is nan
+ ifnot(str(point[0])=="nan")ornot(str(point[-1])=="nan"):
+ surface_lines[location_id].append(
+ dpi.Point(X=point[0],Z=point[-1],PointType=dpi.PointTypeEnum.NONE))
+
+
+
Finally, the created function read_surface_lines_csv, returns a dictionary of location ids.
+Each location id is assigned a certain point list.
+
returnsurface_lines
+
+
+
After defining the surface line read function the read_characteristic_points function is defined.
+The first step is to establish a relationship between the columns of the characteristicpoints.csv
+and the dampythoninterface.surface_line.PointTypeEnum class. To do that a simple function is created
+where a helper dictionary is used to retrieve the enum value from the dampythoninterface.surface_line.PointTypeEnum class.
+The code is appended below
An empty dictionary is initialized that will be filled with the points contained in the characteristicpoints.csv.
+
characteristic_points_results={}
+
+
+
Then a loop is defined that loops through each different location contained in the csv.
+The row that is defined for each location is extracted.
+
# loop though all locations
+forcharacteristic_pointsincharacteristic_points_csv["LOCATIONID"]:
+ row_csv=characteristic_points_csv[
+ characteristic_points_csv["LOCATIONID"]==characteristic_points
+ ]
+
+
+
Then all characteristic points can be extracted.
+A loop is defined that will loop through all types of characteristic points.
+For each characteristic point type all relevant columns are extracted.
+This is actually a list of the X, Y and Z coordinate of a location.
These columns are extracted from the row of the csv file and appended as a point
+to the dictionary of characteristic points.
+Points that have -1 coordinates are not included in the in the list of characteristic points.
Finally, the created function read_characteristic_points, returns a dictionary of location ids.
+Each location id is assigned a certain point list.
+
returnsurface_lines
+
+
+
The final step includes combining the points of the locations found in the two different csv files.
+Note that the points need to be inputted in an ascending order.
+This is done as it can be seen in the following code snippet
+
defget_X(d):
+ returnd.X
+
+# merge the two dictionaries to create surface line
+forkey,valueinsurface_lines.items():
+ surface_lines[key]+=characteristic_points.get(key,[])
+ # sort points based on X coordinate
+ surface_lines[key].sort(key=get_X)
+# all the points of the surface lines are merged so the surface lines list can be created
+surface_lines_dam_input=[]
+forlocation,pointsinsurface_lines.items():
+ surface_lines_dam_input.append(dpi.SurfaceLine(Name=location,Points=points))
+
Creating profiles class from soilprofiles.csv file code snippet¶
+
importdampythoninterfaceasdpi
+importpandasaspd
+
+defread_profile(file_name:str):
+ # read csv file using pandas
+ profile_csv=pd.read_csv(file_name,delimiter=";")
+ # initialize profile list that will be used for the dam input
+ profile_list=[]
+ # Loop through all unique profile names of the csv
+ forprofile_idinprofile_csv["soilprofile_id"].unique():
+ list_of_1D_layers=[]
+ forcsv_rowinprofile_csv[profile_csv["soilprofile_id"]==profile_id].index:
+ if"zand"inprofile_csv["soil_name"][csv_row]:
+ is_aquifer=True
+ else:
+ is_aquifer=False
+ list_of_1D_layers.append(
+ dpi.Layer1D(
+ **{
+ "Name":profile_csv["soil_name"][csv_row],
+ "SoilName":profile_csv["soil_name"][csv_row],
+ "TopLevel":profile_csv["top_level"][csv_row],
+ "IsAquifer":is_aquifer,
+ "WaterpressureInterpolationModel":dpi.WaterpressureInterpolationModelType.Automatic,
+ }
+ )
+ )
+ # create profile and append it to the profile list
+ profile_list.append(
+ dpi.SoilProfile1D(
+ Name=str(profile_id),
+ BottomLevel=-30,
+ Layers1D=list_of_1D_layers,
+ )
+ )
+ returnprofile_list
+
+ if__name__=="__main__":
+ # In this case only 1D segments will be inputted
+ profiles=read_profile("soilprofiles.csv")
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/.doctrees/environment.pickle
===================================================================
diff -u
Binary files differ
Index: DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/_sources/tutorial_sections/soil_profile_1d_csv_tutorial.rst.txt
===================================================================
diff -u
--- DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/_sources/tutorial_sections/soil_profile_1d_csv_tutorial.rst.txt (revision 0)
+++ DamClients/DamPythonInterface/branches/21.1/release/DamPythonInterfaceDocumentation/_sources/tutorial_sections/soil_profile_1d_csv_tutorial.rst.txt (revision 3556)
@@ -0,0 +1,62 @@
+Creating profiles class from soilprofiles.csv file
+--------------------------------------------------
+
+To read the soilprofiles.csv the user can create a function that will create a list of
+:py:class:`dampythoninterface.soilprofile1D.SoilProfile1D` class.
+
+The profile csv is read using the pandas module
+
+.. code-block:: python
+
+ import pandas as pd
+ # read csv file using pandas
+ profile_csv = pd.read_csv(file_name, delimiter=";")
+
+Then a loop is created that goes through all unique profile ids.
+A list of all 1D layers for a certain profile is initialized.
+
+.. code-block:: python
+
+ list_of_1D_layers = []
+
+Then a second loop is created that loops all csv rows with a certain profile id.
+A :py:class:`dampythoninterface.soilprofile1D.Layer1D` class is initialized for each row.
+If the soil type is sand the the IsAquifer property is set to True otherwise is set to False,
+otherwise the Piping calculation cannot be performed.
+This is append to the list of the 1D layers.
+
+.. code-block:: python
+
+ for csv_row in profile_csv[profile_csv["soilprofile_id"] == profile_id].index:
+ if "zand" in profile_csv["soil_name"][csv_row]:
+ is_aquifer = True
+ else:
+ is_aquifer = False
+ list_of_1D_layers.append(
+ dpi.Layer1D(
+ **{
+ "Name": profile_csv["soil_name"][csv_row],
+ "SoilName": profile_csv["soil_name"][csv_row],
+ "TopLevel": profile_csv["top_level"][csv_row],
+ "IsAquifer": is_aquifer,
+ "WaterpressureInterpolationModel": dpi.WaterpressureInterpolationModelType.Automatic,
+ }
+ )
+ )
+
+The created list can be inputted in the profile list.
+That will be later used as dam input.
+Therefore, :py:class:`dampythoninterface.soilprofile1D.SoilProfile1D` class is initialized.
+Note that the input of BottomLevel is hardcoded by the user and not extracted from a csv file.
+
+.. code-block:: python
+
+ # create profile and append it to the profile list
+ profile_list.append(
+ dpi.SoilProfile1D(
+ Name=str(profile_id),
+ BottomLevel=-30,
+ Layers1D=list_of_1D_layers,
+ )
+ )
+ return profile_list
\ No newline at end of file
Index: DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/_static/plus.png
===================================================================
diff -u
Binary files differ
Index: DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/tutorial.html
===================================================================
diff -u
--- DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/tutorial.html (revision 0)
+++ DamClients/DamPythonInterface/trunk/release/DamPythonInterfaceDocumentation/tutorial.html (revision 3556)
@@ -0,0 +1,617 @@
+
+
+
+
+
+
+
+
+ Tutorial: Setting up a DAM project from pre-existing csv files — DamPythonInterface 0.1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Tutorial: Setting up a DAM project from pre-existing csv files¶
This tutorial is an example of how a user would go about creating and running a DAM project from the python API.
+In this case the user uses a collection of csv files that would be normally be used as an input of the DAM UI.
+These csv files are:
In this example the segments.csv is imported by using pandas.
+The user can follow the following example to get the result of a list of Segments which can be later used as input of the DAM model.
+
In the segments.csv it can be seen that the calculation_type is given by string value.
+For example “Stability” or “Piping”. The first step to read the csv successfully is for the user
+to create a function that will transform this string input to the correct enumeration class
+dampythoninterface.segment.SegmentFailureMechanismTypeClass. The following code snippet
+shows how
importpandasaspd
+# read csv file using pandas
+segment_csv=pd.read_csv("segments.csv",delimiter=";")
+
+
+
There are several ways to extract the values from the csv file.
+In this case the user loops through unique id segments.
+The second loop of the code lets the user loop through all the different rows of the csv
+file that have the same segment_id. For each segment a new list of probabilities is
+created.
+
importdampythoninterfaceasdpi
+# initialize segment list that will be used for the dam input
+segments_list=[]
+# Loop through all unique segment names of the csv
+forsegment_idinsegment_csv["segment_id"].unique():
+ # loop through all different probabilities and create a list of the SoilGeometryProbabilityElement
+ list_of_probability_elements=[]
+ forcsv_rowinsegment_csv[segment_csv["segment_id"]==segment_id].index:
+
+
+
In the second loop, a dictionary of the values that are contained in a certain row of the csv
+is created.
# create segment and append it to the segment list
+segments_list.append(
+ Segment(
+ Name=str(segment_id),
+ SoilGeometryProbability=list_of_probability_elements,
+ )
+)
+
+
+
The full code snippet for reading the segment.csv can be found in this document.
+
+
+
Creating Surface Line class by reading surfacelines.csv and characteristicpoints.csv¶
+
In this section the user will read the surfacelines.csv and characteristicpoints.csv
+and combine them to create a list of Surface Lines to input in the dam input.
+In this case two different functions are created the read_surface_lines_csv and
+read_characteristic_points_csv.
+
The read_surface_lines_csv has as input the location of the surfacelines.csv.
+First the surfacelines.csv is read using the pandas modules.
+
importpandasaspd
+# read csv file using pandas
+surface_lines_csv=pd.read_csv(file_name,delimiter=";")
+
+
+
An empty dictionary is initialized that will be filled with the points contained in the surfacelines.csv.
+
surface_lines={}
+
+
+
Then a loop is defined that loops through each different location contained in the csv.
+The row that is defined for each location is extracted.
+Finally the row is reshaped so that every point is separated.
+
# loop though all locations
+forlocation_idinsurface_lines_csv["LOCATIONID"]:
+ # get row of one of the locations
+ row_csv=surface_lines_csv[surface_lines_csv["LOCATIONID"]==location_id]
+ row_csv=row_csv.values[0][1:]
+ # reshape row so that each point is separated
+ row_csv=row_csv.reshape((-1,3))
+
+
+
Finally, for each point location a list is initialized with the intention of appending
+all points in that certain location.
+Note that point that with a NaN value are not included.
+Also these points are not given a certain characteristic point type and therefore the
+enum type NONE is used from the dampythoninterface.surface_line.PointTypeEnum.
+
# create list of points all values all values have a none type
+surface_lines[location_id]=[]
+forpointinrow_csv:
+ # check if point is defined or if it is nan
+ ifnot(str(point[0])=="nan")ornot(str(point[-1])=="nan"):
+ surface_lines[location_id].append(
+ dpi.Point(X=point[0],Z=point[-1],PointType=dpi.PointTypeEnum.NONE))
+
+
+
Finally, the created function read_surface_lines_csv, returns a dictionary of location ids.
+Each location id is assigned a certain point list.
+
returnsurface_lines
+
+
+
After defining the surface line read function the read_characteristic_points function is defined.
+The first step is to establish a relationship between the columns of the characteristicpoints.csv
+and the dampythoninterface.surface_line.PointTypeEnum class. To do that a simple function is created
+where a helper dictionary is used to retrieve the enum value from the dampythoninterface.surface_line.PointTypeEnum class.
+The code is appended below
An empty dictionary is initialized that will be filled with the points contained in the characteristicpoints.csv.
+
characteristic_points_results={}
+
+
+
Then a loop is defined that loops through each different location contained in the csv.
+The row that is defined for each location is extracted.
+
# loop though all locations
+forcharacteristic_pointsincharacteristic_points_csv["LOCATIONID"]:
+ row_csv=characteristic_points_csv[
+ characteristic_points_csv["LOCATIONID"]==characteristic_points
+ ]
+
+
+
Then all characteristic points can be extracted.
+A loop is defined that will loop through all types of characteristic points.
+For each characteristic point type all relevant columns are extracted.
+This is actually a list of the X, Y and Z coordinate of a location.
These columns are extracted from the row of the csv file and appended as a point
+to the dictionary of characteristic points.
+Points that have -1 coordinates are not included in the in the list of characteristic points.
Finally, the created function read_characteristic_points, returns a dictionary of location ids.
+Each location id is assigned a certain point list.
+
returnsurface_lines
+
+
+
The final step includes combining the points of the locations found in the two different csv files.
+Note that the points need to be inputted in an ascending order.
+This is done as it can be seen in the following code snippet
+
defget_X(d):
+ returnd.X
+
+# merge the two dictionaries to create surface line
+forkey,valueinsurface_lines.items():
+ surface_lines[key]+=characteristic_points.get(key,[])
+ # sort points based on X coordinate
+ surface_lines[key].sort(key=get_X)
+# all the points of the surface lines are merged so the surface lines list can be created
+surface_lines_dam_input=[]
+forlocation,pointsinsurface_lines.items():
+ surface_lines_dam_input.append(dpi.SurfaceLine(Name=location,Points=points))
+
+
+
The full code snippet for reading the csv files can be found in this document.
+
+
+
Creating profiles class from soilprofiles.csv file¶
importpandasaspd
+# read csv file using pandas
+profile_csv=pd.read_csv(file_name,delimiter=";")
+
+
+
Then a loop is created that goes through all unique profile ids.
+A list of all 1D layers for a certain profile is initialized.
+
list_of_1D_layers=[]
+
+
+
Then a second loop is created that loops all csv rows with a certain profile id.
+A dampythoninterface.soilprofile1D.Layer1D class is initialized for each row.
+If the soil type is sand the the IsAquifer property is set to True otherwise is set to False,
+otherwise the Piping calculation cannot be performed.
+This is append to the list of the 1D layers.
The created list can be inputted in the profile list.
+That will be later used as dam input.
+Therefore, dampythoninterface.soilprofile1D.SoilProfile1D class is initialized.
+Note that the input of BottomLevel is hardcoded by the user and not extracted from a csv file.
+
# create profile and append it to the profile list
+profile_list.append(
+ dpi.SoilProfile1D(
+ Name=str(profile_id),
+ BottomLevel=-30,
+ Layers1D=list_of_1D_layers,
+ )
+)
+returnprofile_list
+
+
+
The full code snippet for reading the csv files can be found in this document.
To create the list of dampythoninterface.location.Location which can later be inputted in the DamInput a function read_locations_csv is created.
+Two csv files are given as input, the locations.csv and the scenarios.csv.
+Firstly, these two files are read and merged based on the location_id csv column.
# initialize location list that will be used for the dam input
+locations_list=[]
+# Loop through all unique profile names of the csv
+forindex,rowinmerged_csv.iterrows():
+
To create a list of dampythoninterface.soil.Soil class list that can later be inputted in the dam input a read_soilmaterials_csv function is created.
+This function takes as input the location od the soilmaterials csv file which is exported from the DamUI.
+The csv id read using pandas. And values of each row are used as inputs of the soil class.
+The reader is referred directly to the code snippet referred below.
+
The full code snippet for reading the csvs can be found in this document.
+
+
+
Setting up the input class and executing the calculation¶
+
Finally the user cab set up the more general settings of the
+dampythoninterface.stability_parameters.StabilityParameters class.
+An example is shown in the following code snippet.
+Note that despite the grid determination being Automatic the user DamPythonInterface tool cannot determine
+the Uplift Van grid values. Thus, they should be manually inputted.
After the calculation is run the user can access the output by parsing the xml in Python.
+The user can also use the output.
+For example, in this case the user outputs the safety factor.
+
importxml.etree.cElementTreeaset
+
+# read output xml
+tree=et.parse(str(xml_dam_output))
+root=tree.getroot()
+stability_results=(
+ root.find("Results")
+ .find("CalculationResults")
+ .find("DesignResults")
+ .find("StabilityDesignResults")
+)
+safety_factor=stability_results.get("SafetyFactor")
+print("DAM produced a safety factor of ",safety_factor)
+
Creating Surface Line class by reading surfacelines.csv and characteristicpoints.csv¶
+
In this section the user will read the surfacelines.csv and characteristicpoints.csv
+and combine them to create a list of Surface Lines to input in the dam input.
+In this case two different functions are created the read_surface_lines_csv and
+read_characteristic_points_csv.
+
The read_surface_lines_csv has as input the location of the surfacelines.csv.
+First the surfacelines.csv is read using the pandas modules.
+
importpandasaspd
+# read csv file using pandas
+surface_lines_csv=pd.read_csv(file_name,delimiter=";")
+
+
+
An empty dictionary is initialized that will be filled with the points contained in the surfacelines.csv.
+
surface_lines={}
+
+
+
Then a loop is defined that loops through each different location contained in the csv.
+The row that is defined for each location is extracted.
+Finally the row is reshaped so that every point is separated.
+
# loop though all locations
+forlocation_idinsurface_lines_csv["LOCATIONID"]:
+ # get row of one of the locations
+ row_csv=surface_lines_csv[surface_lines_csv["LOCATIONID"]==location_id]
+ row_csv=row_csv.values[0][1:]
+ # reshape row so that each point is separated
+ row_csv=row_csv.reshape((-1,3))
+
+
+
Finally, for each point location a list is initialized with the intention of appending
+all points in that certain location.
+Note that point that with a NaN value are not included.
+Also these points are not given a certain characteristic point type and therefore the
+enum type NONE is used from the dampythoninterface.surface_line.PointTypeEnum.
+
# create list of points all values all values have a none type
+surface_lines[location_id]=[]
+forpointinrow_csv:
+ # check if point is defined or if it is nan
+ ifnot(str(point[0])=="nan")ornot(str(point[-1])=="nan"):
+ surface_lines[location_id].append(
+ dpi.Point(X=point[0],Z=point[-1],PointType=dpi.PointTypeEnum.NONE))
+
+
+
Finally, the created function read_surface_lines_csv, returns a dictionary of location ids.
+Each location id is assigned a certain point list.
+
returnsurface_lines
+
+
+
After defining the surface line read function the read_characteristic_points function is defined.
+The first step is to establish a relationship between the columns of the characteristicpoints.csv
+and the dampythoninterface.surface_line.PointTypeEnum class. To do that a simple function is created
+where a helper dictionary is used to retrieve the enum value from the dampythoninterface.surface_line.PointTypeEnum class.
+The code is appended below
An empty dictionary is initialized that will be filled with the points contained in the characteristicpoints.csv.
+
characteristic_points_results={}
+
+
+
Then a loop is defined that loops through each different location contained in the csv.
+The row that is defined for each location is extracted.
+
# loop though all locations
+forcharacteristic_pointsincharacteristic_points_csv["LOCATIONID"]:
+ row_csv=characteristic_points_csv[
+ characteristic_points_csv["LOCATIONID"]==characteristic_points
+ ]
+
+
+
Then all characteristic points can be extracted.
+A loop is defined that will loop through all types of characteristic points.
+For each characteristic point type all relevant columns are extracted.
+This is actually a list of the X, Y and Z coordinate of a location.
These columns are extracted from the row of the csv file and appended as a point
+to the dictionary of characteristic points.
+Points that have -1 coordinates are not included in the in the list of characteristic points.
Finally, the created function read_characteristic_points, returns a dictionary of location ids.
+Each location id is assigned a certain point list.
+
returnsurface_lines
+
+
+
The final step includes combining the points of the locations found in the two different csv files.
+Note that the points need to be inputted in an ascending order.
+This is done as it can be seen in the following code snippet
+
defget_X(d):
+ returnd.X
+
+# merge the two dictionaries to create surface line
+forkey,valueinsurface_lines.items():
+ surface_lines[key]+=characteristic_points.get(key,[])
+ # sort points based on X coordinate
+ surface_lines[key].sort(key=get_X)
+# all the points of the surface lines are merged so the surface lines list can be created
+surface_lines_dam_input=[]
+forlocation,pointsinsurface_lines.items():
+ surface_lines_dam_input.append(dpi.SurfaceLine(Name=location,Points=points))
+