First-order melting and dynamics of flux lines in a model for YBa2Cu3O7- delta.