SlideShare a Scribd company logo
Germán Ferrari
Instituto de Computación, Universidad de la República, Uruguay
An embedded DSL to
manipulate MathProg
Mixed Integer
Programming
models within Scala
An embedded DSL to
manipulate MathProg
Mixed Integer
Programming
models within Scala
Germán Ferrari
Instituto de Computación, Universidad de la República, Uruguay
GNU MathProg
MathProg = Mathematical Programming
Has nothing to do with computer programming
It’s a synonym of “mathematical optimization”
A “program” here refers to a plan or schedule
GNU MathProg
It’s a modeling language
Optimization problem
Mathematical modeling
GNU MathProg
Computational experiments
Supported by the GNU Linear Programming Kit
GNU MathProg
Supports linear models, with either real or
integer decision variables
This is called “Mixed Integer Programming”
(MIP) because it mixes integer and real
variables
Generic MIP optimization problem
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
subject to g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <= b[i];
Generic MIP optimization problem
Find x[j] and y[k], that minimize a function f,
satisfying constraints g[i]
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
subject to g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <= b[i];
Generic MIP optimization problem
Find x[j] and y[k], that minimize a function f,
satisfying constraints g[i]
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
subject to g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <= b[i];
Decision variables
(real or integer)
Generic MIP optimization problem
Find x[j] and y[k], that minimize a function f,
satisfying constraints g[i]
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
subject to g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <= b[i];
Decision variables
(real or integer)
Objective
function
Generic MIP optimization problem
Find x[j] and y[k], that minimize a function f,
satisfying constraints g[i]
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
subject to g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <= b[i];
Decision variables
(real or integer)
Objective
function
Constraints
Generic MIP optimization problem
Find x[j] and y[k], that minimize a function f,
satisfying constraints g[i]
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
subject to g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <= b[i];
Decision variables
(real or integer)
Objective
function
Constraints
Linear
Generic MIP optimization problem
Full model
param m; param n; param l;
set I := 1 .. m;
set J := 1 .. n;
set K := 1 .. l;
param c{J}; param d{K};
param a{I, J}; param e{I, K}; param b{I};
var x{J} integer, >= 0;
var y{K} >= 0;
minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k];
subject to g{i in I}:
sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i];
param m; param n; param l;
set I := 1 .. m;
set J := 1 .. n;
set K := 1 .. l;
param c{J}; param d{K};
param a{I, J}; param e{I, K}; param b{I};
var x{J} integer, >= 0;
var y{K} >= 0;
minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k];
subject to g{i in I}:
sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i];
Generic MIP optimization problem
Declaration of
variables
param m; param n; param l;
set I := 1 .. m;
set J := 1 .. n;
set K := 1 .. l;
param c{J}; param d{K};
param a{I, J}; param e{I, K}; param b{I};
var x{J} integer, >= 0;
var y{K} >= 0;
minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k];
subject to g{i in I}:
sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i];
Generic MIP optimization problem
Parameters
Generic MIP optimization problem
param m; param n; param l;
set I := 1 .. m;
set J := 1 .. n;
set K := 1 .. l;
param c{J}; param d{K};
param a{I, J}; param e{I, K}; param b{I};
var x{J} integer, >= 0;
var y{K} >= 0;
minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k];
subject to g{i in I}:
sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i];
Indexing sets
Why MathProg in Scala
Why MathProg in Scala
Generate constraints
Create derived models
Develop custom resolution methods at high
level
...
MathProg in Scala (deep embedding)
Syntax
Represent MathProg models with Scala data
types
Mimic MathProg syntax with Scala functions
Semantics
Generate MathProg code, others ...
MathProg in Scala (deep embedding)
Syntax
Represent MathProg models with Scala data
types
Mimic MathProg syntax with Scala functions
Semantics
Generate MathProg code, others ...
Abstract syntax tree
MathProg in Scala (deep embedding)
Syntax
Represent MathProg models with Scala data
types
Mimic MathProg syntax with Scala functions
Semantics
Generate MathProg code, others ...
Smart constructors and
combinators
Abstract syntax tree
MathProg EDSL
param m;
param n;
param l;
set I := 1 .. m;
set J := 1 .. n;
set K := 1 .. l;
param c{J};
param d{K};
param a{I, J};
// ...
var x{J} integer, >= 0;
var y{K} >= 0;
val m = param("m")
val n = param("n")
val l = param("l")
val I = set("I") := 1 to m
val J = set("J") := 1 to n
val K = set("K") := 1 to l
val c = param("c", J)
val d = param("d", K)
val a = param("a", I, J)
// ...
val x = xvar("x", J).integer >= 0
val y = xvar("y", K) >= 0
MathProg EDSL
param m;
param n;
param l;
set I := 1 .. m;
set J := 1 .. n;
set K := 1 .. l;
param c{J};
param d{K};
param a{I, J};
// ...
var x{J} integer, >= 0;
var y{K} >= 0;
val m = param("m")
val n = param("n")
val l = param("l")
val I = set("I") := 1 to m
val J = set("J") := 1 to n
val K = set("K") := 1 to l
val c = param("c", J)
val d = param("d", K)
val a = param("a", I, J)
// ...
val x = xvar("x", J).integer >= 0
val y = xvar("y", K) >= 0
set
param
xvar ...
MathProg EDSL
param m;
param n;
param l;
set I := 1 .. m;
set J := 1 .. n;
set K := 1 .. l;
param c{J};
param d{K};
param a{I, J};
// ...
var x{J} integer, >= 0;
var y{K} >= 0;
val m = param("m")
val n = param("n")
val l = param("l")
val I = set("I") := 1 to m
val J = set("J") := 1 to n
val K = set("K") := 1 to l
val c = param("c", J)
val d = param("d", K)
val a = param("a", I, J)
// ...
val x = xvar("x", J).integer >= 0
val y = xvar("y", K) >= 0
set
param
xvar ...
ParamStat(
"c",
domain = Some(
IndExpr(
List(
IndEntry(
Nil,
SetRef(J)
)
))))
val m = param("m")
val n = param("n")
val l = param("l")
val I = set("I") := 1 to m
val J = set("J") := 1 to n
val K = set("K") := 1 to l
val c = param("c", J)
val d = param("d", K)
val a = param("a", I, J)
// ...
val x = xvar("x", J).integer >= 0
val y = xvar("y", K) >= 0
MathProg EDSL
Scala range
notation for
arithmetic
sets
param m;
param n;
param l;
set I := 1 .. m;
set J := 1 .. n;
set K := 1 .. l;
param c{J};
param d{K};
param a{I, J};
// ...
var x{J} integer, >= 0;
var y{K} >= 0;
val m = param("m")
val n = param("n")
val l = param("l")
val I = set("I") := 1 to m
val J = set("J") := 1 to n
val K = set("K") := 1 to l
val c = param("c", J)
val d = param("d", K)
val a = param("a", I, J)
// ...
val x = xvar("x", J).integer >= 0
val y = xvar("y", K) >= 0
param m;
param n;
param l;
set I := 1 .. m;
set J := 1 .. n;
set K := 1 .. l;
param c{J};
param d{K};
param a{I, J};
// ...
var x{J} integer, >= 0;
var y{K} >= 0;
MathProg EDSL
Varargs for
simple indexing
expressions
val m = param("m")
val n = param("n")
val l = param("l")
val I = set("I") := 1 to m
val J = set("J") := 1 to n
val K = set("K") := 1 to l
val c = param("c", J)
val d = param("d", K)
val a = param("a", I, J)
// ...
val x = xvar("x", J).integer >= 0
val y = xvar("y", K) >= 0
param m;
param n;
param l;
set I := 1 .. m;
set J := 1 .. n;
set K := 1 .. l;
param c{J};
param d{K};
param a{I, J};
// ...
var x{J} integer, >= 0;
var y{K} >= 0;
MathProg EDSL
Returns a new
variable with the
`integer’ attribute
val m = param("m")
val n = param("n")
val l = param("l")
val I = set("I") := 1 to m
val J = set("J") := 1 to n
val K = set("K") := 1 to l
val c = param("c", J)
val d = param("d", K)
val a = param("a", I, J)
// ...
val x = xvar("x", J).integer >= 0
val y = xvar("y", K) >= 0
MathProg EDSL
Another variable,
now adding the
lower bound
attribute
param m;
param n;
param l;
set I := 1 .. m;
set J := 1 .. n;
set K := 1 .. l;
param c{J};
param d{K};
param a{I, J};
// ...
var x{J} integer, >= 0;
var y{K} >= 0;
val m = param("m")
val n = param("n")
val l = param("l")
val I = set("I") := 1 to m
val J = set("J") := 1 to n
val K = set("K") := 1 to l
val c = param("c", J)
val d = param("d", K)
val a = param("a", I, J)
// ...
val x = xvar("x", J).integer >= 0
val y = xvar("y", K) >= 0
param m;
param n;
param l;
set I := 1 .. m;
set J := 1 .. n;
set K := 1 .. l;
param c{J};
param d{K};
param a{I, J};
// ...
var x{J} integer, >= 0;
var y{K} >= 0;
MathProg EDSL
Everything is
immutable
MathProg EDSL
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
s.t. g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <=
b[i];
val f =
minimize("f") {
sum(j in J)(c(j) * x(j)) +
sum(k in K)(d(k) * y(k))
}
val g =
st("g", i in I) {
sum(j in J)(a(i, j) * x(j)) +
sum(k in K)(e(i, k) * y(k)) <=
b(i)
}
MathProg EDSL minimize
st ...
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
s.t. g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <=
b[i];
val f =
minimize("f") {
sum(j in J)(c(j) * x(j)) +
sum(k in K)(d(k) * y(k))
}
val g =
st("g", i in I) {
sum(j in J)(a(i, j) * x(j)) +
sum(k in K)(e(i, k) * y(k)) <=
b(i)
}
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
s.t. g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <=
b[i];
val f =
minimize("f") {
sum(j in J)(c(j) * x(j)) +
sum(k in K)(d(k) * y(k))
}
val g =
st("g", i in I) {
sum(j in J)(a(i, j) * x(j)) +
sum(k in K)(e(i, k) * y(k)) <=
b(i)
}
MathProg EDSL Multiple
parameters lists
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
s.t. g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <=
b[i];
val f =
minimize("f") {
sum(j in J)(c(j) * x(j)) +
sum(k in K)(d(k) * y(k))
}
val g =
st("g", i in I) {
sum(j in J)(a(i, j) * x(j)) +
sum(k in K)(e(i, k) * y(k)) <=
b(i)
}
MathProg EDSL Multiple
parameters lists
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
s.t. g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <=
b[i];
val f =
minimize("f") {
sum(j in J)(c(j) * x(j)) +
sum(k in K)(d(k) * y(k))
}
val g =
st("g", i in I) {
sum(j in J)(a(i, j) * x(j)) +
sum(k in K)(e(i, k) * y(k)) <=
b(i)
}
MathProg EDSL addition,
multiplication,
summation ...
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
s.t. g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <=
b[i];
val f =
minimize("f") {
sum(j in J)(c(j) * x(j)) +
sum(k in K)(d(k) * y(k))
}
val g =
st("g", i in I) {
sum(j in J)(a(i, j) * x(j)) +
sum(k in K)(e(i, k) * y(k)) <=
b(i)
}
MathProg EDSL References to
individual parameters
and variables by
application
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
s.t. g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <=
b[i];
val f =
minimize("f") {
sum(j in J)(c(j) * x(j)) +
sum(k in K)(d(k) * y(k))
}
val g =
st("g", i in I) {
sum(j in J)(a(i, j) * x(j)) +
sum(k in K)(e(i, k) * y(k)) <=
b(i)
}
MathProg EDSL
Constraint
minimize f:
sum{j in J} c[j] * x[j] +
sum{k in K} d[k] * y[k];
s.t. g{i in I}:
sum{j in J} a[i,j] * x[j] +
sum{k in K} e[i,k] * y[k] <=
b[i];
val f =
minimize("f") {
sum(j in J)(c(j) * x(j)) +
sum(k in K)(d(k) * y(k))
}
val g =
st("g", i in I) {
sum(j in J)(a(i, j) * x(j)) +
sum(k in K)(e(i, k) * y(k)) <=
b(i)
}
MathProg EDSL
Creates a new
constraint with the
specified name and
indexing
Implementing the syntax
Implementing the syntax
Many of the syntactic constructs require:
A broad (open?) number of overloadings
Be used with infix notation
Many of the syntactic constructs require:
A broad (open?) number of overloadings
Be used with infix notation
Implementing the syntax
type classes and
object-oriented forwarders
Many of the syntactic constructs require:
A broad (open?) number of overloadings
Be used with infix notation
Implementing the syntax
type classes and
object-oriented forwarders
implicits prioritization
Implementing the syntax: “>=”
param("p", J) >= 0
Implementing the syntax: “>=”
param("p", J) >= 0
ParamStat
Implementing the syntax: “>=”
param("p", J) >= 0
ParamStat
ParamStat doesn’t have a `>=’
method
Implementing the syntax: “>=”
param("p", J) >= 0
implicit conversion to
something that
provides the method
ParamStat doesn’t have a `>=’
method
ParamStat
Implementing the syntax: “>=”
param("p", J) >= 0 // ParamStat
param("p", J) >= p2 // ParamStat
xvar("x", I) >= 0 // VarStat
i >= j // LogicExpr
p(j1) >= p(j2) // LogicExpr
x(i) >= 0 // ConstraintStat
10 >= x(i) // ConstraintStat
Many overloadings
… more
Implementing the syntax: “>=”
implicit class GTESyntax[A](lhe: A) {
def >=[B, C](rhe: B)(implicit GTEOp: GTEOp[A,B,C]): C =
GTEOp.gte(lhe, rhe)
}
Implementing the syntax: “>=”
implicit class GTESyntax[A](lhe: A) {
def >=[B, C](rhe: B)(implicit GTEOp: GTEOp[A,B,C]): C =
GTEOp.gte(lhe, rhe)
}
Fully generic
Implementing the syntax: “>=”
implicit class GTESyntax[A](lhe: A) {
def >=[B, C](rhe: B)(implicit GTEOp: GTEOp[A,B,C]): C =
GTEOp.gte(lhe, rhe)
}
trait GTEOp[A,B,C] {
def gte(lhe: A, rhe: B): C
}
Type class
Implementing the syntax: “>=”
implicit class GTESyntax[A](lhe: A) {
def >=[B, C](rhe: B)(implicit GTEOp: GTEOp[A,B,C]): C =
GTEOp.gte(lhe, rhe)
}
trait GTEOp[A,B,C] {
def gte(lhe: A, rhe: B): C
}
Type class
The implementation is
forwarded to the implicit
instance
Implementing the syntax: “>=”
implicit class GTESyntax[A](lhe: A) {
def >=[B, C](rhe: B)(implicit GTEOp: GTEOp[A,B,C]): C =
GTEOp.gte(lhe, rhe)
}
The available implicit instances
encode the rules by which the
operators can be used
Implementing the syntax: “>=”
implicit class GTESyntax[A](lhe: A) {
def >=[B, C](rhe: B)(implicit GTEOp: GTEOp[A,B,C]): C =
GTEOp.gte(lhe, rhe)
}
The instance of the type class is
required at the method level, so
both A and B can be used in the
implicits search
Implementing the syntax: “>=”
instances
implicit def ParamStatGTEOp[A](
implicit conv: A => NumExpr):
GTEOp[ParamStat, A, ParamStat] = /* ... */
>= for parameters and “numbers”
param(“p”) >= m
Implementing the syntax: “>=”
instances
implicit def ParamStatGTEOp[A](
implicit conv: A => NumExpr):
GTEOp[ParamStat, A, ParamStat] = /* ... */
>= for parameters and “numbers”
param(“p”) >= m
Implementing the syntax: “>=”
instances
implicit def ParamStatGTEOp[A](
implicit conv: A => NumExpr):
GTEOp[ParamStat, A, ParamStat] = /* ... */
>= for parameters and “numbers”
param(“p”) >= m
View bound
Implementing the syntax: “>=”
instances
implicit def VarStatGTEOp[A](
implicit conv: A => NumExpr):
GTEOp[VarStat, A, VarStat] = /* ... */
>= for variables and “numbers”
xvar(“x”) >= m
Analogous to the
parameter case
Implementing the syntax: “>=”
instances
implicit def NumExprGTEOp[A, B](
implicit convA: A => NumExpr,
convB: B => NumExpr):
GTEOp[A, B, LogicExpr] = /* ... */
>= for two “numbers”
i >= j
Implementing the syntax: “>=”
instances
implicit def NumExprGTEOp[A, B](
implicit convA: A => NumExpr,
convB: B => NumExpr):
GTEOp[A, B, LogicExpr] = /* ... */
>= for two “numbers”
i >= j
Implementing the syntax: “>=”
instances
implicit def NumExprGTEOp[A, B](
implicit convA: A => NumExpr,
convB: B => NumExpr):
GTEOp[A, B, LogicExpr] = /* ... */
>= for two “numbers”
i >= j
Implementing the syntax: “>=”
instances
implicit def LinExprGTEOp[A, B](
implicit convA: A => LinExpr,
convB: B => LinExpr):
GTEOp[A, B, ConstraintStat] = /* ... */
>= for two “linear expressions”
x(i) >= 0 and 10 >= x(i)
Analogous to the
numerical
expression case
implicit def NumExprGTEOp[A, B](
implicit convA: A => NumExpr,
convB: B => NumExpr)
conflicts with:
implicit def ParamStatGTEOp[A](
implicit conv: A => NumExpr)
implicit def LinExprGTEOp[A, B](
implicit convA: A => LinExpr,
convB: B => LinExpr)
Instances are ambiguous
implicit def NumExprGTEOp[A, B](
implicit convA: A => NumExpr,
convB: B => NumExpr)
conflicts with:
implicit def ParamStatGTEOp[A](
implicit conv: A => NumExpr)
implicit def LinExprGTEOp[A, B](
implicit convA: A => LinExpr,
convB: B => LinExpr)
Instances are ambiguous
`ParamStat <% NumExpr‘
to allow
`param(“p2”) >= p1’
Instances are ambiguous
implicit def NumExprGTEOp[A, B](
implicit convA: A => NumExpr,
convB: B => NumExpr)
conflicts with:
implicit def ParamStatGTEOp[A](
implicit conv: A => NumExpr)
implicit def LinExprGTEOp[A, B](
implicit convA: A => LinExpr,
convB: B => LinExpr)
NumExpr <: LinExpr
=>
NumExpr <% LinExpr
Implicits prioritization
trait GTEInstances extends GTEInstancesLowPriority1 {
implicit def ParamStatGTEOp[A](implicit conv: A => NumExpr) /* */
implicit def VarStatGTEOp[A](implicit conv: A => NumExpr) /* */
}
trait GTEInstancesLowPriority1 extends GTEInstancesLowPriority2 {
implicit def NumExprGTEOp[A, B](
implicit convA: A => NumExpr, convB: B => NumExpr) /* */
}
trait GTEInstancesLowPriority2 {
implicit def LinExprGTEOp[A, B](
implicit convA: A => LinExpr, convB: B => LinExpr) /* */
}
Implicits prioritization
trait GTEInstances extends GTEInstancesLowPriority1 {
implicit def ParamStatGTEOp[A](implicit conv: A => NumExpr) /* */
implicit def VarStatGTEOp[A](implicit conv: A => NumExpr) /* */
}
trait GTEInstancesLowPriority1 extends GTEInstancesLowPriority2 {
implicit def NumExprGTEOp[A, B](
implicit convA: A => NumExpr, convB: B => NumExpr) /* */
}
trait GTEInstancesLowPriority2 {
implicit def LinExprGTEOp[A, B](
implicit convA: A => LinExpr, convB: B => LinExpr) /* */
}
> priority
> priority
Next steps
New semantics
More static controls
Support other kind of problems beyond MIP
Talk directly to solvers
Arity, scope, ...
Multi-stage stochastic programming
import amphip.dsl._import amphip.dsl._
amphip is a collection of
experiments around
manipulating MathProg
models within Scala
github.com/gerferra/amphip
amphip is a collection of
experiments around
manipulating MathProg
models within Scala
github.com/gerferra/amphip
FIN
github.com/gerferra/amphip

More Related Content

Viewers also liked (14)

The Need for Async @ ScalaWorld by Konrad Malawski, has 170 slides with 4545 views.The document provides an overview of asynchronous processing and how it relates to scalability and performance. It discusses key topics like sync vs async, scheduling, latency measurement, concurrent vs lock-free vs wait-free data structures, I/O models like IO, AIO, NIO, zero-copy, and sorting algorithms. It emphasizes picking the right tools for the job and properly benchmarking and measuring performance.
The Need for Async @ ScalaWorldThe Need for Async @ ScalaWorld
The Need for Async @ ScalaWorld
Konrad Malawski
170 slides4.5K views
Integer Programming, Gomory by AVINASH JURIANI, has 43 slides with 4378 views.This document discusses integer programming and methods for solving integer programming problems. It begins with an introduction to integer programming models, including total integer models, 0-1 integer models, and mixed integer models. It then provides examples of each type of integer programming model. The document also describes traditional approaches for solving integer programming problems, including the branch and bound method and Gomory cutting plane method. It provides an example demonstration of applying the Gomory cutting plane method.
Integer Programming, GomoryInteger Programming, Gomory
Integer Programming, Gomory
AVINASH JURIANI
43 slides4.4K views
Integer programming by Hakeem-Ur- Rehman, has 60 slides with 48612 views.This document provides an introduction and overview of integer programming problems. It discusses different types of integer programming problems including pure integer, mixed integer, and 0-1 integer problems. It provides examples to illustrate how to formulate integer programming problems as mathematical models. The document also discusses common solution methods for integer programming problems, including the cutting-plane method. An example of the cutting-plane method is provided to demonstrate how it works to find an optimal integer solution.
Integer programmingInteger programming
Integer programming
Hakeem-Ur- Rehman
60 slides48.6K views
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A... by Helena Edelson, has 58 slides with 12622 views.Streaming Big Data: Delivering Meaning In Near-Real Time At High Velocity At Massive Scale with Apache Spark, Apache Kafka, Apache Cassandra, Akka and the Spark Cassandra Connector. Why this pairing of technologies and How easy it is to implement. Example application: https://github.com/killrweather/killrweather
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...
Helena Edelson
58 slides12.6K views
Purely Functional Data Structures in Scala by Vladimir Kostyukov, has 40 slides with 52906 views.Slides of my talk for Scala NSK Usergroup. Video in Russian: http://www.youtube.com/watch?v=fWnaW3CP7OI
Purely Functional Data Structures in ScalaPurely Functional Data Structures in Scala
Purely Functional Data Structures in Scala
Vladimir Kostyukov
40 slides52.9K views
Monadic Java by Mario Fusco, has 73 slides with 66388 views.The document discusses monads and functional programming concepts. It begins by explaining that monads are structures that put values in computational contexts. It then provides a technical definition of a monad involving endofunctors, natural transformations, and laws. Several examples are given to illustrate monads, including the Optional monad in Java to handle null values, and the Stream monad to represent sequences. The document advocates using monads to make aspects like errors, state, and effects explicit in a program's type system.
Monadic JavaMonadic Java
Monadic Java
Mario Fusco
73 slides66.4K views
NewSQL overview, Feb 2015 by Ivan Glushkov, has 57 slides with 31939 views.NewSQL overview: - History of RDBMs - The reasons why NoSQL concept appeared - Why NoSQL was not enough, the necessity of NewSQL - Characteristics of NewSQL - 7 DBs that belongs to NewSQL - Overview Table with main properties
NewSQL overview, Feb 2015NewSQL overview, Feb 2015
NewSQL overview, Feb 2015
Ivan Glushkov
57 slides31.9K views
The Newest in Session Types by Roland Kuhn, has 24 slides with 3934 views.The new Actor representation in Akka Typed allows formulations that lend themselves to monadic interpretation or introspection. This leads us to explore possibilities for expressing and verifying dynamic properties like the adherence to a communication protocol between multiple agents as well as the safety properties of that protocol on a global level. Academic research in this area is far from complete, but there are interesting initial results that we explore in this session: precisely how much purity and reasoning can we bring to the distributed world?
The Newest in Session TypesThe Newest in Session Types
The Newest in Session Types
Roland Kuhn
24 slides3.9K views
Scala Days San Francisco by Martin Odersky, has 48 slides with 65889 views.- Scala originated from Martin Odersky's work on functional programming languages like OCaml in the 1980s and 1990s. It was designed to combine object-oriented and functional programming in a practical way. - Key aspects of Scala include being statically typed while also being flexible, its unified object and module system, and treating libraries as primary over language features. - Scala has grown into an large ecosystem centered around the JVM and also targets JavaScript via Scala.js. Tooling continues to improve with faster compilers and new IDE support. - Future work includes establishing TASTY as a portable intermediate representation, connecting Scala to formal foundations through the DOT calculus, and exploring new type
Scala Days San FranciscoScala Days San Francisco
Scala Days San Francisco
Martin Odersky
48 slides65.9K views
Espresso: LinkedIn's Distributed Data Serving Platform (Paper) by Amy W. Tang, has 12 slides with 41147 views.This paper, written by the LinkedIn Espresso Team, appeared at the ACM SIGMOD/PODS Conference (June 2013). To see the talk given by Swaroop Jagadish (Staff Software Engineer @ LinkedIn), go here: http://www.slideshare.net/amywtang/li-espresso-sigmodtalk
Espresso: LinkedIn's Distributed Data Serving Platform (Paper)Espresso: LinkedIn's Distributed Data Serving Platform (Paper)
Espresso: LinkedIn's Distributed Data Serving Platform (Paper)
Amy W. Tang
12 slides41.1K views
Mixed Integer Programming: Analyzing 12 Years of Progress by IBM Decision Optimization, has 32 slides with 1886 views.This presentation was first given at INFORMS in November 2013. It presents an analysis of the features that had the most impact on MIP solver performance during the last 12 years. More presentations are available at https://www.ibm.com/developerworks/community/groups/community/DecisionOptimization
Mixed Integer Programming: Analyzing 12 Years of ProgressMixed Integer Programming: Analyzing 12 Years of Progress
Mixed Integer Programming: Analyzing 12 Years of Progress
IBM Decision Optimization
32 slides1.9K views
Functional Programming Patterns (BuildStuff '14) by Scott Wlaschin, has 249 slides with 175897 views.(video of these slides available here http://fsharpforfunandprofit.com/fppatterns/) In object-oriented development, we are all familiar with design patterns such as the Strategy pattern and Decorator pattern, and design principles such as SOLID. The functional programming community has design patterns and principles as well. This talk will provide an overview of some of these, and present some demonstrations of FP design in practice.
Functional Programming Patterns (BuildStuff '14)Functional Programming Patterns (BuildStuff '14)
Functional Programming Patterns (BuildStuff '14)
Scott Wlaschin
249 slides175.9K views
Concurrency: The Good, The Bad and The Ugly by legendofklang, has 203 slides with 39309 views.This document compares different approaches to concurrency and distributed computing, including threads with locks, executors, software transactional memory (STM), futures, actors, dataflow, asynchronous programming, reactive programming, and functional reactive programming (FRP). For each approach, it outlines the good qualities, potential bad qualities, and ugly issues to watch out for. In the conclusion, it recommends picking approaches tailored to each problem domain and system requirements.
Concurrency: The Good, The Bad and The UglyConcurrency: The Good, The Bad and The Ugly
Concurrency: The Good, The Bad and The Ugly
legendofklang
203 slides39.3K views
Simplex two phase by Shakti Ranjan, has 61 slides with 14564 views.The document describes the two phase simplex method for solving linear programming problems (LPP) with greater than or equal to constraints. In phase I, an auxiliary LPP is constructed by introducing artificial variables and slack/surplus variables. The objective is to minimize the artificial variables using the simplex method. If an artificial variable is positive or zero in the optimal basis, phase II is executed to solve the original LPP. Phase I provides a starting feasible solution for phase II to obtain the actual optimal solution.
Simplex two phaseSimplex two phase
Simplex two phase
Shakti Ranjan
61 slides14.6K views

Recently uploaded (20)

How a Staff Augmentation Company IN USA Powers Flutter App Breakthroughs.pdf by mary rojas, has 4 slides with 26 views.With local teams and talent aligned with U.S. business hours, a staff augmentation company in the USA enables real-time communication, faster decision-making, and better project coordination. This ensures smoother workflows compared to offshore-only models, especially for companies requiring tight collaboration.
How a Staff Augmentation Company IN USA Powers Flutter App Breakthroughs.pdfHow a Staff Augmentation Company IN USA Powers Flutter App Breakthroughs.pdf
How a Staff Augmentation Company IN USA Powers Flutter App Breakthroughs.pdf
mary rojas
4 slides26 views
Internship in South western railways on software by abhim5889, has 20 slides with 10 views.Internship in South western railways
Internship in South western railways on softwareInternship in South western railways on software
Internship in South western railways on software
abhim5889
20 slides10 views
Build enterprise-ready applications using skills you already have! by PhilMeredith3, has 12 slides with 36 views.Process Tempo is a rapid application development (RAD) environment that empowers data teams to create enterprise-ready applications using skills they already have. With Process Tempo, data teams can craft beautiful, pixel-perfect applications the business will love. Process Tempo combines features found in business intelligence tools, graphic design tools and workflow solutions - all in a single platform. Process Tempo works with all major databases such as Databricks, Snowflake, Postgres and MySQL. It also works with leading graph database technologies such as Neo4j, Puppy Graph and Memgraph. It is the perfect platform to accelerate the delivery of data-driven solutions. For more information, you can find us at www.processtempo.com
Build enterprise-ready applications using skills you already have!Build enterprise-ready applications using skills you already have!
Build enterprise-ready applications using skills you already have!
PhilMeredith3
12 slides36 views
Software Risk and Quality management.pptx by HassanBangash9, has 20 slides with 13 views.Software Risk and Quality Manager
Software Risk and Quality management.pptxSoftware Risk and Quality management.pptx
Software Risk and Quality management.pptx
HassanBangash9
20 slides13 views
Topic 26 Security Testing Considerations.pptx by marutnand8, has 27 slides with 10 views.....
Topic 26 Security Testing Considerations.pptxTopic 26 Security Testing Considerations.pptx
Topic 26 Security Testing Considerations.pptx
marutnand8
27 slides10 views
iOS Developer Resume 2025 | Pramod Kumar by Pramod Kumar, has 1 slides with 10 views.Explore the professional resume of Pramod Kumar, a skilled iOS developer with extensive experience in Swift, SwiftUI, and mobile app development. This portfolio highlights key projects, technical skills, and achievements in app design and development, showcasing expertise in creating intuitive, high-performance iOS applications. Ideal for recruiters and tech managers seeking a talented iOS engineer for their team.
iOS Developer Resume 2025 | Pramod KumariOS Developer Resume 2025 | Pramod Kumar
iOS Developer Resume 2025 | Pramod Kumar
Pramod Kumar
1 slide10 views
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdf by QuickBooks Training, has 43 slides with 9 views.Are you preparing your budget for the next year, applying for a business credit card or loan, or opening a company bank account? If so, you may find QuickBooks financial statements to be a very useful tool. These statements offer a brief, well-structured overview of your company’s finances, facilitating goal-setting and money management. Don’t worry if you’re not knowledgeable about QuickBooks financial statements. These statements are complete reports from QuickBooks that provide an overview of your company’s financial procedures. They thoroughly view your financial situation by including important features: income, expenses, investments, and disadvantages. QuickBooks financial statements facilitate your financial management and assist you in making wise determinations, regardless of your experience as a business owner.
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdfHow to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
QuickBooks Training
43 slides9 views
SQL-COMMANDS instructionsssssssssss.pptx by Ashlei5, has 16 slides with 8 views.SQL commands
SQL-COMMANDS instructionsssssssssss.pptxSQL-COMMANDS instructionsssssssssss.pptx
SQL-COMMANDS instructionsssssssssss.pptx
Ashlei5
16 slides8 views
Optimising Claims Management with Claims Processing Systems by Insurance Tech Services, has 4 slides with 25 views.A Claims Processing System enhances customer satisfaction, efficiency, and compliance by automating the claims lifecycle—enabling faster settlements, fewer errors, and greater transparency. Explore More - https://www.damcogroup.com/insurance/claims-management-software
Optimising Claims Management with Claims Processing SystemsOptimising Claims Management with Claims Processing Systems
Optimising Claims Management with Claims Processing Systems
Insurance Tech Services
4 slides25 views
Boost Student Engagement with Smart Attendance Software for Schools by Visitu , has 5 slides with 6 views.Boosting student engagement is crucial for educational success, and smart attendance software is a powerful tool in achieving that goal. Read the doc to know more.
Boost Student Engagement with Smart Attendance Software for SchoolsBoost Student Engagement with Smart Attendance Software for Schools
Boost Student Engagement with Smart Attendance Software for Schools
Visitu
5 slides6 views
Why Indonesia’s $12.63B Alt-Lending Boom Needs Loan Servicing Automation & Re... by Prachi Desai, has 3 slides with 9 views. Alt-lenders are scaling fast, but manual loan reconciliation is cracking under pressure. See how automation solves revenue leakage and compliance chaos. https://www.taxilla.com/loan-repayment-reconciliation
Why Indonesia’s $12.63B Alt-Lending Boom Needs Loan Servicing Automation & Re...Why Indonesia’s $12.63B Alt-Lending Boom Needs Loan Servicing Automation & Re...
Why Indonesia’s $12.63B Alt-Lending Boom Needs Loan Servicing Automation & Re...
Prachi Desai
3 slides9 views
Agentic AI Desgin Principles in five slides.pptx by MOSIUOA WESI, has 7 slides with 34 views.Discover the core design patterns that enable AI agents to think, learn, and collaborate like never before. From breaking down goals to coordinating across systems, these patterns form the foundation of advanced intelligent behavior. Learn how reinforcement learning, hierarchical planning, and multi-agent systems are transforming AI capabilities. This presentation offers a concise yet powerful overview of agentic design in action. Perfect for developers, researchers, and AI enthusiasts ready to build smarter systems.
Agentic AI Desgin Principles in five slides.pptxAgentic AI Desgin Principles in five slides.pptx
Agentic AI Desgin Principles in five slides.pptx
MOSIUOA WESI
7 slides34 views
Shortcomings of EHS Software – And How to Overcome Them by TECH EHS Solution, has 8 slides with 30 views.Shortcomings of EHS Software—and What Overcomes Them What you'll learn in just 8 slides: - 🔍 Why most EHS software implementations struggle initially - 🚧 3 common pitfalls: adoption, workflow disruption, and delayed ROI - 🛠️ Practical solutions that deliver long-term value - 🔐 Key features: centralization, security, affordability - 📈 Why the pros outweigh the cons Perfect for HSE heads, plant managers, and compliance leads! #EHS #TECHEHS #WorkplaceSafety #EHSCompliance #EHSManagement #ehssoftware #safetysoftware
Shortcomings of EHS Software – And How to Overcome ThemShortcomings of EHS Software – And How to Overcome Them
Shortcomings of EHS Software – And How to Overcome Them
TECH EHS Solution
8 slides30 views
The rise of e-commerce has redefined how retailers operate—and reconciliation... by Prachi Desai, has 5 slides with 9 views.As payment flows grow more fragmented, the complexity of reconciliation and revenue recognition increases. The result? Mounting operational costs, silent revenue leakages, and avoidable financial risk. Spot the inefficiencies. Automate what’s slowing you down. https://www.taxilla.com/ecommerce-reconciliation
The rise of e-commerce has redefined how retailers operate—and reconciliation...The rise of e-commerce has redefined how retailers operate—and reconciliation...
The rise of e-commerce has redefined how retailers operate—and reconciliation...
Prachi Desai
5 slides9 views
Autoposting.ai Sales Deck - Skyrocket your LinkedIn's ROI by Udit Goenka, has 20 slides with 25 views.1billion people scroll, only 1 % post… That’s your opening to hijack LinkedIn—and Autoposting.ai is the unfair weapon Slideshare readers are hunting for… LinkedIn drives 80 % of social B2B leads, converts 2× better than every other network, yet 87 % of pros still choke on the content hamster-wheel… They burn 25 h a month writing beige posts, miss hot trends, then watch rivals scoop the deals… Enter Autoposting.ai, the first agentic-AI engine built only for LinkedIn domination… It spies on fresh feed data, cracks trending angles before they peak, and spins voice-perfect thought-leadership that sounds like you—not a robot… Slides in play: • 78 % average engagement lift in 90 days… • 3.2× qualified-lead surge over manual posting… • 42 % marketing time clawed back, week after week… Real users report 5-8× ROI inside the first quarter, some crossing $1 M ARR six months faster… Why does it hit harder than Taplio, Supergrow, generic AI writers? • Taplio locks key features behind $149+ tiers… Autoposting gives you everything at $29… • Supergrow churns at 20 % because “everyone” is no-one… Autoposting laser-targets • • LinkedIn’s gold-vein ICPs and keeps them glued… • ChatGPT needs prompts, edits, scheduling hacks… Autoposting researches, writes, schedules—and optimizes send-time in one sweep… Need social proof? G2 reviews scream “game-changer”… Agencies slash content production 80 % and triple client capacity… CXOs snag PR invites and investor DMs after a single week of daily posts… Employee advocates hit 8× reach versus company pages and pump 25 % more SQLs into the funnel… Feature bullets for the skim-reader: • Agentic Research Engine—tracks 27+ data points, finds gaps your rivals ignore… • Real Voice Match—your tone, slang, micro-jokes, intact… • One-click Multiplatform—echo winning posts to Twitter, Insta, Facebook… • Team Workspaces—spin up 10 seats without enterprise red tape… • AI Timing—drops content when your buyers actually scroll, boosting first-hour velocity by up to 4×… Risk? Zero… Free 7-day trial, 90-day results guarantee—hit 300 % ROI or walk away… but the clock is ticking while competitors scoop your feed… So here’s the ask: Swipe down, smash the “Download” or “Try Now” button, and let Autoposting.ai turn Slideshare insights into pipeline—before today’s trending topic vanishes… The window is open… How loud do you want your LinkedIn megaphone?
Autoposting.ai Sales Deck - Skyrocket your LinkedIn's ROIAutoposting.ai Sales Deck - Skyrocket your LinkedIn's ROI
Autoposting.ai Sales Deck - Skyrocket your LinkedIn's ROI
Udit Goenka
20 slides25 views
Rebuilding Cadabra Studio: AI as Our Core Foundation by Cadabra Studio, has 8 slides with 11 views.Cadabra Studio set out to reconstruct its core processes, driven entirely by AI, across all functions of its software development lifecycle. This journey resulted in remarkable efficiency improvements of 40–80% and reshaped the way teams collaborate. This presentation shares our challenges and lessons learned in becoming an AI-native firm, including overcoming internal resistance and achieving significant project delivery gains. Discover our strategic approach and transformative recommendations to integrate AI not just as a feature, but as a fundamental element of your operational structure. What changes will AI bring to your company?
Rebuilding Cadabra Studio: AI as Our Core FoundationRebuilding Cadabra Studio: AI as Our Core Foundation
Rebuilding Cadabra Studio: AI as Our Core Foundation
Cadabra Studio
8 slides11 views
zOS CommServer support for the Network Express feature on z17 by zOSCommserver, has 52 slides with 125 views.The IBM z17 has undergone a transformation with an entirely new System I/O hardware and architecture model for both storage and networking. The z17 offers I/O capability that is integrated directly within the Z processor complex. The new system design moves I/O operations closer to the system processor and memory. This new design approach transforms I/O operations allowing Z workloads to grow and scale to meet the growing needs of current and future IBM Hybrid Cloud Enterprise workloads. This presentation will focus on the networking I/O transformation by introducing you to the new IBM z17 Network Express feature. The Network Express feature introduces new system architecture called Enhanced QDIO (EQDIO). EQDIO allows the updated z/OS Communications Server software to interact with the Network Express hardware using new optimized I/O operations. The new design and optimizations are required to meet the demand of the continuously growing I/O rates. Network Express and EQDIO build the foundation for the introduction of advanced Ethernet and networking capabilities for the future of IBM Z Hybrid Cloud Enterprise users. The Network Express feature also combines the functionality of both the OSA-Express and RoCE Express features into a single feature or adapter. A single Network Express port supports both IP protocols and RDMA protocols. This allows each Network Express port to function as both a standard NIC for Ethernet and as an RDMA capable NIC (RNIC) for RoCE protocols. Converging both protocols to a single adapter reduces Z customers’ cost for physical networking resources. With this change, IBM Z customers can now exploit Shared Memory Communications (SMC) leveraging RDMA (SMC-R) technology without incurring additional hardware costs. In this session, the speakers will focus on how z/OS Communications Server has been updated to support the Network Express feature. An introduction to the new Enhanced QDIO Ethernet (EQENET) interface statement used to configure the new OSA is provided. EQDIO provides a variety of simplifications, such as no longer requiring VTAM user defined TRLEs, uses smarter defaults and removes outdated parameters. The speakers will also cover migration considerations for Network Express. In addition, the operational aspects of managing and monitoring the new OSA and RoCE interfaces will be covered. The speakers will also take you through the enhancements made to optimize both inbound and outbound network traffic. Come join us, step aboard and learn how z/OS Communications Server is bringing you the future in network communications with the IBM z17 Network Express feature.
zOS CommServer support for the Network Express feature on z17zOS CommServer support for the Network Express feature on z17
zOS CommServer support for the Network Express feature on z17
zOSCommserver
52 slides125 views
How AI Can Improve Media Quality Testing Across Platforms (1).pptx by kalichargn70th171, has 16 slides with 12 views.Media platforms, from video streaming to OTT and Smart TV apps, face unprecedented pressure to deliver seamless, high-quality experiences across diverse devices and networks. Ensuring top-notch Quality of Experience (QoE) is critical for user satisfaction and retention.
How AI Can Improve Media Quality Testing Across Platforms (1).pptxHow AI Can Improve Media Quality Testing Across Platforms (1).pptx
How AI Can Improve Media Quality Testing Across Platforms (1).pptx
kalichargn70th171
16 slides12 views
Online Queue Management System for Public Service Offices [Focused on Municip... by Rishab Acharya, has 34 slides with 10 views.This report documents the design and development of an Online Queue Management System tailored specifically for municipal offices in Nepal. Municipal offices, as critical providers of essential public services, face challenges including overcrowded queues, long waiting times, and inefficient service delivery, causing inconvenience to citizens and pressure on municipal staff. The proposed digital platform allows citizens to book queue tokens online for various physical services, facilitating efficient queue management and real-time wait time updates. Beyond queue management, the system includes modules to oversee non-physical developmental programs, such as educational and social welfare initiatives, enabling better participation and progress monitoring. Furthermore, it incorporates a module for monitoring infrastructure development projects, promoting transparency and allowing citizens to report issues and track progress. The system development follows established software engineering methodologies, including requirement analysis, UML-based system design, and iterative testing. Emphasis has been placed on user-friendliness, security, and scalability to meet the diverse needs of municipal offices across Nepal. Implementation of this integrated digital platform will enhance service efficiency, increase transparency, and improve citizen satisfaction, thereby supporting the modernization and digital transformation of public service delivery in Nepal.
Online Queue Management System for Public Service Offices [Focused on Municip...Online Queue Management System for Public Service Offices [Focused on Municip...
Online Queue Management System for Public Service Offices [Focused on Municip...
Rishab Acharya
34 slides10 views
AI Alternative - Discover the best AI tools and their alternatives by AI Alternative, has 15 slides with 14 views.AIAlternative.co is a comprehensive directory designed to help users discover, compare, and evaluate AI tools across various domains. Its primary goal is to assist individuals and businesses in finding the most suitable AI solutions tailored to their specific needs. Key Features - Curated AI Tool Listings: The platform offers detailed information on a wide range of AI tools, including their functionalities, use cases, and alternatives. This allows users to make informed decisions based on their requirements. - Alternative Suggestions: For each listed AI tool, aialternative.co provides suggestions for similar or alternative tools, facilitating easier comparison and selection. - Regular Updates: The directory is consistently updated to include the latest AI innovations, ensuring users have access to the most current tools available in the market. Browse All Tools here: https://aialternative.co/
AI Alternative - Discover the best AI tools and their alternativesAI Alternative - Discover the best AI tools and their alternatives
AI Alternative - Discover the best AI tools and their alternatives
AI Alternative
15 slides14 views
Autoposting.ai Sales Deck - Skyrocket your LinkedIn's ROI by Udit Goenka, has 20 slides with 25 views.1billion people scroll, only 1 % post… That’s your opening to hijack LinkedIn—and Autoposting.ai is the unfair weapon Slideshare readers are hunting for… LinkedIn drives 80 % of social B2B leads, converts 2× better than every other network, yet 87 % of pros still choke on the content hamster-wheel… They burn 25 h a month writing beige posts, miss hot trends, then watch rivals scoop the deals… Enter Autoposting.ai, the first agentic-AI engine built only for LinkedIn domination… It spies on fresh feed data, cracks trending angles before they peak, and spins voice-perfect thought-leadership that sounds like you—not a robot… Slides in play: • 78 % average engagement lift in 90 days… • 3.2× qualified-lead surge over manual posting… • 42 % marketing time clawed back, week after week… Real users report 5-8× ROI inside the first quarter, some crossing $1 M ARR six months faster… Why does it hit harder than Taplio, Supergrow, generic AI writers? • Taplio locks key features behind $149+ tiers… Autoposting gives you everything at $29… • Supergrow churns at 20 % because “everyone” is no-one… Autoposting laser-targets • • LinkedIn’s gold-vein ICPs and keeps them glued… • ChatGPT needs prompts, edits, scheduling hacks… Autoposting researches, writes, schedules—and optimizes send-time in one sweep… Need social proof? G2 reviews scream “game-changer”… Agencies slash content production 80 % and triple client capacity… CXOs snag PR invites and investor DMs after a single week of daily posts… Employee advocates hit 8× reach versus company pages and pump 25 % more SQLs into the funnel… Feature bullets for the skim-reader: • Agentic Research Engine—tracks 27+ data points, finds gaps your rivals ignore… • Real Voice Match—your tone, slang, micro-jokes, intact… • One-click Multiplatform—echo winning posts to Twitter, Insta, Facebook… • Team Workspaces—spin up 10 seats without enterprise red tape… • AI Timing—drops content when your buyers actually scroll, boosting first-hour velocity by up to 4×… Risk? Zero… Free 7-day trial, 90-day results guarantee—hit 300 % ROI or walk away… but the clock is ticking while competitors scoop your feed… So here’s the ask: Swipe down, smash the “Download” or “Try Now” button, and let Autoposting.ai turn Slideshare insights into pipeline—before today’s trending topic vanishes… The window is open… How loud do you want your LinkedIn megaphone?
Autoposting.ai Sales Deck - Skyrocket your LinkedIn's ROIAutoposting.ai Sales Deck - Skyrocket your LinkedIn's ROI
Autoposting.ai Sales Deck - Skyrocket your LinkedIn's ROI
Udit Goenka
20 slides25 views
zOS CommServer support for the Network Express feature on z17 by zOSCommserver, has 52 slides with 125 views.The IBM z17 has undergone a transformation with an entirely new System I/O hardware and architecture model for both storage and networking. The z17 offers I/O capability that is integrated directly within the Z processor complex. The new system design moves I/O operations closer to the system processor and memory. This new design approach transforms I/O operations allowing Z workloads to grow and scale to meet the growing needs of current and future IBM Hybrid Cloud Enterprise workloads. This presentation will focus on the networking I/O transformation by introducing you to the new IBM z17 Network Express feature. The Network Express feature introduces new system architecture called Enhanced QDIO (EQDIO). EQDIO allows the updated z/OS Communications Server software to interact with the Network Express hardware using new optimized I/O operations. The new design and optimizations are required to meet the demand of the continuously growing I/O rates. Network Express and EQDIO build the foundation for the introduction of advanced Ethernet and networking capabilities for the future of IBM Z Hybrid Cloud Enterprise users. The Network Express feature also combines the functionality of both the OSA-Express and RoCE Express features into a single feature or adapter. A single Network Express port supports both IP protocols and RDMA protocols. This allows each Network Express port to function as both a standard NIC for Ethernet and as an RDMA capable NIC (RNIC) for RoCE protocols. Converging both protocols to a single adapter reduces Z customers’ cost for physical networking resources. With this change, IBM Z customers can now exploit Shared Memory Communications (SMC) leveraging RDMA (SMC-R) technology without incurring additional hardware costs. In this session, the speakers will focus on how z/OS Communications Server has been updated to support the Network Express feature. An introduction to the new Enhanced QDIO Ethernet (EQENET) interface statement used to configure the new OSA is provided. EQDIO provides a variety of simplifications, such as no longer requiring VTAM user defined TRLEs, uses smarter defaults and removes outdated parameters. The speakers will also cover migration considerations for Network Express. In addition, the operational aspects of managing and monitoring the new OSA and RoCE interfaces will be covered. The speakers will also take you through the enhancements made to optimize both inbound and outbound network traffic. Come join us, step aboard and learn how z/OS Communications Server is bringing you the future in network communications with the IBM z17 Network Express feature.
zOS CommServer support for the Network Express feature on z17zOS CommServer support for the Network Express feature on z17
zOS CommServer support for the Network Express feature on z17
zOSCommserver
52 slides125 views
Online Queue Management System for Public Service Offices [Focused on Municip... by Rishab Acharya, has 34 slides with 10 views.This report documents the design and development of an Online Queue Management System tailored specifically for municipal offices in Nepal. Municipal offices, as critical providers of essential public services, face challenges including overcrowded queues, long waiting times, and inefficient service delivery, causing inconvenience to citizens and pressure on municipal staff. The proposed digital platform allows citizens to book queue tokens online for various physical services, facilitating efficient queue management and real-time wait time updates. Beyond queue management, the system includes modules to oversee non-physical developmental programs, such as educational and social welfare initiatives, enabling better participation and progress monitoring. Furthermore, it incorporates a module for monitoring infrastructure development projects, promoting transparency and allowing citizens to report issues and track progress. The system development follows established software engineering methodologies, including requirement analysis, UML-based system design, and iterative testing. Emphasis has been placed on user-friendliness, security, and scalability to meet the diverse needs of municipal offices across Nepal. Implementation of this integrated digital platform will enhance service efficiency, increase transparency, and improve citizen satisfaction, thereby supporting the modernization and digital transformation of public service delivery in Nepal.
Online Queue Management System for Public Service Offices [Focused on Municip...Online Queue Management System for Public Service Offices [Focused on Municip...
Online Queue Management System for Public Service Offices [Focused on Municip...
Rishab Acharya
34 slides10 views

An embedded DSL to manipulate MathProg Mixed Integer Programming models within Scala

  • 1. Germán Ferrari Instituto de Computación, Universidad de la República, Uruguay An embedded DSL to manipulate MathProg Mixed Integer Programming models within Scala An embedded DSL to manipulate MathProg Mixed Integer Programming models within Scala Germán Ferrari Instituto de Computación, Universidad de la República, Uruguay
  • 2. GNU MathProg MathProg = Mathematical Programming Has nothing to do with computer programming It’s a synonym of “mathematical optimization” A “program” here refers to a plan or schedule
  • 3. GNU MathProg It’s a modeling language Optimization problem Mathematical modeling GNU MathProg Computational experiments Supported by the GNU Linear Programming Kit
  • 4. GNU MathProg Supports linear models, with either real or integer decision variables This is called “Mixed Integer Programming” (MIP) because it mixes integer and real variables
  • 5. Generic MIP optimization problem minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; subject to g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i];
  • 6. Generic MIP optimization problem Find x[j] and y[k], that minimize a function f, satisfying constraints g[i] minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; subject to g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i];
  • 7. Generic MIP optimization problem Find x[j] and y[k], that minimize a function f, satisfying constraints g[i] minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; subject to g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; Decision variables (real or integer)
  • 8. Generic MIP optimization problem Find x[j] and y[k], that minimize a function f, satisfying constraints g[i] minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; subject to g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; Decision variables (real or integer) Objective function
  • 9. Generic MIP optimization problem Find x[j] and y[k], that minimize a function f, satisfying constraints g[i] minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; subject to g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; Decision variables (real or integer) Objective function Constraints
  • 10. Generic MIP optimization problem Find x[j] and y[k], that minimize a function f, satisfying constraints g[i] minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; subject to g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; Decision variables (real or integer) Objective function Constraints Linear
  • 11. Generic MIP optimization problem Full model param m; param n; param l; set I := 1 .. m; set J := 1 .. n; set K := 1 .. l; param c{J}; param d{K}; param a{I, J}; param e{I, K}; param b{I}; var x{J} integer, >= 0; var y{K} >= 0; minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; subject to g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i];
  • 12. param m; param n; param l; set I := 1 .. m; set J := 1 .. n; set K := 1 .. l; param c{J}; param d{K}; param a{I, J}; param e{I, K}; param b{I}; var x{J} integer, >= 0; var y{K} >= 0; minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; subject to g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; Generic MIP optimization problem Declaration of variables
  • 13. param m; param n; param l; set I := 1 .. m; set J := 1 .. n; set K := 1 .. l; param c{J}; param d{K}; param a{I, J}; param e{I, K}; param b{I}; var x{J} integer, >= 0; var y{K} >= 0; minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; subject to g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; Generic MIP optimization problem Parameters
  • 14. Generic MIP optimization problem param m; param n; param l; set I := 1 .. m; set J := 1 .. n; set K := 1 .. l; param c{J}; param d{K}; param a{I, J}; param e{I, K}; param b{I}; var x{J} integer, >= 0; var y{K} >= 0; minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; subject to g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; Indexing sets
  • 15. Why MathProg in Scala
  • 16. Why MathProg in Scala Generate constraints Create derived models Develop custom resolution methods at high level ...
  • 17. MathProg in Scala (deep embedding) Syntax Represent MathProg models with Scala data types Mimic MathProg syntax with Scala functions Semantics Generate MathProg code, others ...
  • 18. MathProg in Scala (deep embedding) Syntax Represent MathProg models with Scala data types Mimic MathProg syntax with Scala functions Semantics Generate MathProg code, others ... Abstract syntax tree
  • 19. MathProg in Scala (deep embedding) Syntax Represent MathProg models with Scala data types Mimic MathProg syntax with Scala functions Semantics Generate MathProg code, others ... Smart constructors and combinators Abstract syntax tree
  • 20. MathProg EDSL param m; param n; param l; set I := 1 .. m; set J := 1 .. n; set K := 1 .. l; param c{J}; param d{K}; param a{I, J}; // ... var x{J} integer, >= 0; var y{K} >= 0; val m = param("m") val n = param("n") val l = param("l") val I = set("I") := 1 to m val J = set("J") := 1 to n val K = set("K") := 1 to l val c = param("c", J) val d = param("d", K) val a = param("a", I, J) // ... val x = xvar("x", J).integer >= 0 val y = xvar("y", K) >= 0
  • 21. MathProg EDSL param m; param n; param l; set I := 1 .. m; set J := 1 .. n; set K := 1 .. l; param c{J}; param d{K}; param a{I, J}; // ... var x{J} integer, >= 0; var y{K} >= 0; val m = param("m") val n = param("n") val l = param("l") val I = set("I") := 1 to m val J = set("J") := 1 to n val K = set("K") := 1 to l val c = param("c", J) val d = param("d", K) val a = param("a", I, J) // ... val x = xvar("x", J).integer >= 0 val y = xvar("y", K) >= 0 set param xvar ...
  • 22. MathProg EDSL param m; param n; param l; set I := 1 .. m; set J := 1 .. n; set K := 1 .. l; param c{J}; param d{K}; param a{I, J}; // ... var x{J} integer, >= 0; var y{K} >= 0; val m = param("m") val n = param("n") val l = param("l") val I = set("I") := 1 to m val J = set("J") := 1 to n val K = set("K") := 1 to l val c = param("c", J) val d = param("d", K) val a = param("a", I, J) // ... val x = xvar("x", J).integer >= 0 val y = xvar("y", K) >= 0 set param xvar ... ParamStat( "c", domain = Some( IndExpr( List( IndEntry( Nil, SetRef(J) ) ))))
  • 23. val m = param("m") val n = param("n") val l = param("l") val I = set("I") := 1 to m val J = set("J") := 1 to n val K = set("K") := 1 to l val c = param("c", J) val d = param("d", K) val a = param("a", I, J) // ... val x = xvar("x", J).integer >= 0 val y = xvar("y", K) >= 0 MathProg EDSL Scala range notation for arithmetic sets param m; param n; param l; set I := 1 .. m; set J := 1 .. n; set K := 1 .. l; param c{J}; param d{K}; param a{I, J}; // ... var x{J} integer, >= 0; var y{K} >= 0;
  • 24. val m = param("m") val n = param("n") val l = param("l") val I = set("I") := 1 to m val J = set("J") := 1 to n val K = set("K") := 1 to l val c = param("c", J) val d = param("d", K) val a = param("a", I, J) // ... val x = xvar("x", J).integer >= 0 val y = xvar("y", K) >= 0 param m; param n; param l; set I := 1 .. m; set J := 1 .. n; set K := 1 .. l; param c{J}; param d{K}; param a{I, J}; // ... var x{J} integer, >= 0; var y{K} >= 0; MathProg EDSL Varargs for simple indexing expressions
  • 25. val m = param("m") val n = param("n") val l = param("l") val I = set("I") := 1 to m val J = set("J") := 1 to n val K = set("K") := 1 to l val c = param("c", J) val d = param("d", K) val a = param("a", I, J) // ... val x = xvar("x", J).integer >= 0 val y = xvar("y", K) >= 0 param m; param n; param l; set I := 1 .. m; set J := 1 .. n; set K := 1 .. l; param c{J}; param d{K}; param a{I, J}; // ... var x{J} integer, >= 0; var y{K} >= 0; MathProg EDSL Returns a new variable with the `integer’ attribute
  • 26. val m = param("m") val n = param("n") val l = param("l") val I = set("I") := 1 to m val J = set("J") := 1 to n val K = set("K") := 1 to l val c = param("c", J) val d = param("d", K) val a = param("a", I, J) // ... val x = xvar("x", J).integer >= 0 val y = xvar("y", K) >= 0 MathProg EDSL Another variable, now adding the lower bound attribute param m; param n; param l; set I := 1 .. m; set J := 1 .. n; set K := 1 .. l; param c{J}; param d{K}; param a{I, J}; // ... var x{J} integer, >= 0; var y{K} >= 0;
  • 27. val m = param("m") val n = param("n") val l = param("l") val I = set("I") := 1 to m val J = set("J") := 1 to n val K = set("K") := 1 to l val c = param("c", J) val d = param("d", K) val a = param("a", I, J) // ... val x = xvar("x", J).integer >= 0 val y = xvar("y", K) >= 0 param m; param n; param l; set I := 1 .. m; set J := 1 .. n; set K := 1 .. l; param c{J}; param d{K}; param a{I, J}; // ... var x{J} integer, >= 0; var y{K} >= 0; MathProg EDSL Everything is immutable
  • 28. MathProg EDSL minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; s.t. g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; val f = minimize("f") { sum(j in J)(c(j) * x(j)) + sum(k in K)(d(k) * y(k)) } val g = st("g", i in I) { sum(j in J)(a(i, j) * x(j)) + sum(k in K)(e(i, k) * y(k)) <= b(i) }
  • 29. MathProg EDSL minimize st ... minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; s.t. g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; val f = minimize("f") { sum(j in J)(c(j) * x(j)) + sum(k in K)(d(k) * y(k)) } val g = st("g", i in I) { sum(j in J)(a(i, j) * x(j)) + sum(k in K)(e(i, k) * y(k)) <= b(i) }
  • 30. minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; s.t. g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; val f = minimize("f") { sum(j in J)(c(j) * x(j)) + sum(k in K)(d(k) * y(k)) } val g = st("g", i in I) { sum(j in J)(a(i, j) * x(j)) + sum(k in K)(e(i, k) * y(k)) <= b(i) } MathProg EDSL Multiple parameters lists
  • 31. minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; s.t. g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; val f = minimize("f") { sum(j in J)(c(j) * x(j)) + sum(k in K)(d(k) * y(k)) } val g = st("g", i in I) { sum(j in J)(a(i, j) * x(j)) + sum(k in K)(e(i, k) * y(k)) <= b(i) } MathProg EDSL Multiple parameters lists
  • 32. minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; s.t. g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; val f = minimize("f") { sum(j in J)(c(j) * x(j)) + sum(k in K)(d(k) * y(k)) } val g = st("g", i in I) { sum(j in J)(a(i, j) * x(j)) + sum(k in K)(e(i, k) * y(k)) <= b(i) } MathProg EDSL addition, multiplication, summation ...
  • 33. minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; s.t. g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; val f = minimize("f") { sum(j in J)(c(j) * x(j)) + sum(k in K)(d(k) * y(k)) } val g = st("g", i in I) { sum(j in J)(a(i, j) * x(j)) + sum(k in K)(e(i, k) * y(k)) <= b(i) } MathProg EDSL References to individual parameters and variables by application
  • 34. minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; s.t. g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; val f = minimize("f") { sum(j in J)(c(j) * x(j)) + sum(k in K)(d(k) * y(k)) } val g = st("g", i in I) { sum(j in J)(a(i, j) * x(j)) + sum(k in K)(e(i, k) * y(k)) <= b(i) } MathProg EDSL Constraint
  • 35. minimize f: sum{j in J} c[j] * x[j] + sum{k in K} d[k] * y[k]; s.t. g{i in I}: sum{j in J} a[i,j] * x[j] + sum{k in K} e[i,k] * y[k] <= b[i]; val f = minimize("f") { sum(j in J)(c(j) * x(j)) + sum(k in K)(d(k) * y(k)) } val g = st("g", i in I) { sum(j in J)(a(i, j) * x(j)) + sum(k in K)(e(i, k) * y(k)) <= b(i) } MathProg EDSL Creates a new constraint with the specified name and indexing
  • 36. Implementing the syntax
  • 37. Implementing the syntax Many of the syntactic constructs require: A broad (open?) number of overloadings Be used with infix notation
  • 38. Many of the syntactic constructs require: A broad (open?) number of overloadings Be used with infix notation Implementing the syntax type classes and object-oriented forwarders
  • 39. Many of the syntactic constructs require: A broad (open?) number of overloadings Be used with infix notation Implementing the syntax type classes and object-oriented forwarders implicits prioritization
  • 40. Implementing the syntax: “>=” param("p", J) >= 0
  • 41. Implementing the syntax: “>=” param("p", J) >= 0 ParamStat
  • 42. Implementing the syntax: “>=” param("p", J) >= 0 ParamStat ParamStat doesn’t have a `>=’ method
  • 43. Implementing the syntax: “>=” param("p", J) >= 0 implicit conversion to something that provides the method ParamStat doesn’t have a `>=’ method ParamStat
  • 44. Implementing the syntax: “>=” param("p", J) >= 0 // ParamStat param("p", J) >= p2 // ParamStat xvar("x", I) >= 0 // VarStat i >= j // LogicExpr p(j1) >= p(j2) // LogicExpr x(i) >= 0 // ConstraintStat 10 >= x(i) // ConstraintStat Many overloadings … more
  • 45. Implementing the syntax: “>=” implicit class GTESyntax[A](lhe: A) { def >=[B, C](rhe: B)(implicit GTEOp: GTEOp[A,B,C]): C = GTEOp.gte(lhe, rhe) }
  • 46. Implementing the syntax: “>=” implicit class GTESyntax[A](lhe: A) { def >=[B, C](rhe: B)(implicit GTEOp: GTEOp[A,B,C]): C = GTEOp.gte(lhe, rhe) } Fully generic
  • 47. Implementing the syntax: “>=” implicit class GTESyntax[A](lhe: A) { def >=[B, C](rhe: B)(implicit GTEOp: GTEOp[A,B,C]): C = GTEOp.gte(lhe, rhe) } trait GTEOp[A,B,C] { def gte(lhe: A, rhe: B): C } Type class
  • 48. Implementing the syntax: “>=” implicit class GTESyntax[A](lhe: A) { def >=[B, C](rhe: B)(implicit GTEOp: GTEOp[A,B,C]): C = GTEOp.gte(lhe, rhe) } trait GTEOp[A,B,C] { def gte(lhe: A, rhe: B): C } Type class The implementation is forwarded to the implicit instance
  • 49. Implementing the syntax: “>=” implicit class GTESyntax[A](lhe: A) { def >=[B, C](rhe: B)(implicit GTEOp: GTEOp[A,B,C]): C = GTEOp.gte(lhe, rhe) } The available implicit instances encode the rules by which the operators can be used
  • 50. Implementing the syntax: “>=” implicit class GTESyntax[A](lhe: A) { def >=[B, C](rhe: B)(implicit GTEOp: GTEOp[A,B,C]): C = GTEOp.gte(lhe, rhe) } The instance of the type class is required at the method level, so both A and B can be used in the implicits search
  • 51. Implementing the syntax: “>=” instances implicit def ParamStatGTEOp[A]( implicit conv: A => NumExpr): GTEOp[ParamStat, A, ParamStat] = /* ... */ >= for parameters and “numbers” param(“p”) >= m
  • 52. Implementing the syntax: “>=” instances implicit def ParamStatGTEOp[A]( implicit conv: A => NumExpr): GTEOp[ParamStat, A, ParamStat] = /* ... */ >= for parameters and “numbers” param(“p”) >= m
  • 53. Implementing the syntax: “>=” instances implicit def ParamStatGTEOp[A]( implicit conv: A => NumExpr): GTEOp[ParamStat, A, ParamStat] = /* ... */ >= for parameters and “numbers” param(“p”) >= m View bound
  • 54. Implementing the syntax: “>=” instances implicit def VarStatGTEOp[A]( implicit conv: A => NumExpr): GTEOp[VarStat, A, VarStat] = /* ... */ >= for variables and “numbers” xvar(“x”) >= m Analogous to the parameter case
  • 55. Implementing the syntax: “>=” instances implicit def NumExprGTEOp[A, B]( implicit convA: A => NumExpr, convB: B => NumExpr): GTEOp[A, B, LogicExpr] = /* ... */ >= for two “numbers” i >= j
  • 56. Implementing the syntax: “>=” instances implicit def NumExprGTEOp[A, B]( implicit convA: A => NumExpr, convB: B => NumExpr): GTEOp[A, B, LogicExpr] = /* ... */ >= for two “numbers” i >= j
  • 57. Implementing the syntax: “>=” instances implicit def NumExprGTEOp[A, B]( implicit convA: A => NumExpr, convB: B => NumExpr): GTEOp[A, B, LogicExpr] = /* ... */ >= for two “numbers” i >= j
  • 58. Implementing the syntax: “>=” instances implicit def LinExprGTEOp[A, B]( implicit convA: A => LinExpr, convB: B => LinExpr): GTEOp[A, B, ConstraintStat] = /* ... */ >= for two “linear expressions” x(i) >= 0 and 10 >= x(i) Analogous to the numerical expression case
  • 59. implicit def NumExprGTEOp[A, B]( implicit convA: A => NumExpr, convB: B => NumExpr) conflicts with: implicit def ParamStatGTEOp[A]( implicit conv: A => NumExpr) implicit def LinExprGTEOp[A, B]( implicit convA: A => LinExpr, convB: B => LinExpr) Instances are ambiguous
  • 60. implicit def NumExprGTEOp[A, B]( implicit convA: A => NumExpr, convB: B => NumExpr) conflicts with: implicit def ParamStatGTEOp[A]( implicit conv: A => NumExpr) implicit def LinExprGTEOp[A, B]( implicit convA: A => LinExpr, convB: B => LinExpr) Instances are ambiguous `ParamStat <% NumExpr‘ to allow `param(“p2”) >= p1’
  • 61. Instances are ambiguous implicit def NumExprGTEOp[A, B]( implicit convA: A => NumExpr, convB: B => NumExpr) conflicts with: implicit def ParamStatGTEOp[A]( implicit conv: A => NumExpr) implicit def LinExprGTEOp[A, B]( implicit convA: A => LinExpr, convB: B => LinExpr) NumExpr <: LinExpr => NumExpr <% LinExpr
  • 62. Implicits prioritization trait GTEInstances extends GTEInstancesLowPriority1 { implicit def ParamStatGTEOp[A](implicit conv: A => NumExpr) /* */ implicit def VarStatGTEOp[A](implicit conv: A => NumExpr) /* */ } trait GTEInstancesLowPriority1 extends GTEInstancesLowPriority2 { implicit def NumExprGTEOp[A, B]( implicit convA: A => NumExpr, convB: B => NumExpr) /* */ } trait GTEInstancesLowPriority2 { implicit def LinExprGTEOp[A, B]( implicit convA: A => LinExpr, convB: B => LinExpr) /* */ }
  • 63. Implicits prioritization trait GTEInstances extends GTEInstancesLowPriority1 { implicit def ParamStatGTEOp[A](implicit conv: A => NumExpr) /* */ implicit def VarStatGTEOp[A](implicit conv: A => NumExpr) /* */ } trait GTEInstancesLowPriority1 extends GTEInstancesLowPriority2 { implicit def NumExprGTEOp[A, B]( implicit convA: A => NumExpr, convB: B => NumExpr) /* */ } trait GTEInstancesLowPriority2 { implicit def LinExprGTEOp[A, B]( implicit convA: A => LinExpr, convB: B => LinExpr) /* */ } > priority > priority
  • 64. Next steps New semantics More static controls Support other kind of problems beyond MIP Talk directly to solvers Arity, scope, ... Multi-stage stochastic programming
  • 65. import amphip.dsl._import amphip.dsl._ amphip is a collection of experiments around manipulating MathProg models within Scala github.com/gerferra/amphip amphip is a collection of experiments around manipulating MathProg models within Scala github.com/gerferra/amphip
  • 66. FIN github.com/gerferra/amphip