Functions

Utility Functions

dict_to_frame(dictobj[, cols])

Converts dictionaries to DataFrame objects for pretty printing

exp_range(start, stop[, step])

Creates a set within specified range

flatten_frame(df[, swap])

Converts a pandas.DataFrame object into pandas.Series

get_value_table(\*args, \*\*kwargs)

Returns values of the given arguments as a merged pandas DataFrame

expr_sum(argv)

Summation function for Expression objects

quick_sum(argv)

Summation function for Expression objects

reset()

Resets package configs and internal counters

Abstract Actions

actions.read_data(table, index, columns)

Reads data tables inside Set and Parameter objects

actions.create_data(table, index, columns)

Creates data tables from variables, parameters, and expressions

actions.solve([options, primalin])

Solves the active optimization problem and generates results

actions.for_loop(\*args)

Creates a for-loop container to be executed on the server

actions.cofor_loop(\*args)

Creates a cofor-loop to be executed on the server concurrently

actions.if_condition(logic_expression, …)

Creates an if-else block

actions.switch_conditions(\*\*args)

Creates several if-else blocks by using the specified arguments

actions.set_value(left, right)

Creates an assignment statement

actions.fix(\*args)

Fixes values of variables to the specified values

actions.unfix(\*args)

Unfixes values of variables

actions.set_objective(expression, name, sense)

Specifies the objective function

actions.print_item(\*args)

Prints the specified argument list on server

actions.put_item(\*args[, names])

Prints the specified item values to the output log

actions.expand()

Prints expanded problem to output

actions.drop(\*args)

Drops the specified constraints or constraint groups from model

actions.restore(\*args)

Restores dropped constraint and constraint groups

actions.union(\*args)

Aggregates the specified sets and set expressions

actions.diff(left, right)

Gets the difference between set and set expressions

actions.substring(main_string, first_pos, …)

Gets the substring of the specified positions

actions.use_problem(problem)

Changes the currently active problem

Math Functions

math.math_func(exp, op, \*args)

Function wrapper for math functions

math.abs(exp)

Absolute value function

math.log(exp)

Natural logarithm function

math.log2(exp)

Logarithm function in base 2

math.log10(exp)

Logarithm function in base 10

math.exp(exp)

Exponential function

math.sqrt(exp)

Square root function

math.mod(exp, divisor)

Modulo function

math.int(exp)

Integer value function

math.sign(exp)

Sign value function

math.max(exp, \*args)

Largest value function

math.min(exp, \*args)

Smallest value function

math.sin(exp)

Sine function

math.cos(exp)

Cosine function

math.tan(exp)

Tangent function