Esempio n. 1
0
def test_balance_simple():

    time = 0
    consumption = lambda t: 1
    c = Consumer(consumption, name='Consumer')

    prob = fs.Problem()
    prob.add_constraints(c.constraints(time))

    prob.objective = fs.Minimize(c.consumption[RESOURCE](time))

    # Raises SolverError because the consumer wants to consume but noone delivers
    solution = default_solver.solve(prob)