1d7a84866d712a01c72e6faac99608887c525a2b
5 print('usage: {} maxjobstart'.format(sys
.argv
[0]))
8 maxjobstart
= sys
.argv
[1]
21 # Print variables and preamble
22 print('(benchmark a4.smt')
23 print(':logic QF_UFLIA')
26 print('(j{} Int)'.format(i
), end
=' ')
32 # Make sure the times are positive and within the bound
33 print('(> j{0} 0) (<= (+ j{0} {0}) {1})'.format(i
, maxjobstart
))
34 # Make sure the dependencies are done when a task is scheduled
35 for k
in pi
.get(i
, {}):
36 print('(>= j{0} (+ j{1} {1}))'.format(i
, k
))
37 # Make sure the shared resources are not used by two tasks at once
41 print('(or (>= j{0} (+ j{1} {1}))'.format(i
, k
), end
=' ')
42 print('(<= (+ j{0} {0}) j{1}))'.format(i
, k
))
44 # Close the and,benchmark parenthesis