We investigate the following decision problem. A manufacturing unit has to meet a random demand for N items. At the same time only one item can be manufactured. Manufacturing times are random whereas set-up times are known positive constants but different for different items. Finished production is stored in a warehouse with finite capacity. The availability of raw material is always guaranteed. Demand that cannot be satisfied by items in the warehouse will be backordered in a queue with given capacity. Demand that meets a full backorder queue is lost. We assume cost for manufacturing items, for production switches, for holding items in the warehouse, for waiting and lost demand. For sold items a given reward is earned. The problem now is to define such a manufacturing policy, i.e. a sequencing rule and a lot size rule, which maximises the expected profit per time unit. Since that problem is too complex for an analytical solution we restrict our search for an optimal policy to simple structured policies, which can be described by a few parameters. To find optimal parameter values we use simulation optimisation, where a simulator for the system is combined with a genetic algorithm as an optimiser. The paper is finished with some numerical examples to show the applicability of the proposed approach.