An SMT Approach to a Multiparty Economic Scheduling Problem - - PowerPoint PPT Presentation

an smt approach to a multiparty economic scheduling
SMART_READER_LITE
LIVE PREVIEW

An SMT Approach to a Multiparty Economic Scheduling Problem - - PowerPoint PPT Presentation

An SMT Approach to a Multiparty Economic Scheduling Problem Shriphani Palakodety , Guha Jayachandran, Aditya Thakur Setting Marketplace Matching buyers / sellers Buyer constraints Seller constraints Matching must honor both


slide-1
SLIDE 1

An SMT Approach to a Multiparty Economic Scheduling Problem

Shriphani Palakodety, Guha Jayachandran, Aditya Thakur

slide-2
SLIDE 2

Setting

  • Marketplace
  • Matching buyers / sellers
  • Buyer constraints
  • Seller constraints
  • Matching must honor both
slide-3
SLIDE 3

Setting

  • Cryptocurrency network
  • Offer and Request computation
  • Payment through cryptocurrency
  • Constraints specified on both sides
  • Match Requester and Offerer
slide-4
SLIDE 4

Setting

  • Rich specification:
  • Combine requests and offers
  • Offer algorithm X only if algorithm Y is

provided (for example)

  • Price constraints on what you can offer/buy
  • Time constraints like timeouts, schedule-

after-x etc.

  • Rich operator algebra
slide-5
SLIDE 5

Goals

  • Match requests and offers
  • Satisfy constraints
  • Optimize some metrics:
  • Number of participants included
  • Maximizing earnings
  • Etc.
slide-6
SLIDE 6

Goals II

  • Real-time (ish)
  • Quick enough so the network doesn’t stall
  • Handle a large body of participants
slide-7
SLIDE 7

What We Evaluate Against

  • Hardware (GPU) accelerated solution
  • SIMD - Single Instruction Multiple Data
slide-8
SLIDE 8

Formalism

  • ServiceCall - unit
  • Request / Offer
  • {


“named-entity-recognition”: offer,
 “part-of-speech-tagger” : request
 }

slide-9
SLIDE 9

Formalism

  • AllOf / OneOf - operators
  • OneOf(


AllOf({
 “named-entity-recognition”: offer,
 “part-of-speech-tagger” : request
 }),
 AllOf({
 “named-entity-recognition”: offer,
 “word2vec-embeddings” : request
 }),
 )

slide-10
SLIDE 10

Formalism

  • Pricing Constraints
  • {


OneOf(
 AllOf({
 “named-entity-recognition”: offer,
 “part-of-speech-tagger” : request
 }),
 AllOf({
 “named-entity-recognition”: offer,
 “word2vec-embeddings” : request
 }),
 ),
 Price: >=20
 }

slide-11
SLIDE 11

Formalism

  • We call this a Commitment:
  • OneOf( AllOf(...), AllOf(...) ), price: >=20
slide-12
SLIDE 12

Scheduler

  • Put together a collection of commitments
  • The collection satisfies some constraints
slide-13
SLIDE 13

Commitment Constraints

  • If a commitment is scheduled, exactly one of

the OneOf operands must be scheduled

  • If a commitment is not scheduled, none of the

OneOf operands must be scheduled

slide-14
SLIDE 14

AllOf Constraints

  • If an AllOf is scheduled, all of the

constituent ServiceCalls must be scheduled

  • If an AllOf is not scheduled, none of the

constituent ServiceCalls must be scheduled

slide-15
SLIDE 15

ServiceCall Constraints

  • If a ServiceCall request is scheduled, exactly
  • ne offer must be scheduled for it
  • If a ServiceCall offer is scheduled, at least
  • ne request must be scheduled for it
slide-16
SLIDE 16

Also,

  • Schedule at least one Commitment
  • So the problem becomes unsat
  • Additionally 1 variable per ServiceCall p(S) where S

is a ServiceCall

  • AllOf scheduled in a Commitment:
  • For each ServiceCall in this AllOf:
  • Add +p(S) if ServiceCall is offered
  • Add -p(S) if ServiceCall is requested
slide-17
SLIDE 17

Setup

  • Pseudobooleans for each Commitment - Ci
  • Pseudobooleans for each AllOf - Ci-Ai
  • Real valued prices for each ServiceCall - p(S)
slide-18
SLIDE 18

Setup

  • Run encoding through Z3
  • Optimize using Z3-opt
slide-19
SLIDE 19

Optimize

  • # of Commitments scheduled
  • maximize ΣCi
slide-20
SLIDE 20

Baseline

  • GPU Encoding
  • Solves just the matching problem
  • Pricing not solved
slide-21
SLIDE 21

GPU Kernel

  • Encode AllOf
  • Exploit “+” (SIMD GPU) to mean scheduling

AllOfs

  • Regularly prune
slide-22
SLIDE 22

AllOf Encoding

[ 0, 1, 0, 1, 1, 0, 0, 0, 1]

Service Call Portion Commitment Portion Request/Offer Indicators

slide-23
SLIDE 23

Take 2 Of These

[ 0, 1, 0, 1, 1, 0, 0, 0, 1] [ 0, 0, 0, 0, 0, 1, 0, 1, 0] [ 0, 1, 0, 1, 1, 1, 0, 1, 1] + =

slide-24
SLIDE 24

Potential Schedule

[ 0, 0, 0, 0, 0, 0, 0, 0, 0]

slide-25
SLIDE 25

Potential Schedule

[ 0, 0, 0, 0, 0, 0, 0, 0, 0] + [ 0, 1, 0, 1, 1, 0, 0, 0, 1] = [ 0, 1, 0, 1, 1, 0, 0, 0, 1]

slide-26
SLIDE 26

Sum = Potential Schedule

  • Pool of potential Schedules (frontier)
  • Add next AllOf to each
  • New pool of potential Schedules (new

frontier)

  • Maintain frontier till all AllOfs are

considered

  • Regularly prune
slide-27
SLIDE 27

Prune Heuristic

  • We are maximizing # of Commitments
slide-28
SLIDE 28

Prune Heuristic

[ 0, 1, 0, 1, 1, 1, 0, 1, 1]

Sum Of These

slide-29
SLIDE 29

Thus

  • Build encoding
  • Set up initial schedule (all zeros - i.e nothing

scheduled)

  • Pick AllOfs and add to the initial schedule
  • Get a new set of potential schedules
  • Prune the list (can’t double schedule offers

etc.)

  • Repeat
slide-30
SLIDE 30

Benchmarks

  • Pool Of ServiceCalls
  • Create Commitment:
  • Sample n
  • N - # of AllOfs in this Commitment
  • Create Each AllOf:
  • M - # of ServiceCalls in this AllOf
  • Randomly make them an offer / request
  • Randomly sample a price for each Commitment
slide-31
SLIDE 31

Hardware

  • Z3 Scheduler:
  • Macbook Pro with an Intel(R) Core(TM)

i7-5557U CPU @ 3.10GHz with 4 cores

  • GPU Kernel:
  • NVidia Tesla K40c graphic card
slide-32
SLIDE 32

Key Findings

  • Z3 encoding is a lot more compact
  • Solves bigger problems
  • Substantially faster despite hardware

acceleration

  • Faster at solving the SAT AND Pricing problems
slide-33
SLIDE 33

Abundance / Scarcity Scenario

  • Bias the sampling:
  • Abundance : Far more offers than requests
  • Scarcity : Far more requests than offers
  • 70/30 split
slide-34
SLIDE 34

Key Finding

  • Solver is very fast at dealing with the

scarcity case

  • Slower in the abundance case
  • Potentially takes longer to finish the
  • ptimization step when supply is high
slide-35
SLIDE 35

Benchmarks + Results

  • https://github.com/onai/SMTExperiments
slide-36
SLIDE 36

References

  • de Moura, L., Bjørner, N.: Z3: An efficient SMT solver. In:

Tools and Algorithms for the Con- struction and Analysis of Systems (TACAS) (2008) 


  • Kovásznai, G., Biro ́, C., Erdélyi, B.: Generating optimal

scheduling for wireless sensor networks by using optimization modulo theories solvers. In: Proc. Int. Workshop on Satisfiability Modulo Theories (SMT) (2017) 


  • Kasi, B.K., Sarma, A.: Cassandra: Proactive conflict

minimization through optimized task scheduling. In: Proceedings of the 2013 International Conference on Software

  • Engineering. pp. 732–741. ICSE ’13, IEEE Press, Piscataway,

NJ, USA (2013) 


slide-37
SLIDE 37

Questions