client/src/store/middleware/despak.js
/**
 * despak - Expand any compressed design parameters and call the equation set.
 */
Expand any compressed design parameters and call the equation set.
Expand any compressed design parameters and call the equation set .
function despak(pc, store, merit) {
    var design = store.getState();
    var kd = 0;
    var p = [];
    for (let i = 0; i < design.model.symbol_table.length; i++) {
        var element = design.model.symbol_table[i];
        if (element.type === "equationset" && element.input) {
            if (!(element.lmin & FIXED)) {
                p.push(pc[kd++]);
            } else {
                p.push(element.value);
            }
        }
    }
    store.dispatch(changeInputSymbolValues(p, merit));
    design = store.getState();
    var obj = design.model.result.objective_value;
    return obj;
}
function despak ( pc , store , merit ) { var design = store . getState ( ) ; var kd = 0 ; var p = [ ] ; for ( let i = 0 ; i < design . model . symbol_table . length ; i ++ ) { var element = design . model . symbol_table [ i ] ; if ( element . type === "equationset" && element . input ) { if ( ! ( element . lmin & FIXED ) ) { p . push ( pc [ kd ++ ] ) ; } else { p . push ( element . value ) ; } } } store . dispatch ( changeInputSymbolValues ( p , merit ) ) ; design = store . getState ( ) ; var obj = design . model . result . objective_value ; return obj ; }
despak - Expand any compressed design parameters and call the equation set.
despak - Expand any compressed design parameters and call the equation set .
//    console.log('Entering despak pc=',pc); //    console.log('Exiting despak obj=',obj);